Hi Jukka, Well, I think right now we read everything as Big Endian, as the Spec generally defines.
However, do we know that this is not sufficient for all devices. One option we discussed, but which needs to find someone to volunteer to implement, is that we generally assume big-endian, but make it possible to set the connection to treat the words in different endianness. Want to get your fingers dirty? ;-) Chris From: Jukka Sirviö <[email protected]> Date: Monday, 16. January 2023 at 09:54 To: [email protected] <[email protected]> Subject: modbus word/byte/bitorder on datatypes > 16bits Hello, How are you guys dealing with word ordering on modbus datatypes that are larger than 16 bits (DINT, DWORD..)? There is variation between PLC vendors how they handle this. Don't know if also the bitordering (little vs big endian) may differ between PLC vendors. for example: word 1 byte 1 word 1 byte 2 word 2 byte 1 word 2 byte 2 vs word 2 byte 1 word 2 byte 2 word 1 byte 1 word 1 byte 2 -Jukka ________________________________ Tämä sähköpostiviesti (liitteineen) saattaa sisältää luottamuksellista tietoa, joka on tarkoitettu vain vastaanottajalleen. Jos et ole oikea vastaanottaja, ilmoita viestin lähettäjälle tapahtuneesta virheestä ja tuhoa viesti välittömästi. Viestin luvaton julkaiseminen, kopioiminen, jakelu tai muu käyttö tai toimenpiteisiin ryhtyminen sen perusteella on ehdottomasti kielletty. This message (including any attachments) may contain confidential information intended for the person or entity to which it is addressed. If you are not the intended recipient, notify the sender and delete this message immediately. Notice that disclosing, copying, distributing or any other use of the message and its information, or taking any action based on it, is strictly prohibited. ________________________________
