I tested it with LTE version ctrlX 1.12.9 and it works like expected. What I wonder, that you have only a WORD variable (16 bit). There are 2 ways how to use unions: 1. Use identical RAM by storing different data types/value types in the same place. => You must store somewhere the info how to interprete the address in the RAM: 2. Use BIT's instead of BOOL's 3. Combination of 1 + 2
When I read your request you are using option 3. This means in the
PLC you use the Bits of the Union for easy programming
HMI you use the variable Word to access the variables, where you have to change data type to DWORD (32 bit)
TYPE UN_CONTROL :
dwValue: DWORD; // must be DWORD to access all 32 bits of variable Bits
The structure ST_CTRL_BITS is not a standard data type, therefore it is visible in OpcUA browse but with unknown (=empty) data type. Therefore you can not access it.
You can access the bits via the union variable Word, but you must adapt the data type to DWORD, to access all 32 bits of the union variable Bits. To access bits in WebIQ you add a prefix to the item: bit[bitNo]:item e.g. bit:SInt
... View more
I found the solution. It is the WebIQ API command "workspace.recover".
Description from docu: Attempts to load a workspace with the given GUID. May be used if a software component was shut down before the workspace was properly closed. Workspaces are automatically garbage collected after not being accessed for 30 days.
My conclusion. Additionally to the recover of the workspace, the project is also started.
Open ws connection
LogIn as system user (command user.login)
Start project with command workspace.recover
Now project is running and I can execute other API commands
... View more