09-22-2018 02:05 PM
How can I fix this control system with an alarm that activates according to the next figure, in which, I'm reading real-time values? The problem is that I can't turn on the alarm during all the selected zones, it only turns on during the half of the curves that are out of the limits.
09-24-2018 08:55 AM - edited 09-24-2018 09:02 AM
Hi Eric,
start your routine with a disabled alarm feature.
Once you reach the tolerance band of your measurement value you can enable the alarm…
Use a shift register to store the enabled/disabled state of your alarm.
Comments on your VI:
Why do you need that big MathScript node? You are doing just some simple calculations and comparisons!
Code like this:
if (hant-h)<0 w=1 else w=0 end
is in LabVIEW as simple as this:
Why don't you clean up your VI?
09-24-2018 10:57 AM - edited 09-24-2018 10:58 AM
Your code is a bit messy and your image does not correspond to what you wrote above, so let me answer the question from the image about ignoring the out of range for the first rise.
All you need is an initialized shift register that is False on first rise and True once the range has bee reached once (or vice versa). The alarms is then a logical combination of this BOOLEAN an the output of the in range and coerce function. Don't over-complicate things!
09-24-2018 11:20 AM
Again, answering the question from the image, here's a simple example. There are many ways to do this, of course.