# Formula generator for XML file

**URL:** <https://forum.realdash.net/t/formula-generator-for-xml-file/6375>\
**Category:** Feature requests\
**Created:** [September 16, 2024, 11:40am UTC](https://forum.realdash.net/t/formula-generator-for-xml-file/6375 "2024-09-16T11:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaroslav](https://forum.realdash.net/letter_avatar_proxy/v4/letter/y/3ab097/32.png) [@Yaroslav](https://forum.realdash.net/u/Yaroslav)\
**Post date:** [September 16, 2024, 11:40am UTC](https://forum.realdash.net/t/formula-generator-for-xml-file/6375/1 "2024-09-16T11:40:39Z")

</div>

Hello everyone!

There is a difficulty in obtaining the formula for the XML file when connecting an analog resistive sensor, there are a large number of them and they have an individual dependence of the parameter on the resistance, it is very difficult for the end user to make calculations.

I want to offer a generator that I am sure will be useful.  
I already know all the necessary formulas, it remains to implement the calculator itself.  
In general, the calculation algorithm is as follows:

1. Pull-Up voltage is introduced (depends on the input scheme);
2. The pull-up resistor R1 is specified (it is known or the permissible minimum value is selected);
3. Vref and bit rate depends on the voltage of the controller and the bit rate of the ADC;
4. Sensor Max and Min, respectively, resistance range and parameter change range;
5. We get the formula for the XML file.

 ![Untitled-2](https://forum.realdash.net/uploads/default/original/2X/9/9496edd33a5dcf2031fad7cb563c77acab21092d.jpeg)

I want to consult with you, whether everything necessary is in it.
