Which event do I use? I want an automatic alarm popup based on an alarm PLC tag

I have my alarms created and an alarm screen working. Initially, I made the button flash on the screen when an alarm was present. Operators started to ignore it so I need a popup.

The popup screen is already created.

Sudo Code.
What I need is If the alarm bit is high, then enable the popup.

tag = system.tag.read("ALARMSEOLT1thru6/AnyAlarmHighBit")
state = tag.value
if state == 1:
   window = system.nav.openWindow('Alarm Popup')
   system.nav.centerWindow(window)
   print "it works"

I can not get the popup screen to print “it works” during testing. I also do not think I am using the proper event. I tied it to the event change event for the start button feedback on the screen.

:dizzy_face:… I didn’t hit save and publish. It works

Now, How can I make that x button bigger so the operator can hit it with their finger on the touch screen instead of a precision stylus device…

A push button with the following makes a touchscreen friendly close button.

system.nav.closeParentWindow(event)
2 Likes

Hi Jeremy! I am in the same situation and am trying to do the same thing you are but I have not used ignition before. Could you give me a how-to for making a popup alarm show when a boolean alarm bit goes on and off?

The code is literally right there in the post bud. Make a pop-up window. Make it the size you want. Then change the name from the system nav I have to whatever you named your popup. If you need help on this, you should probably go to the inductive university website and go over the basics. Also, you should run the client and make sure your client is only opening one screen. Choosing between swap etc. Is important with screen navigation. You don’t want each client having 20 open screens because you chose the wrong one.

Which scope are you scripting in? Like in the scripting library or to a certain component or tag?

Nevermind. Got it to work. Thanks mate!