Hello everyone, I was just wondering if anybody knows if there's a way to pull the string name of the current visualization without using the current visu variable. I'm working on a project where we don't want web clients to change the current visualization on the HMI of the machine. Thanks!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// Change to Visu2 when setting xChangeVisu to TRUEfbChangeVisu(xExecute:=xChangeVisu,xDone=>,xBusy=>,xError=>,itfClientFilter:=VU.Globals.OnlyWebVisu,//itfFilter, eError=>,sVisuName:='Visu2');IFfbChangeVisu.xDoneORfbChangeVisu.xErrorTHENxChangeVisu:=FALSE;END_IF
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To get the current visu for all your individual web clients, you could iterate over them, using the same library
1)
Create a new function block which implements VU.IVisualizationClientIteration
2)
Create an instance of this function block + add an instance of the "iterate" function block
fbIterateCallBack:FB_IterateOverClients;// this implements VU.IVisualizationClientIterationfbVuIterate:VU.FbIterateClients;// this FB iterates over all clients
3)
Call the fbVuIterate and set the reference to the call back FB. Then it will automatically call the method "HandleClient" of this function block.
In the HandleClients method you can use the property of the interface of your webclient to which page it is currently on:
sCurrentVisuOfClient:=itfClient.CurrentVisuName;
4)
Optionally from here you could also set the visu for the webclient, but this might be obsolete, because the other function block is now available...
Hello everyone, I was just wondering if anybody knows if there's a way to pull the string name of the current visualization without using the current visu variable. I'm working on a project where we don't want web clients to change the current visualization on the HMI of the machine. Thanks!!
To change the current visualization for (all) webclients:
Add the library βVisu Utilsβ and use the following example code:
To get the current visu for all your individual web clients, you could iterate over them, using the same library
1)
Create a new function block which implements VU.IVisualizationClientIteration
2)
Create an instance of this function block + add an instance of the "iterate" function block
3)
Call the fbVuIterate and set the reference to the call back FB. Then it will automatically call the method "HandleClient" of this function block.
In the HandleClients method you can use the property of the interface of your webclient to which page it is currently on:
4)
Optionally from here you could also set the visu for the webclient, but this might be obsolete, because the other function block is now available...