How to convert IEEE754 32 bit data to real in CodeSys?
In Codesys, I have read data from Energy meter and stored it in an array of words . But I cannot convert it into real.
Please assist me how to get Real value (Kw) from above array.
Also help me to send this value to register address so that doing modscan of PLC I can get value.
2. Declare variable which is type real and assigned to these memory addresses eg %MD0.0.
3. Now you have a variable which shows value in Codesys as real type. You can access this variable with Modbus according to AC500 memory mapping
I'm doing it like that:
1. Read 2 consequent registers in DWORD
(COM_MOD_MAST -> FCT=3; ADDR= first address in your case 0; NB=2; DATA= ADR-> READ1 [dword])
2. DWORD_TO_REAL from READ1 [dword]
Start address for 40000 should be 0 with FCT=3 or 4
The above example also should work, if you already have the consequent registers