Created: 2021-03-09 12:10 AM
I have created some structures in somachine in order to be transmitted with modbus from a M241 PLC. The problem is that all these data are being transmitted but not correctly. For example I have the following data:
So these data are being transmitted with modbus and I am checking with modbus poll whether the transmission is okay or not. So when I check on modbus poll I found out this:
- When I change the value of Hz (That occupy 2 modbus registers) it doesn't change the registers of Hz but change one register of Hz (The second one) and the first register of the next variable.
I am not sure why that is happening. But what I know is that If change the types from udint and ulint to uint everything works fine.
If someone could help me I would appreciate a lot. Thanks in advance!
Created: 2021-03-15 12:44 PM
You may find that the structure is effectively even word aligned because of the udint.
There could be a dummy word inserted after the Varpower variable so the Hz variable is sitting on an even word boundary.
If this was a Modicon M340 or M580, that is exactly what we would get.
There is some description on Help at this location:
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!