03-31-2014 08:24 AM
Hello people, for our program at school we need to make an on/off controller with a hysteresis which we need to be able to change.
So for example: our setpoint is 50%, so the regulator needs to pop on at 45%, and turn off at 55% (hysteresis = 10%)
How to make this?
We already have the program for 0-45% and 55-100%.
Thanks in advance!
03-31-2014 09:08 AM - edited 03-31-2014 09:10 AM
03-31-2014 09:20 AM - edited 03-31-2014 09:21 AM
You should read about the In Range and Coerce Function in the Comparison Functions Palette.
04-12-2014 03:53 PM - edited 04-12-2014 04:12 PM
Hello Yves,
Your description isn't complete and could be either hysteresis or deadband (which is what GerdW has provided some psuedo code for). Hysteresis typically has to have some "memory", and there are many different forms of hysteresis. There are plenty of rescources online describe hysteresis functions - both graphically and mathematically.
Just did a quick search - and came up with this - looks a fairly complex function - depends if you need something smooth:
http://revue.elth.pub.ro/upload/66469907Motoasca.pdf
Maybe you can cope with a simpler hysteresis function that just has straight lines!