Alarming After A Set Time


Recommended Posts

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.

Link to comment
Share on other sites

  • 8 years later...

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.

Link to comment
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.