RobotStudio event

Link Button with variable

I want to link a button to a variable. The variable should be 1 if the button is pressed and 0 when it is not. Using the variable (in my case a boolean variable) I want you to light up an LED, or simply not.


 
How do I connect the variable with the button? Which properties-subitem should I connect?
 
Funnily , it works perfectly for any other button, only with the classic "normal", there are problems. Or doesnt work a button if a RunRoutine(Button) is working?
 
Have a nice start of the week Big smile

Comments



  • Hello,
     
    Looks like its a really late reply Smile
     
    To answer your question. You could use a normal Button control for the same. The functionality of the RunRoutine Button control is call a rapid routine.
     
    The ideal way may be to link a signal to the text property of button control. On click of the button control you could define an action to invert the signal.
     
    The same signal is also linked with the LED control so that the state changes.
     
    Thus, on button click signal value toggles between 1 and 0 and also reflects the state in LED.
     
    Thanks,
    Abhishek