Hi, Would like to check for a value which lies in the range.
For example, say I've got a value +5 in var. Also in another variable a value of 2. These two values can be negative also. like inplace of +5, replace it with -5. And the corresponding second variable -7.
Basically want to check for alram conditons using c code.
incase if I'm targetting for +5, and the value obtained is say +2, then it's an alarm condition.
In the same way if I target -5, and i get -7 then it;s an alarm.
Want to sepcify the range for generating this alarm.
For exmaple , +/- 0.9 onthe sacle.
If the obtained value is betwwen this slab, then no alarm. otherwise it needs to be flaged.
Could anyone suggest a good logic for this?