A simple example of using the MotionOut function in Ladder to move a stepper motor to multiple locations
Stepper Motors are continuous rotation motors. These motors have a defined number of steps per rotation. You control position and speed by telling the motor :
- how many step
- which direction
The number of wires differ, but control done by sending step and direction signals.
If you use stepper motors within their limits, they can be very accurate. They do not, however have any feedback to tell you they are at the location you specified. If your application needs this feedback you can add it with an encoder.
Using vBuilder’s MotionOut functions, you can control up to 3 Stepper Motors per PLC.
Wiring ACE to stepper motor
Your PLC will provide the step and direction pulses, and take care of any needed ramping up/down of speed.
You will need a Stepper Driver to interface between the PLC’s step and direction signals and the Stepper Motor.
Often the inputs to Stepper Drivers include differential pairs for Step and Direction, consisting of Step+, Step-, Dir+ and Dir-.
All ACE digital outputs are sinking transistor type, so they can make the negative connections (Step- and Dir-) in this arrangement and you’ll connect the positive connections (Step+ and Dir+) to the VDC voltage you’re using to power your PLC.
Below is an example showing this wiring.
The Stepper Driver may include other options like Enable. These are often optional and can be controlled using an additional digital output.
PLC Programming for Stepper Motors
|Start out by pressing the “Setup Hardware button”.
After selecting your hardware, you’ll make it to the Motion Setup page (shown below). You will assign digital outputs to up to 3 stepper motors. Each Motor requires a Step and Direction Pin.
|Once you’ve configured your project for at least 1 Stepper Output, you’ll be able to use the MotionOut function.
Parameters are the following:
To control you’re motion, you’ll need 1 more tool: a compare decision block (shown below)
|You’ll compare your “CurrentLocation” Tag to your “MoveTo” value (or Tag).
When they are equal, you’ll know that your motion is completed.
Simple stepper motor program example in Ladder
You can download the program: MotionOut Ladder