What does the "5000-set_tgpio_modbus" example do?

In the sdk, the example app 5000-set_tgpio_modbus would appear to allow the use of the gpio ports for modbus comms.

Could you explain what that program does?


UFACTORY Website
Official Store
uArm User Facebook Group

Feedback:
English Channel
中文通道

Hello,
The example explains how to use the Modbus-RTU communication protocol to control the motion of the gripper in the Python-SDK.

The program sends a data list to the tool here:

code, ret = arm.getset_tgpio_modbus_data([0x08, 0x10, 0x07, 0x00, 0x00, 0x02, 0x04, 0x0, 0x0, 0x0, 130])

The bytes received on the RS485 lines of the gripper port for that command are 8 16 7 0 0 2 4 0 0 0 130 123 98 in decimal

Could you explain what the list items are and where they are defined?

This is the open gripper command so:

I believe the 0x08 refers to the gripper id of 08 for the biogripper. 10 is a function code The 123 and 98 are likely the CRC check but it doesn’t seem to match any CRC calculators that I can find.
0x10 Hex is 16 Decimal so that is the function code
the 7 0 is the starting register address
0 2 indicates 2 registers
4 0 means that it wants 4 bytes for the data
the 0 0 0 130 dec is 0x0000 0x0082 hex
the 123 98 is the CRC check
The required response is 6 bytes plus the responding CRC check. I haven’t figured out the correct CRC to return so I am still getting an error

Hello,
you can refer to the BIO user manual for the detailed content: https://cdn.shopify.com/s/files/1/0012/6979/2886/files/BIO_Gripper_User_Manual-1.6.0_11811f7d-8043-4fe9-b82d-0c89b9c333fb.pdf?v=1606727554
And when using the SDK to control the gripper, there is no need to send the CRC check code when sending the command.

Hello,
Do you want to use the third-party gripper on the xarm?