Page 1 of 1

Phidget motor control + Ph encoder + Ph Spatial 3/3/3

PostPosted: Wed Aug 17, 2011 10:01 pm
by leonhernando
Dear developers

I am trying to move a linear motor (attached in one end) like a lifting mechanical pendulum (where the linear motor have to changes in different angles).
I am comparing the position of the encoder (which is in one of axis of the mechanism) and the ph Spatial 3/3/3 (is the given position). The idea is measure the angle of the linear motor and goes to a pre-setup position or given angle. So if the value of the encoder is relative equal to the ph spatial (roll) the motor control should stop moving. If the value is different the motor should move increase or decrease the angle to meet the selected angle.

Could you please give me any idea how to do it?
Or if you could give a hand with one example, I’m really appreciated.
I have try, but still not quite on track...

Thanks you

hernando

Re: Phidget motor control + Ph encoder + Ph Spatial 3/3/3

PostPosted: Fri Aug 19, 2011 8:39 am
by DSP
Basically what you need to do is use the FlowStone PID module:

Example: http://www.dsprobotics.com/support/viewtopic.php?f=11&t=32

You can learn about PID on Wikipedia if your not sure, but basically it allows you to have a target position and an actual position, then the PID algorithm will move the motor until it reaches the target, smoothly and with no overshoot.