2/5/2020 2:33 PM | |
Joined: 9/23/2005 Last visit: 9/11/2024 Posts: 4693 Rating:
|
That's for the explanation: https://en.wikipedia.org/wiki/Endianness There are numerous ways to change byte order. Tell us your equipment (PLC family) and DB format (optimized or not). |
Regards, |
|
This contribution was helpful to
1 thankful Users |
2/6/2020 2:16 PM | |
Posts: 174 Rating:
|
PLC- S71500 NON OPTIMIZED DB |
2/6/2020 2:25 PM | |
Joined: 9/21/2012 Last visit: 9/11/2024 Posts: 4131 Rating:
|
You can use SWAP to change the byte order. |
This contribution was helpful to
1 thankful Users |
2/6/2020 8:01 PM | |
Posts: 174 Rating:
|
Thanks. For Swap instruction, I may need to swap each word to new address. I have more than 50Nos words coming from modbus registers. Also I have assigned bits to HMI alarms. So I need to maintain this DB address. Is there any other methods to swap byte order of all words together in a data block with single command. |
2/6/2020 10:16 PM | |
Joined: 9/21/2012 Last visit: 9/11/2024 Posts: 4131 Rating:
|
If you are writing to that DB from a Modbus register, then you need to have another DB where the swapped word can be addressed to. If you swap the word in the same DB where they are written to from Modbus registers, they are overwritten. |
2/9/2020 10:25 AM | |
Joined: 5/6/2010 Last visit: 9/2/2024 Posts: 1978 Rating:
|
Hello, maybe is this link helpful to explain you the Big-/Low-Endian theme.
|
Follow us on