Pop-up Screen Flashing

Hello all,

I created a screen that is scripted such that when either one of two tags become true (an alarm from a robot), the screen will pop up. It is also scripted to automatically close the screen when BOTH of the tags become false.

The issue I'm having is that when either tag is true, the screen flashes (almost like it is reopening every cycle). The logic is very simple, but it seems that there is a better way. In Tasks, I have an independent script as follows:

//If $Fanuc1_HMI.LT_BatteryAlarm = True Or $Fanuc2_HMI.LT_BatteryAlarm = True Then
// $Open("RobotBatteryAlarm")
//End If

In the Screen Script, I have the following:

//Sub Screen_WhileOpen()
//
// If $Fanuc1_HMI.LT_BatteryAlarm = False And $Fanuc2_HMI.LT_BatteryAlarm = False Then
// $Close("RobotBatteryAlarm")
// End If
//
//End Sub

Is there a better way to do this where the screen won't flash or flicker? I was thinking about adding some logic in the task where if the screen is already opened, not to try to reopen it, but I'm not sure of the best way to do this. Maybe use a local tag which is set when the screen opens, and if that tag is True, have something like:

//If ($Fanuc1_HMI.LT_BatteryAlarm = True Or $Fanuc2_HMI.LT_BatteryAlarm = True) And ExampleScreenTag = False Then
// ExampleScreenTag = True
// $Open("RobotBatteryAlarm")
//End If

Along with the logic in the closing portion to set it back to false like:

//Sub Screen_WhileOpen()

// If $Fanuc1_HMI.LT_BatteryAlarm = False And $Fanuc2_HMI.LT_BatteryAlarm = False Then
// ExampleScreenTag = False
// $Close("RobotBatteryAlarm")
// End If
//
//End Sub

Thanks!
Parents
  • Thanks for your help, Norman E.

    I was able to get this working through the Graphics Script as you suggested. The way our integrator has this set up, the only certain OPC drivers are scripted to poll through the Task list depending on which screen is currently open. I didn't realize this when I added the tags to the Graphic script, and I wouldn't see my screen pop up (since the tags weren't being polled on the default screen).

    Created a new driver and added it to task list to poll the robot tags in question, and voila!

    -K
Reply
  • Thanks for your help, Norman E.

    I was able to get this working through the Graphics Script as you suggested. The way our integrator has this set up, the only certain OPC drivers are scripted to poll through the Task list depending on which screen is currently open. I didn't realize this when I added the tags to the Graphic script, and I wouldn't see my screen pop up (since the tags weren't being polled on the default screen).

    Created a new driver and added it to task list to poll the robot tags in question, and voila!

    -K
Children
No Data