Hi,
Can you please assist.
I'm reading some modbus values to DM and whilst I can calculate the right answer with a calculator I cannot get the maths right in the PLC.
The data is stored in two registers say 40001 and 40002,
If I work in hex the data is represented as 3 and A660 respectively, if I input this into my hex calculator as 3A660 adding the MSB and LSB then change to decimal I get 239200 which is 239.2Volts - fine.
Because the DM's are 16 bit, in the PLC I read 3 and -22944, even if I read the data into the system 32 bit variables as 3 and 42592 I cannot get the maths right to convert back to my required 239200.
I don't need the full three decimal places so will probably divide the number by 100 again so I can store the final value back into DM so my HMI can read the data so temporary use of the 32bit variables would be nice as I have around ten values to convert....
Cheers Marcus