Skip to content

How to use 'Modbus TCP' block under Blockly module?

Firmware requirements

  • Firmware version: V2.4.0+
  • UFactory Studio version: V2.4.100+

Block: Externals - Modbus TCP

  • set holding register address [] to [] [set]
  • get holding register address []
  • When holding register address [] is [] do'

Holding register:

  • Address: 256 ~ 511(0x0100 ~ 0x01FF)
  • Value: 0 ~ 255(0x00 ~ 0xFF)

Example

Create a Blockly project named 00015.

Drag 2 blocks and enter the corresponding address and its value.

Trigger the Blockly via Modbus TCP:

  1. Send the command to trigger 00015 Blockly project.
00 01 00 00 00 09 01 10 00 30 00 01 02 00 0F

2.Send the command to write '12 34' to the address '01 A0', it will let the arm go to [400, 0, 130, 180, 0, 0].

00 01 00 00 00 06 01 06 01 A0 12 34

3.Send the command to write '00 01' to the address '01 00', it will let the arm go to [300, 200, 130, 180, 0, 0].

00 01 00 00 00 06 01 06 01 00 00 01