Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i change the pager message based on different alarms?

I need to change the pager message for different alarms. I have several alarm objects that I need to activate the pager with the alarm text. There may be several alarms going off so I need to get these into the queue.
0 Kudos
Message 1 of 2
(2,895 Views)


$Alarm.message always gives you the message from the most-recent Alarm. Connecting this to the 'message' datamember of the Pager will make sure that the current message is sent.

Pager Object has a built-in queue which queues up to 10 messages. See if this is sufficient in your case because there's no "queue" object in Lookout and building one is not simple either.

One way of building a queue system is to use the DataTable Object. You will keep appending the messages onto a new row. And keep track of the total number of messages with a cursor. Use another cursor to keep track of the "sent messages." At some point, you will have to roll-over and start from the first row (overwriting the old messages).

As you can see, it's not ea
sy to build a queue. The other thing you can do is to use multiple Pager Objects. This way, you'll have multiple queues (10 per queue). However, here you cannot use the $Alarm.message in all of them as duplicate messages will be sent. Instead, you can "assign" a few Alarm objects to each Pager and use a big IF statement for the message field in each:

TIF(Alarm1.active,"alarm1 msg",
TIF(Alarm2.active,"alarm2 msg"," "))
and so on...

Hope this helps. By the way, there's a good tutorial on the Pager object (especially useful for troubleshooting communication) that is worth looking at:
http://zone.ni.com/devzone/conceptd.nsf/webmain/806C1114D89292A386256968004400AC?opendocument


Regards,

Khalid
Message 2 of 2
(2,895 Views)