FAQs

Ask a Question

How to use M221 PLC to read 32 bits floating point values from power meters which support Modbus communication protocol?

Power meters which support Modbus protocols uses standard Modbus addressing method. For example, the holding registers are represented from address 40001 to 49999. If this is converted to the IEC61131 syntax, the address range is from %MW0 to %MW9998 which is currently adopted by M221 controller. so we need to take the n-1 register to read the correct value. For example: in the meter register floating point address 3060 is actually %MF3059 in IEC61131 Syntax.

Another difference between power meter and M221 controller regarding floating point addressing is that the least significant word and the most significant word order is opposite. For example: %MW3060 is the LSW and %MW3059 is the MSW for %MF3059 in the meter while it is opposite in the M221 controller. If we would like to read the meter floating point address 3060, we can use Read_Var function block to transfer the value of %MW3059 in the meter to %MW281 in the M221 controller, then transfer the value of %MW3060 in the meter to %MW280 in the M221 controller. Then use %MF280 in the M221 controller to represent the floating point values. 
 
Was this helpful?
What can we do to improve the information ?