# Reading Siemens S7 analog value

**URL:** <https://discourse.nodered.org/t/reading-siemens-s7-analog-value/49525>\
**Category:** Industrial\
**Created:** [9 August 2021 11:16 UTC](https://discourse.nodered.org/t/reading-siemens-s7-analog-value/49525 "2021-08-09T11:16:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrbrt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nrbrt/32/11738_2.png) [@nrbrt](https://discourse.nodered.org/u/nrbrt)\
**Post date:** [9 August 2021 11:16 UTC](https://discourse.nodered.org/t/reading-siemens-s7-analog-value/49525/1 "2021-08-09T11:16:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nrbrt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nrbrt/32/11738_2.png) [@nrbrt](https://discourse.nodered.org/u/nrbrt)\
**Post date:** [9 August 2021 12:08 UTC](https://discourse.nodered.org/t/reading-siemens-s7-analog-value/49525/2 "2021-08-09T12:08:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 August 2021 12:08 UTC](https://discourse.nodered.org/t/reading-siemens-s7-analog-value/49525/3 "2021-08-23T12:08:45Z")

</div>

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