# A/D Convertor

**URL:** <https://oscat.discourse.group/t/a-d-convertor/1669>\
**Category:** oscat.lib fuer CoDeSys 3\
**Created:** [27. Oktober 2013 um 20:38 UTC](https://oscat.discourse.group/t/a-d-convertor/1669 "2013-10-27T20:38:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinnie\_VdB](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@Vinnie\_VdB](https://oscat.discourse.group/u/Vinnie_VdB)\
**Post date:** [27. Oktober 2013 um 20:38 UTC](https://oscat.discourse.group/t/a-d-convertor/1669/1 "2013-10-27T20:38:12Z")

</div>

(Sorry for my English, my German isn’t strong enough in writing)

I am looking for a way on how I can convert an INT value to a BOOL (AD convertor) that can replace following Siemens module:  
[http://shop.sigstu.com/out/media/5102.%20E\_10.98.pdf](http://shop.sigstu.com/out/media/5102.%20E_10.98.pdf)

Can somebody help on on the right track how to make this possible?  
In short, I read the room temperature, bring this to a P simple P controller and get an INT value out. The set point is 25Â°C, the bandwidth for the P is 1Â°C.

All help is appriciated!

---

<div class="post-metadata">

**Author:** ![schwa226](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@schwa226](https://oscat.discourse.group/u/schwa226)\
**Post date:** [28. Oktober 2013 um 14:45 UTC](https://oscat.discourse.group/t/a-d-convertor/1669/2 "2013-10-28T14:45:33Z")

</div>

[http://www.markallen.com/teaching/ucsd/147a/lectures/lecture5/5.php](http://www.markallen.com/teaching/ucsd/147a/lectures/lecture5/5.php)

LM339 as example

---

<div class="post-metadata">

**Author:** ![Vinnie\_VdB](https://avatars.discourse-cdn.com/v4/letter/v/439d5e/32.png) [@Vinnie\_VdB](https://oscat.discourse.group/u/Vinnie_VdB)\
**Post date:** [28. Oktober 2013 um 16:16 UTC](https://oscat.discourse.group/t/a-d-convertor/1669/3 "2013-10-28T16:16:18Z")

</div>

Thank you for the answer but I am looking for a CODESYS function block that could simulate this hardware module so that I can integrate this in my Schneider M258.

Thank you already
