Reading Siemens S7 analog value

Hi, I am trying to read an analog input from the Siemens S7 1212C PLC. I can read and write the digital i/o just fine and I get the correct analog voltage to show in the Siemens TIA software with a norm_x and scale_x instruction. When I read the output from the scale_x function at address %MD100 with Node-RED s7 (ST-One) node, I get a number that seems unrelated to the real value. I suspect that it is encoded somehow. Does anyone here know how to convert this to a meaningful number?
For example, I feed the PLC with 3V at it's analog input. The Siemens TIA software shows at %MD100 a value of 2.987196, which is close enough. When I read this address with Node-RED, it shows me a number like this: 1077882425. The datatype on the PLC for this address is "Real".
Anyone any idea?

I have found the solution. Even when the address is %MD100 in the Siemens software, to read the floating point number in Node-RED you have to read MR100. That will show the correct analog input value.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.