M221 Modbus registers giving wrong readings
-> Issue:
A 32-bit word that doesn't read correctly or doesn't match in the PLC with the VFD.
-> Product Line:
M221, Machine Expert Basic
-> Resolution:
If you're reading directly into a %MD, you need to make sure you're reading two consecutive registers and that the byte order is correct. In this case, to get a 32-bit value, you need to read two Modbus registers (for example, 3244 and 3245).
If, for some reason, the value read doesn't match, try swapping the words.
For example, if you read %MD100 := %MW100 + %MW101, try %MD100 := %MW101 + %MW100.
Basically, the %MD shares the previous and the next %MW. Here's an example:
When you assign %MD10 as a Symbol (by writing a string name in the Symbol column), the following happens:
- %MD9 stores the lower word of %MD10 in the upper word of %MD9. The lower word of %MD9 is 16#0000.
- %MD11 stores the upper word of %MD10 in the lower word of %MD11. The upper word of %MD11 is 16#0000.
The memory addresses used by %MD are as follows:
‘Used’ means that the Symbol is used in your current code.
‘Equ Used’ means that the address is assigned to store the upper and/or lower word of the adjacent %MD address.
Example: If you assign symbols to three consecutive %MD addresses and only use %MD10 in your Ladder logic, you’ll see the following:
In use:
If you assign values to %MD8 and %MD10 without touching any other address, the result will be that the upper and lower words will be filled in the adjacent %MD addresses:
Note how it overlaps in %MD9
If this FAQ did not solve your issue, you can chat with us at chat with us or e-mail us at customer.services@se.com to create a case with our Technical Support Team.If you are not located in North America, please contact your local Customer Care Center for assistance:Support | Schneider Electric Global (se.com)