Skip to content

4.Modbus-RTU Communication Protocol Control

4.1 Register Address Description

img_9.png

The gripper defaults to the standard Modbus RTU protocol at a default baud rate is 2Mbps and the slave ID is 0x08. The currently supported function codes are: 0x03 / 0x10. In this article, data analysis is big-endian analysis.

  • 0x03: Read registers
  • 0x06: Write Single Register
  • 0x10: Write multiple registers

Read:

Addressdescription
0x0000motion state
0x0001speed(r/min)
0x0002percentage of current
0x0003current
0x0004command position
0x0006motor position
0x0008position error
0x000Fcurrent alarm code

Write:

AddressDescriptionRangeUnitFactory Setting
0x0100Enable0-1;0
0x010AMode0-2; 0:opening and closing mode 1:position mode。0
0x0303Speed0-4000r/min1000
0x0505Clip Detection Threshold30-1000.01A50
0x0506Holding Current Limit (force)10-1000.01A50
0x0508Drop Detection Threshold500-2000r/min1000
0x0601Baud Rate0: 4800 1: 9600 2: 19200 8: 921600 9: 1M 10: 1.5M 11: 2Mbps11
0x0700Position Command High0-0xFFFF-0
0x0701Position Command low0-0xFFFF-0
0x0702Position Feedback High0-0xFFFF-read-only
0x0703Position Feedback Low0-0xFFFF-read-only

motion state(0x0000)

bit1:000:stop statebit3:200:not enable
01: motion state10:enable state
10:clamping state
11: there's an error in the gripper

4.2 Read BIO Gripper Register

Register Function

Read Register
Request
Modbus RTU DataSlave ID (Gripper)1 Byte0x08
Function Code1 Byte0x03
Register Starting Address2 BytesAddress
Quantity of Register2 BytesN*
Modbus CRC162 BytesCRC*
Response
Modbus RTU DataSlave ID1 Byte0x08
Function Code1 Byte0x03
Byte Count1 ByteN*x2
Registers ValueN*x2 BytesValue
Modbus CRC162 BytesCRC*

N* = Quantity of Registers

Address = Register Starting Address

CRC* = Cyclic Redundancy Check

Resgister

Resgister Starting AddressRegister Value
Get Gripper status Register0x00002 BytesDisabled: 0x0000 Enabling: 0x0004 Enabling completed: 0x0008Stop status: 0x0008 Motion status: 0x0009Clipping status: 0x000A Error status: 0x000B
Get Gripper Error Register0x000F2 BytesAn error occurs: all other return values indicate an error(except 0)No error occurred: 0x0000

4.3 Write BIO Gripper Register

Register Function

Write Register
Request
Modbus RTU DataSlave ID (Gripper)1 Byte0x08
Function Code1 Byte0x10
Register Starting Address2 BytesAddress
Quantity of Register2 BytesN*
Byte Count1 ByteN*x2
Registers ValueN*x2 BytesValue
Modbus CRC162 BytesCRC*
Response
Modbus RTU DataSlave ID1 Byte0x08
Function Code1 Byte0x10
Register Starting Address2 BytesAddress
Quantity of Registers2 BytesN*
Modbus CRC162 BytesCRC*

N* = Quantity of Registers

Address = Register Starting Address

CRC* = Cyclic Redundancy Check

Resgister:

Resgister Starting AddressRegister Value
Enable/Disable Gripper Register0x01002 BytesEnable : 0x0001 Disable : 0x0000
Set Gripper Position Register0x07004 BytesOpen the Gripper : 0x0000 0x0082 Close the Gripper : 0x0000 0x0032
Set Gripper Speed Register0x03032 Bytes0x0000-0x0BB8 unit: r/min
Clear Error Register0x000F2 Bytes0x0000

4.4 Modbus RTU Example

Use Modbus RTU to control BIO Gripper G2 opening and closing, mode 1.

  1. Set the Bio Gripper G2 mode 1. Address: 0x010A. Last two digits are CRC: 6D AD, still effective after power off.
Send:08 06 11 0A 00 01 6D AD
Response:08 06 11 0A 00 01 6D AD
  1. Enable the Gripper。Address:0x0100。
Send:08 06 01 00 00 01 49 6F
Response:08 06 01 00 00 01 49 6F
  1. Open the Gripper. Position:150,Speed: 3000,Force:50。
Set speed:3000
Send:08 06 03 03 0b b8 7E 55
Response:08 06 03 03 0b b8 7E 55

Set force:50(percentage)
Send:08 06 05 06 00 32 E8 4B
Response:08 06 05 06 00 32 E8 4B

Open Bio gripper G2 to 150, The location of the send needs to be converted:(150-70)*3.75=(OCT)100=(HEX)01 2c
Send:08 10 07 00 00 02 04 00 00 01 2c FB 4E
Response:08 10 07 00 00 02 40 25
  1. Close the Gripper. Position:71。
Send:08 10 07 00 00 02 04 00 00 00 00 FB 03
Response:08 10 07 00 00 02 40 25
  1. Read the Bio Gripper G2 position。
position:71
Send:08 03 07 02 00 02 64 26
Response:08 03 04 00 00 00 00 63 33
  1. Read Error Codes. Address:0x000F
Send:08 03 00 0F 00 01 B4 90
Response:08 03 02 00 00 64 45