|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: coding for limit switch
Instead of forcing the motor to run for "a while" when a limit switch is tripped, you can just use the switch to keep the motor from going any further in the wrong direction. Don't worry about moving it away, just worry about keeping it from going past the limit.
The typical way to do this is to splice into the speed control value. Set it to zero if one limit switch is active and the incoming value is positive, or if the other switch is active and the value is negative. This will stop the motor as it drives into the limit, and you can rely on other signals to drive the motor back. |
|
#2
|
|||
|
|||
|
Re: coding for limit switch
If you do just stop when you hit the limit switch,your PID will probably generate a significant amount of error for a relativley long period of time. If you're using the error amount to perform hardware diagnostics(like we did last year), this could cause false positives
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| limit switch | solomason519 | Programming | 9 | 09-02-2010 08:50 |
| What is the essay for the Limit Switch? | reader_girl932 | Kit & Additional Hardware | 0 | 11-02-2008 16:55 |
| Using a limit switch to limit motion | ManicMechanic | Programming | 16 | 20-12-2007 00:54 |
| Limit Switch for PCM | GeorgeC | Programming | 4 | 16-02-2007 13:21 |
| limit switch | wedellm | Electrical | 4 | 16-02-2007 13:01 |