Intricate Case Structure Question

So far we have accomplished the coding for our first button, which worked. Now, we want to create a code in which we are able to press a button which will cue the motors to run. When we press the button the second time, we want that to cue the motors to stop running.

We have run into an obstacle regarding the case structures should be coded.

Any ideas?

Hi there!

I’ve seen this question around a few times, and I have an example of how to code the case structures to do exactly what you’re wanting. Feel free to check out the VI attached. The code has documentation inside of it, so I won’t explain it here. Also, in the example the code is set up to toggle a relay, however its could easily be modified to be used with jaguars or victors for motor speed control, but at the very least it’ll give you a start on how to set up the case structure.

Good luck!