4.Modbus-RTU Communication Protocol Control
4.1 Register Address Description
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:
Address | description |
---|---|
0x0000 | motion state |
0x0001 | speed(r/min) |
0x0002 | percentage of current |
0x0003 | current |
0x0004 | command position |
0x0006 | motor position |
0x0008 | position error |
0x000F | current alarm code |
Write:
Address | Description | Range | Unit | Factory Setting |
---|---|---|---|---|
0x0100 | Enable | 0-1; | 0 | |
0x010A | Mode | 0-2; 0:opening and closing mode 1:position mode。 | 0 | |
0x0303 | Speed | 0-4000 | r/min | 1000 |
0x0505 | Clip Detection Threshold | 30-100 | 0.01A | 50 |
0x0506 | Holding Current Limit (force) | 10-100 | 0.01A | 50 |
0x0508 | Drop Detection Threshold | 500-2000 | r/min | 1000 |
0x0601 | Baud Rate | 0: 4800 1: 9600 2: 19200 8: 921600 9: 1M 10: 1.5M 11: 2M | bps | 11 |
0x0700 | Position Command High | 0-0xFFFF | - | 0 |
0x0701 | Position Command low | 0-0xFFFF | - | 0 |
0x0702 | Position Feedback High | 0-0xFFFF | - | read-only |
0x0703 | Position Feedback Low | 0-0xFFFF | - | read-only |
motion state(0x0000)
bit1:0 | 00:stop state | bit3:2 | 00:not enable |
---|---|---|---|
01: motion state | 10: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 Data | Slave ID (Gripper) | 1 Byte | 0x08 |
Function Code | 1 Byte | 0x03 | |
Register Starting Address | 2 Bytes | Address | |
Quantity of Register | 2 Bytes | N* | |
Modbus CRC16 | 2 Bytes | CRC* | |
Response | |||
Modbus RTU Data | Slave ID | 1 Byte | 0x08 |
Function Code | 1 Byte | 0x03 | |
Byte Count | 1 Byte | N*x2 | |
Registers Value | N*x2 Bytes | Value | |
Modbus CRC16 | 2 Bytes | CRC* |
N* = Quantity of Registers
Address = Register Starting Address
CRC* = Cyclic Redundancy Check
Resgister
Resgister Starting Address | Register Value | ||
---|---|---|---|
Get Gripper status Register | 0x0000 | 2 Bytes | Disabled: 0x0000 Enabling: 0x0004 Enabling completed: 0x0008Stop status: 0x0008 Motion status: 0x0009Clipping status: 0x000A Error status: 0x000B |
Get Gripper Error Register | 0x000F | 2 Bytes | An 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 Data | Slave ID (Gripper) | 1 Byte | 0x08 |
Function Code | 1 Byte | 0x10 | |
Register Starting Address | 2 Bytes | Address | |
Quantity of Register | 2 Bytes | N* | |
Byte Count | 1 Byte | N*x2 | |
Registers Value | N*x2 Bytes | Value | |
Modbus CRC16 | 2 Bytes | CRC* | |
Response | |||
Modbus RTU Data | Slave ID | 1 Byte | 0x08 |
Function Code | 1 Byte | 0x10 | |
Register Starting Address | 2 Bytes | Address | |
Quantity of Registers | 2 Bytes | N* | |
Modbus CRC16 | 2 Bytes | CRC* |
N* = Quantity of Registers
Address = Register Starting Address
CRC* = Cyclic Redundancy Check
Resgister:
Resgister Starting Address | Register Value | ||
---|---|---|---|
Enable/Disable Gripper Register | 0x0100 | 2 Bytes | Enable : 0x0001 Disable : 0x0000 |
Set Gripper Position Register | 0x0700 | 4 Bytes | Open the Gripper : 0x0000 0x0082 Close the Gripper : 0x0000 0x0032 |
Set Gripper Speed Register | 0x0303 | 2 Bytes | 0x0000-0x0BB8 unit: r/min |
Clear Error Register | 0x000F | 2 Bytes | 0x0000 |
4.4 Modbus RTU Example
Use Modbus RTU to control BIO Gripper G2 opening and closing, mode 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
- Enable the Gripper。Address:0x0100。
Send:08 06 01 00 00 01 49 6F
Response:08 06 01 00 00 01 49 6F
- 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
- 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
- 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
- Read Error Codes. Address:0x000F
Send:08 03 00 0F 00 01 B4 90
Response:08 03 02 00 00 64 45