Author Topic: Servo Motor and SC  (Read 6141 times)

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
Servo Motor and SC
« on: January 10, 2018, 09:31:20 AM »
I have been asked if there is anyway to control the position of a Servo motor based on the HSC value
I need to use a 180 degree servo motor and ave it at one end when the encoder value is zero and at the other end say wen the encoder value is 4000.
Does anyone know if this scenario this even possible to do with a FX series PLC?

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Servo Motor and SC
« Reply #1 on: January 10, 2018, 04:06:27 PM »
Lorne,

If you are talking about the servos used for radio control models, the answer is yes.  The position of these servos is determined by the width of a pulse that is sent to the servo. Most servos are centered when the pulse width is 1.5 milliseconds.  The typical range of pulse widths for these servos is from 1.0 to 2.0 milliseconds.  Your 180 degree servo may require a bit wider range of pulse widths to turn the full amount.

The Fx series PLCs all support some number of PWM (pulse width modulation) outputs.  It is possible to program these outputs to produce the pulses for RC-type servos.  The PWM mechanism can handle the required range of pulse widths and repetition rates expected by these servos.

You will have to deal with the fact that the PLC's PWM outputs go from 0 to 24V and the servo's inputs are from 0 to about 5 volts.  There are notes in the user manuals in chapter 11 that shows typical circuits to interface the PLCs to RC-type servos to solve the signal level issues.

As an alternative to using the PLC's PWM outputs, you can purchase low cost RC-servo controllers that can be connected to the PLC's RS232. The Pololu "Serial 8-Servo Controller" is a widely available controller.  This controller can handle 8 servos at the same time.  The PLC sends a 5 or 6 byte command via its serial port to position the servos.  

A nice thing about using an external controller is that you can set a parameter that determines how quickly the servo moves.  A typical servo moves about 60 degrees in about 0.2 seconds.  If you would like the have the servo move more slowly, say take 2 seconds to move 60 degrees, it is easy with the external controller.  If you need to do this with the PLC, you will have to change the PWM outputs several times with delays between each change.  This is possible to do with the PLC, but it is a little complex (fun?).

Best regards,

Gary D*ckinson

Lorne Van Dusen

  • Jr. Member
  • Posts: 93
  • I'm a old guy
    • View Profile
Re:Servo Motor and SC
« Reply #2 on: January 23, 2018, 06:43:57 AM »
Gary thanks for your reply
However I have decided to use a stepper motor instead.
The FX series PLC'S have an excellent setup for controlling a stepper motor.
 
« Last Edit: January 23, 2018, 09:22:38 PM by support »