LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tank level control and its alarm

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.

 

Download All
0 Kudos
Message 1 of 4
(3,830 Views)

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:

check.png

 

Why don't you clean up your VI?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,803 Views)

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!

0 Kudos
Message 3 of 4
(3,782 Views)

 

IgnoreFirst.png

 

 

Again, answering the question from the image, here's a simple example. There are many ways to do this, of course.

0 Kudos
Message 4 of 4
(3,778 Views)