01-02-2008 01:09 PM
Hello,
I have been working on creating a control such that it has to be true for a variable timeframe before it returns a true. For example, I have a low flow alarm which may come in due to a bubble in the line but clears immediately. I only want an alarm if the low flow is rung in for a certain amount of time. The engineer requested that there is a 2 minute delay, but I think 30 seconds would be more than enough. I think a little background on this project is in order.
My project involves three main parts, a PLC, an OPC server and LabVIEW with the DSC module. The main vi is a stacked sequence; first which basically initializes the system, the second sequence is the heart of the project where all the magic happens and the last sequence is a shutdown. The second sequence has seven different while loops, all of which run independently of each other. One handles events, one gathers real time data, and one checks for alarms in the shared variables. This is where I get “creative” to make it work. Another while loop in this sequence handles the alarms. I use a local variable from the “alarm” loop to pass alarm conditions to the “control” loop. In the “control” loop I pass the alarm condition into a subVI. The subVI basically is logic “mess” which took up too much space so I converted it to a subVI. This subvi spits out which alarms are in/clear and what systems should be on/off.
01-02-2008 01:25 PM
01-02-2008 02:15 PM
01-02-2008 04:05 PM
01-03-2008 09:15 AM
01-04-2008 11:04 AM - edited 01-04-2008 11:05 AM

01-04-2008 01:08 PM
Hi Mike,
I like what you have shown here. It was more of what I wanted to do. It seems to have more control on the time delay then what I have used. What I did was read in the alarm as a Boolean variable. That controlled a case structure, where if true, read the alarm as a local variable in a for loop which integrated 32times. There was a wait ms.vi in the for loop to control the time delay. The array was converted to unsigned 32 bit number. If all array members were 1 then the number would be xFFFFFFFF (in hex). I compared the resulting number to xFFFFFFFF. I would only get the alarm if the results were equal. It turned out to do what I needed. Thanks to both Albert and Mike for your help. I may incorporate Mike's suggestion when the system goes offline again.
cheers!