RC servo motors are typically small motors limited in movement to 180 degrees.
They have 3 wires: ground, power and control.
To control the position, you send a pulse width modulated (PWM) signal to the control input. The percentage of ON-TIME determines the angle the servo will move to.
- Period: for most RC Servos is 20,000 microseconds (50Hz).
- ON-TIME: ACE have sinking transistor type outputs. That means that when they are “ON” a ground connection is made. The documentation for most RC Servo motors will talk about ON-TIME in terms of high voltage time. Thus you’ll invert the time mentioned in most documentation. Because of this, ON-TIME will typically be values between 19,000 and 18,000 microseconds, where 18,500 microseconds represents center position.
Wiring ACE to RC Servo
You can directly control your RC servo motor using your ACE’s outputs.
RC servo motor example all wired up
The ACE allow you to control as many RC Servo motors as you have digital outputs. So, if your PLC has 18 digital outputs, you can control up to 18 servos. They will all use the same Period, but may use their own ON-TIME.
RC servo motor programming example
Here are the files: RC-Servo.zip
- In State=1 we set the period to 20000 microseconds.
- In State=2 we take an analog input and scale it so that the analog min corresponds to the RC’s min and the analog max corresponds to the RC’s max value. We then Start the PWM, telling it to use this newly scaled value as the ON-TIME.