Hi,
Is it possible to configure a global variable from communication-thread D-variables?
I cannot access the position readback of virtual axes individually from a PLC file, and I don't know why. I just want to map a readback position to a Q variable, but it is not that easy from a PLC file...
The only thing I want is the numerical response for one axis, not string for all axes like the output for "&1p" command.
Example:
&1p
X111 Y222 // string output with all axes set in D0 mask
&2p
X333 Y444
I can access the desired values with commands like:
&1D // Apply "CS1 environment" to D-variables
X111 Y222
D6 // Query CS1 axis X position
111 // this is the output I want
D7 // Query CS1 axis Y position
222 // this is the output I want
&2D;D7 // Change D-variables to CS2 environment; query for CS2 Y position
X333 Y444 // first command output (undesired)
444 //second command output (desired)
But these commands only work from communications threads / scripts other than PLC files.
So I tried to access from PLC file the D-variables from coordinate systems and PLCs, but these are different domains.
What I am missing? How can I access these values from PLC?
Controller: Power Brick LV
Best regards,
Marcelo Moraes