|
Re: Relay and window motor
Here is a sample multi-button sequence that goes in Periodic Tasks.vi (NOT Teleop.vi, because of the delays).
The sequences for each button are independent although Button 1 goes first if both buttons are pressed simultaneously.
However, the possibility of the wrong button being pushed must be handled.
What happens if button 1 is pushed twice in a row?
You can add a check that only allows the proper button to be pushed. That's called a state machine.
That might also be handled by adding a limit switch at the bottom as feedback for when it's all the way down, and maybe another to prevent it from going too far up. A limit switch check would then simply replace the timer at the beginning of each of the sequences.
For Opening Relays, if you can get one Open successfully coded, then you can highlight all of it , then copy/paste to get the next one.
Then use the cursor to select a different Relay number.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 03-02-2013 at 21:37.
|