Skip to main content
12-Amethyst
June 9, 2023
Solved

String Data Type in Modbus Driver Kepware connectivity

  • June 9, 2023
  • 1 reply
  • 1690 views

Hello,

 

I want to read data from Modbus PLC, so in the Kepwar device tag, there is a string data type. how to use that.

 

my use case is to read the Device name from Modbus PLC and that data push to thingworx, I have connected kepware and thingworx but I want to know how string and other data type work, other than Word data tyepe

 

Best answer by SlidingDownhill

Modbus only consists of 16 bit registers. It can't transfer anything else .

On one side you would need to locate the individual characters as ascii values (or break the string into ascii characters, one per register), copy that number of registers, and then reassemble them into a string onthe other side 

I don't know if  Kepware's "Advanced Tags" or Thingworks can help with the reassembly, but Modbus itself has that 16 bit register limitation that you can't work around. 

1 reply

12-Amethyst
June 9, 2023

Modbus only consists of 16 bit registers. It can't transfer anything else .

On one side you would need to locate the individual characters as ascii values (or break the string into ascii characters, one per register), copy that number of registers, and then reassemble them into a string onthe other side 

I don't know if  Kepware's "Advanced Tags" or Thingworks can help with the reassembly, but Modbus itself has that 16 bit register limitation that you can't work around.