Hi,
Does somebody know how to swap words from modbus Driver?
I would like to read uint32 from register 403 and 404 where the 404 is "least significant word".
I am using default panel for MODBUS/UNICOS periphery address.
Thank You in advance.
Modbus driver - Swap word
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Modbus driver - Swap word
Probably it works when using the config entry littleEndianRegister for the [mod]-section in the config file.
For detailed information please have a look at the WinCC OA Documentation.
Best Regards
Leopold Knipp
Senior Support Specialist
For detailed information please have a look at the WinCC OA Documentation.
Best Regards
Leopold Knipp
Senior Support Specialist
- Balewski
- Posts:13
- Joined: Tue Aug 22, 2017 9:52 am
Re: Modbus driver - Swap word
Thank You Leopold for reply, but it's not what i wanted to do.
The Endianity will swap Bytes not only the words.
in my situation i have:
Register 403 - 0x0000
Register 404 - 0x0024
with big endian: uint32 = 0x2400 (9216 dec)
little endian : uint32 = 0x240000
and i want to have uint32 = 0x24 (36 dec)
Right now i'am using another dpe with Datapoint function calling a script to swap the words. I was wondering is there any other solution?
Best regards
Balewski Michał
The Endianity will swap Bytes not only the words.
in my situation i have:
Register 403 - 0x0000
Register 404 - 0x0024
with big endian: uint32 = 0x2400 (9216 dec)
little endian : uint32 = 0x240000
and i want to have uint32 = 0x24 (36 dec)
Right now i'am using another dpe with Datapoint function calling a script to swap the words. I was wondering is there any other solution?
Best regards
Balewski Michał