FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
04-25-2023 10:44 AM
Hi all,
i would like to set a page/ view on the HMI screen based on a PLC/ OPC-UA Variable which is available in the "Process Data Manager".
e.g. If "bExample" is "true" (rising edge) --> switch the HMI screen to "Panel View" [4].
I found the UI-Action "Setview" in the config of some buttons/widgets which provide this functionality, but with a klick on an button.
Could somebody provide me a Script with this functionality triggered by a "Process Data Manager" Variable and not with a user action.
I´m not that experienced in JavaScript coding 🙂
Thanks
Max
Solved! Go to Solution.
04-26-2023 09:12 AM
There is a build in feature in WebIQ which might help you, withou a script.
All Panels (Screen, Swipe and Tab-Panel) have an item field (see red mark). It is a status und control field. This means if you can the INT variable in PLC, the selected panel is displayed. If you select a different panel via mouse click, the value of the item is updated.
04-26-2023 09:40 AM
To achieve it the way you want you could write a LocalScript that subscribes to the "bExample" item and if it changes to 1 you write a virtual item you have connected to the panel widget to 3.
That way you don't affect the original item because it would also be written if you change the view - with a bool item you could therefore only have two views.