hi i would like to know if it is posible in a graphic/pushbuton to control to variable at the same time for example a BOOL value and an analog variablestate of the button will be only the BOOL variable of course
hi i would like to know if it is posible in a graphic/pushbuton to control to variable at the same time for example a BOOL value and an analog variablestate of the button will be only the BOOL variable of course
Hello Anthony,Hello,
Your need is to link several variables to the same push-button ?
Unfortunately, this is not possible in the Straton/zenon-Logic Graphics, you have to add a small program to do it.
Have a nice day!
Anthony
I've been searching for the solutions on GitHub and Stackoverflow in vain. How can I find a program to link 2 variables to the same push-button?
Best,
Terry
Hello Terry,
What I was thinking about is a simple line of ST code.
for example if you want to link MyVar_1 and MyVar_2 to the same push button, then what you can do is to link only MyVar_1, then create an ST program ("PushButtons" for example) and type:
MyVar_2 := MyVar_1;
This way, if you click on the button, the zenon Logic graphic will set MyVar_1 to TRUE and the ST program will copy this value into MyVar_2
For the moment this is the only simplest workaround I see
Best regard,
Anthony