Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
6 posts • Page 1 of 1
6 posts
• Page 1 of 1
jeissonsierrac
Posts:62
Joined: Wed Jun 03, 2015 9:37 pm
MODBUS TCP function block 16
Postby jeissonsierrac »
Hi
we are integrating a SOS subsystem which one communicates in MODBUS TCP, this integration requires a function of MODBUS TCP code 16, this function allows to write values in multiple registers, in the moment that we are trying to communicate with the device, we can read information but we dont know how we send a command to the device using Function code 16, we will be grateful with all help you can give us
To use function code 16 you must use the 'FC/SFC' "write multiple register". The second number of the Modbus address is the function code.
A list of the supported function codes can be found in the online help -> Drivers -> Modbus/TCP -> Modbus/TCP driver -> Modbus/TCP driver details -> Function codes
A table of when which function code can be used can be found under Defining the peripheral addresses of the Modbus/TCP driver -> FC/SFC
Thus far we have managed to establish communication and reading some directions that provides us information devices. the problem is when we trying to write to Modbus TCP server must send the frame in multiple directions.
We understand that to make reading multiple addresses should be written as follows.
M.1.10: 100
reading is performed from the address 10 to the address 100.
Trying to write in several directions at the same time try to do like reading.
M.1.16.1: 3
Attempting to write the frame from position 1 to 3, but it throws error transformation.
We're not sure if this is right way to do it or are implemented incorrectly.
We appreciate if you can give us a hand with this issue.
It is only possible to define the length of the data for input addresses. For output addresses the string length is used including the terminating 0-character.
How do I set a Modbus Output Periphery address for a String as you reference here?
I see something similar mentioned in the help "Defining the peripheral addresses of the Modbus/TCP driver". However, for a DP with a String type I am unable to set a periphery address for Modbus. I suspect I am missing something very simple here.