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.
10-17-2024 09:53 AM
Hello,
I need to create a UI-Action that when I press the button reads the state of for example 10 variables and writes its value to another 10 different variables (Pass the data from one variable to another).
I am testing with ReadValue but what happens is that if the variable to read is not in the current screen that executes the action the values of the variables are not read.
Read and write variables are project and PLC variables.
How can I do it? Do I need a subscribe even if I only want to run the code once?
Thanks.
Solved! Go to Solution.
10-17-2024 10:05 AM
`readValue` is the wrong method as it reads the current value of the item (in the frontend), that is the last value that was ever read by any widget in the current HMI in the current browser.
What you probably want is reading the current value from the PLC - for this you have to use readDirect and writeDirect, please see here:
https://developer.community.boschrexroth.com/t5/Smart-HMI-WebIQ-Designer-and/Iq-select-box/m-p/10176...
10-18-2024 12:16 PM
Hi webiq-sk,
Yes, ReadDrirect already works.
Thanks for your support