FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
06-06-2023 11:13 AM
Hello,
When I access a screen in which I am using ctrlX CORE variables communicated via OPCUA to WebiQ to display some objects, the variables have a communication delay and at first all the elements that should be hidden by the state of the variable to which they are associated are visible. After a few seconds they are hidden by the state of the variable.
What can I do to make the communication of these variables faster?
Maybe i can use a load screen, which is hidden after a time. How i can hide a screen after a time?
Best regards.
Solved! Go to Solution.
06-06-2023 12:02 PM
Regarding fixing of the issue:
These factors influence the speed at which you observe changes because of item changes in widgets:
- the speed of the OPC-UA server (compare with UA Expert from another system connected to the same network through the same network type)
- the network speed and latency of the server system -> always use a wired connection for best performance
- the network speed and latency of the browser system -> always use a wired connection for best performance
- a virus scanner and/or firewall on the server and/or on the browser system
- the CPU of the server system
- the CPU of the browser system
- the GPU of the browser system
Please note an OPC UA change has to go through these network routes:
- OPC-UA-Server <-> WebIQ Server
- WebIQ Server <-> Browser
Regarding the workaround:
You should hide the container that contains the widgets via CSS and then show it via JavaScript when the item is available. Only showing a dialog will likely also show the other widgets before as the dialog will be initialized via JavaScript (asynchronous). If the container itself is hidden with CSS it will never be shown initially which is probably what you want.
JavaScript offers the setTimeout method for delays:
https://www.w3schools.com/jsref/met_win_settimeout.asp
06-07-2023 08:01 AM
An further issue is discussed in: Delay-on-loading-data
The workaround disucssed there is to have the items always subscribed. An altrnative to subscribe variables via trend, is to subscribe them in a local script, which is always active (so attach it e.g. to the root element of your project.
const im = shmi.requires("visuals.session.ItemManager");
im.subscribe([
"GVL_BASE.stTeachMgr.myVar1",
"GVL_BASE.stTeachMgr.myVar2"],
// optinal callback function, is not necessary
// for you and can be removed
(name, value, type) => {});
Keep in mind that you shouldn't do this workaround for too many variable, to keep the load of PLC and communicaton small.