|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#9
|
||
|
Re: Grabbing oblong objects
Quote:
Quote:
The code that I tested was sampling every 10 ms, or 100 times a second. The mechanism is using a 270 degree linear 10k Ohm potentiometer, and uses almost all of that range ( > 230 degrees) through gearing, and actual movement range. with that, there are about 3.79259 ticks per degree on the pot. While running, the velocity would be about 3 ticks per cycle. The problem arises when it is not moving, as there are a few readings that have near the same values as when it is not moving. I will try it with a longer sampling time, in an attempt to get more ticks per cycle, which should allow a better distinction between moving and not moving. The question then becomes: how do I use the velocity readings to change the setpoint of the PID controller? I would imagine that a timer would be needed, as I don't want it to think that it was stalled right when it started moving and thus immediately change the setpoint and not move. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|