# Function to convert analog input value!

**URL:** <https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636>\
**Category:** General\
**Tags:** function-node\
**Created:** [13 September 2022 04:59 UTC](https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636 "2022-09-13T04:59:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![everklein](https://avatars.discourse-cdn.com/v4/letter/e/a87d85/32.png) [@everklein](https://discourse.nodered.org/u/everklein)\
**Post date:** [13 September 2022 04:59 UTC](https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636/1 "2022-09-13T04:59:44Z")

</div>

I'm reading an analog input with node-red-contrib-s7 and would like to convert this analog value to a scale from 0 to 100.  
Any tips on how to get the function to convert?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 September 2022 05:13 UTC](https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636/2 "2022-09-13T05:13:42Z")

</div>

Will the range node help you do this ?

---

<div class="post-metadata">

**Author:** ![everklein](https://avatars.discourse-cdn.com/v4/letter/e/a87d85/32.png) [@everklein](https://discourse.nodered.org/u/everklein)\
**Post date:** [14 September 2022 01:51 UTC](https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636/3 "2022-09-14T01:51:07Z")

</div>

Yes, I managed to do it through the range node. Thanks

---

<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:** [28 September 2022 01:51 UTC](https://discourse.nodered.org/t/function-to-convert-analog-input-value/67636/4 "2022-09-28T01:51:49Z")

</div>

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