Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I calculate rate of change alarm values?

I am trying to set up "rate of change" alarms for water tanks. Can anyone help with how to calculate the values for the unit and for the sample rate? I want to set the alarm for xft per hour of change. It seems that I am getting false alarms. The lower the values for the sample rate are set, the more often I get alarms. Also, is it necessary for the lo, lo-lo, hi and hi-hi values to be present? I have other alarms that handle these conditions.
 
Brad
 
0 Kudos
Message 1 of 6
(7,041 Views)
Have you ever tried Derivative object?
The Derivative object calculates the rate–of–change of the incoming numeric input signal. Use this object to calculate the rate at which a tank is filling or draining, or to convert a changing total flow value into a flow rate.
Ryan Shi
National Instruments
0 Kudos
Message 2 of 6
(7,016 Views)

Ryan,

Actually, I only need to alarm on a negative rate of change. Specifically, when a water tank is falling to rapidly. I think I have come up with a way to do this using the "mid" text function. By setting the priority of the rate of change alarm outside the alarm filter range, this keeps the actual rate of change alarm from showing up in the alarm window. I created a second alarm with its priority within the alarm filter window with this expression;

 (mid($Alarm.message,6,1)="-") and ($Alarm.tagname="\\bradct\Process1\Alarm1")

This looks for the 6th character in the ROC alarm, [ ROC (-) ] to be a minus sign and the alarm tagname to be for the correct alarm.

This gives me an alarm when the level is negative, but the positive ROC does not show in the alarm window. Do you see any flaws in this design or is there a more simplified way of obtianing this data? Would the derivative object work better? I have never used it.

Thanks

Brad Adams, Communications Group Inc.

0 Kudos
Message 3 of 6
(7,011 Views)
I think Derivative object can also meet your requirement. Its output is the value of change in a given duration, as numeric. If the input goes down, the output is negative. Then, use alarm object to generate alarms when the output is below 0.
Both methods should work.
Ryan Shi
National Instruments
0 Kudos
Message 4 of 6
(7,000 Views)

Do you have an example of the derivative object that you could send? I was looking at it and not quite sure how to set the parameters. I am looking for tank level fall per hour. Such as, a tank that is 24 feet, if it falls 5 feet per hour, then alarm. Could you send sample code?

Thanks

 

0 Kudos
Message 5 of 6
(6,993 Views)
http://forums.ni.com/ni/board/message?board.id=190&message.id=1833&requireLogin=False

Message Edited by Mike@DTSI on 08-16-2007 06:02 PM

Mike Crabtree - Lead Developer
Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
(866) 964-6948 / (760) 247-9512
0 Kudos
Message 6 of 6
(6,987 Views)