Quote:
Originally Posted by mshafer1
It sounds like you need to use a state machine, there's several tutorials at This LabVIEW Tutorial Site, it sounds like you would have a forward, second motor, and reverse (or more descriptive for what those motors do). A state machine can be implemented in either periodic tasks or in Teleop (only caveat is that when done in Teleop, one either needs to insert a while loop that only runs once (constant on the terminal), or use the main program while loop and pass the data in and out of Teleop.
|
So the motor that will run constantly will control our elevator, when button A (move up) is held down or button B is held down(move down). The motor we want to run for 5 seconds one direction when button A or B is pressed will release a brake mechanism then when button A or B is released it will spin the motor back 5 second to the original spot to reengage the brake.