Modbus TCP Problems with string reading [message #1791150] |
Mon, 25 June 2018 04:14  |
Eclipse User |
|
|
|
Hi all,
I'm having troubles with the reading of strings with the Modbus driver. Modbus works with memory cells of 16 bits, so there are 2 chars each cell.
The problem is that chars in the string readed are swapped: if the original string is ABCD, I read BADC. I have read that the protocol works in this way and the slave have to swap the chars while reading. Obviously i noticed the data.order field, but it doesn't works; i tried all the orders (LSB, LSW, MSB, MSW) but nothing changes.
How can i solve this? Have i to swap manually chars on my own?
|
|
|
|
Powered by
FUDForum. Page generated in 0.06077 seconds