Activate a digital output when any popup is displayed


I am wondering if anyone can tell me if script exists to detect when a pop-up is being shown on the display? I would like to trigger an audible alarm attached to one of the digital outputs when any pop-up appears. There are quite a few pop-ups scattered throughout the code, so I’m looking for something that can be coded once in a separate thread instead of hard-coding the output actions around each pop-up.


Welcome to the community!

You could try creating a Subprogram within your Main Program that calls for an I/O trigger & popup. You would then just call the subprogram whenever you need to notify operator, see below:

SubProgram_1 - NotifyOperator()
   // Turn Alarm On
   // Show Popup
   popup(“Hello World!”,”Popup Title”, warning=False, error=False, blocking=True)
   // blocking above halts program execution at this line until Continue in popup is pressed
   // Turn Alarm Off

I can think of a few ways but you don’t have to use URscript (shown above, use SET and SUBPROGRAM nodes in Polyscope). Someone else may have a better solution but hope this helps and best of luck!

Hi Michael,

Thank you for your response.

While I agree this approach would work, I have a number of different pop-ups throughout a decently large block of code, so I’m hoping to find a solution that does not require modifying each instance.

I know some languages have a function call that will return a boolean to tell if a window is open or not, but haven’t been able to find any information if that is an option here.


I will have to try this on a real robot. I only have my emulator right now. Could you change the digital output function to “high when running” ???

I wish there were better options for this. you could check the “halt program execution” box at the bottom of your popup commands and designate an output to “Prog running” like I showed above. You could also set a configurable output to “robot moving”.
The other option would be to buy a PLC with profinet or ethernet and just use it to pull information. You can get one for under $1k which may or may not be cost effective.