FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
05-31-2023 01:23 PM
Hi,
I want to read data via ModbusTCP App, but the endianess does not match.
the Server provides the words in little-endian. But the Modbus TCP App seems to expect a big-endian wordorder.
Is there any hidden possibility to change the wordorder?
Or will it be possible to change the endianess in a next version?
Solved! Go to Solution.
06-01-2023 12:13 PM
Thanks for the question. I forwarded the question to the dev team. I will come back to you here if I got an update.
06-01-2023 03:45 PM
You mean Byte swap within a Word or something else.
We like to understand your use case, why it's important to you that you can specify how it will be swapped? Normally when device is as per standard, no swap should happen.
06-02-2023 10:57 AM
The Bytes within a word are transmitted as expected. That means, 16 bit values are received correctly by the Modbus TCP App.
But when I want to receive a DWORD or FLOAT the words have to be swapped.
Example: server has a DWORD 0xDEADBEEF which is at address 0x3000 then the LowWord (0xBEEF) will be at address 0x3000 and the HighWord (0xDEAD) will be at address 3001. If I tell the client at Modbus TCP App it has to read an UINT32 from address 3000, I get a value of 0xBEEFDEAD.
My communication partner has a fix little-endian wordorder when used as a server. By using it as a client everything (bytes, words, ...) can be swapped as needed to adapt to different systems. To my knowledge there are many systems who use different byte-/wordorders to transmit their data.
06-05-2023 03:41 PM
Thanks for sharing details. We're checking on the efforts. Are there any death line for you, till you expect this improvement
06-06-2023 09:28 AM
We are actually working on a proof of concept. This is one solution but does not need to be the preferred/best solution. There are also other ways to get the data. E.g. get some arrays of 16bit register values with this Modbus TCP App and then write an own snap app which converts the data and stores it into the datalayer...
Generally, this would be an useful improvement for the Modbus TCP App. It would be nice to know if this will be done in the future and when it will be done circa.
06-06-2023 02:22 PM
the word swap might be a small and quick improvement soon, consider the byte swap too (I mean both, user can choose byte and/or word swap), is a higher effort and will take longer.