|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: Limit Switches
I can't see the other cases, so I can't really debug your code. So instead, I wrote an example that should work. It's set up with it's own while loop, so you can add it anywhere outside the Basic Robot Main vi. Feel free to put parts of it somewhere else, or incorporate it with your RobotData.
It's basically a state machine. In the first state you can move the motor both left and right until you hit a limit switch. Then you're limited to going the other direction or stopping if you go the other way. Once you hit the other limit switch, it's vice versa. I hope this helps you. Check out the lvmastery video on State Machines. I found it to be very helpful. Good luck! Last edited by Luke Pike : 11-02-2009 at 11:46. Reason: Forgot the 's on it |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Limit switches(in C++) | beefy1 | Programming | 3 | 24-12-2008 15:27 |
| Limit Switches | ChrisR_522 | Programming | 2 | 25-01-2008 08:04 |
| limit switches | stephenthe1 | Programming | 28 | 11-05-2005 16:37 |
| Limit switches | Team168 | Programming | 8 | 10-02-2003 16:22 |
| Limit Switches/Pots | Brett W | Technical Discussion | 3 | 28-01-2003 14:25 |