Sign in to follow this  
atomic361

Alarming After A Set Time

Recommended Posts

Hello,

Could you show me an example how to Alarm a channel after a set time period i.e 15 minutes. Thats if the channel rises above a set point for the set time period

Many thanks,

Share this post


Link to post
Share on other sites

You mean the channel stays above the threshold for a full 15 minutes? The Alarm expression would be:

min(myChannel[systime(), systime() - 900]) > setpoint

change myChannel to your channel name, 900 to the time width (15 mins), and setpoint to your setpoint. If you wanted to alarm in reverse (i.e. staying lower than the setpoint), you'd change the > to < and the min() to max().

Note that when you first start DAQFactory, if the channel is already above the setpoint, the alarm will trigger immediately.

Share this post


Link to post
Share on other sites

Hi,

Is there a way to make it not alarm on DAQFactory start. I have DaqFactory process restart schedule and sometimes one startup it alarms why say a pump is off waiting for water.

Share this post


Link to post
Share on other sites

There are lots of ways.  First, you can always do Alarm.paused = 1 to stop DAQFactory from processing alarms.  In fact, this is a good thing if you have lots of alarms.  Set paused to 1, then use alarm.checkAlarms() to trigger alarm checking from a simple sequence.  This is more efficient.

Alternatively, you can modify all your alarm expressions and add:

&& !isempty(alarmsStarted)

to the end, so it might be:

pressure[0] > 100 && !isempty(alarmsStarted)

Then, just declare alarmsStarted when you are ready for DAQFactory to start processing alarms:

global alarmsStarted = 1

There are plenty of other ways too.

Share this post


Link to post
Share on other sites

Thanks for your reply i will test the alarm.paused but will that not just delay the alarm going off when you set alarm.paused back to 0

 

My alarm is for a pump min(TestBit(miri_16_Digital_in,7)[systime(), systime() - 60]) > 0

So if its off for 60 secs then alarm. Once i unpause will the alarms wait the full 60 secs?

Share this post


Link to post
Share on other sites

The pause variable affects when the alarms are processed, so unpausing the alarms will not cause an additional 60 second delay in your case, since you are using the system time as your reference point.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this