Hi all, first post, as I can't find exactly what I'm looking for in the forums. The goal here is wanting essentially a 'screen saver' window popup after about 3 minutes of inactivity on my HMI screens. These are industrial dryers, and it was requested that a screensaver popup with the dryer number and dryer fill percentage, until an operator touches the screen. These screens start up with options for 3 dryer numbers, indicating what dryer is being operated, then that is passed into the 'main' screen as a root container property.
The screensaver window itself was made as a 'main' screen, as that should automatically be full screen, and no borders, but if that is my problem, I can alter it.
I initially set up a client timer script, and tried to grab the property by calling on the getWindow, to then grab the component 'dryerno', which is an int, as a property of the 'main' screen.
window = system.gui.getWindow('Main')
dryernumber = window.getRootContainer().getComponent('dryerno')
if system.util.getInactivitySeconds()>180 and system.nav.getCurrentWindow()!='Screensaver':
system.nav.swapTo('Screensaver', {'dryerno' : dryernumber})
Under the logs, it sees that "main" is not currently open when I push this into production, but I assume the reason for that is that it already sees inactivity has met or exceeded my 'if' statement, but this was a means to get the screen to popup, and I would just normally put a 'try' and 'catch' around my variables. The window does popup, but it will not pass the property value, and interacting with the screen does not close the window. I wasn't sure if the window would close on its own because the criteria of my 'if' statement will have not been met if there was activity, or if I needed another method by which to automatically close the window.
I have also tried adding a '.value' on the dryer number assignment, and it didn't work.
So main questions are:
Am I going about this the right way using a client timer script?
What is the best way to pass the dryer number property if this is the way?
Do I need to make another statement to close my 'screen saver' with activity?