I want to be able to change the screen based on a boolean tag (an OPT touch button) from PLC. I have two screens (Top/Bottom) and before changing the screen first I want to know which screen is open.
So for example when the Top screen is open and I touch the Opt touch button I want to change the screen to the Bottom screen and vice versa.
I wrote a tag change client event script but it did not work:
val= system.tag.readBlocking('[default]OptTouch').value if val==1 and system.nav.getCurrentWindow()="Top": system.nav.swapTo('Bottom') else val==1 and system.nav.getCurrentWindow()="Bottom": system.nav.swapTo('Top')
I do really appreciate any information from you guys.