Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - servo controller

(you are viewing a thread; or go back to list of threads)

servo controller (by Rogerio Francisco)
Is is possible to control servo motors using thid program ladder. If possible give me an example please.
Thank you.
Thu Sep 3 2009, 10:25:20
(no subject) (by Jonathan Westhues)
It depends what you mean by a servo. If you mean a "hobby servo" (like they use on radio-controlled cars), then you just need to generate a PWM output. You could do one of them using the hardware PWM, or more of them using software PWM like

http://cq.cx/ladder-forum.pl?action=viewthread&parent=3

If you mean a real servo (where you measure its position somehow, and close the loop with your own controller) then things are more complicated.

Look at the attachment for an example of a PI controller, that adjusts the PWM duty cycle to achieve a programmed setpoint on an analog input.

You could use something like that to do a servo controller yourself (though of course that should be a PD controller, not PI). But it would be simpler to use something like a Gecko drive, and just generate the step and direction signals.
Thu Sep 3 2009, 15:50:19, download attachment pi-controller.ld
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):