Working with three buttons to change state
Dmitriy Stupak 6 months ago in IQANdesign • updated 6 months ago • 2
I have 3 buttons to change condition of the boat: 1 2 3. So when I press one button then it should be disable to press it again but I can press two another buttons to change the state.. What is the best way to do it, guys?
For example these 3 buttons
Customer support service by UserEcho
If you make the three VDIN channels toggling, you could use positive flank on the other channels as the resetting conditions.
In that variant the buttons hold all the state information, and the state machine channel simply picks the one that is activated.
The drawback I see with this method is that it has four states, one where none of the buttons is pressed, and that you can get to this state by pressing another time on a button.
An alternative could be to say that one of the buttons represents the default state, and switch between states with momentary presses on the button. A state machine channel (or FSM channel) holds the state information. To feed back the active state, an image with image selector shows the active state.
A quick but not so visually appealing method is to instead use a state parameter and the state picker display control.
Attached is a small example application to show these methods:
MD4 VDIN to state.idsx
Thanks a lot! It helped me!