__SYSTEM could return the Endianness of the architecture the software is running on. We could read Endianness once and store it somewhere (GVL?) for immediate retrieval. This way we could reference it in code to determine Little or Big without calling __SYSTEM everytime. I think it could or allready is also part of the Edge Properties which we send to the Primary Host.
Last edit: hermsen 2022-05-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
__SYSTEM could return the Endianness of the architecture the software is running on. We could read Endianness once and store it somewhere (GVL?) for immediate retrieval. This way we could reference it in code to determine Little or Big without calling __SYSTEM everytime. I think it could or allready is also part of the Edge Properties which we send to the Primary Host.
Last edit: hermsen 2022-05-03
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_pragma_conditional.html
defined (IsLittleEndian)
The operator causes the expression to be given the value FALSE when the CPU memory is organized in Big Endian (Motorola byte order).