Jump to content

Sending string with modbus


Recommended Posts



I'm working with two different machines, one machine contains a DTI with a name (string) as key value and a few numbers (int). The other works with data that it gets from the first machine.


To select a row from the DTI, I would like to view the name of each row of the DTI on the second machine. To do so I will need to send all the names in order to the second machine. How can I achieve this? I communicate through modbus, but strings doesn't seem possible to send, so any other suggestions?




in short: How do I send a DTI with one row of Strings (or an array with strings) to another machine?

Link to comment
Share on other sites



Unfortunately with Modbus, you are unable to send strings directly.  You must transfer them as 16-bit integers.


Under the "Buffer Tools" in the ladder programming, choose the "Copy Tag to Buffer" option and copy you string to a buffer.  Then choose the "Copy Buffer to Tag" in the same drop down menu of the tools to transfer the buffer we created into an array of 16-bit integers.  You can then use this array to send in the Modbus command.


Hope this helps.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...