How Can We Help?

Print

Motion Out

 

MotionOut is used to control a stepper output. It is a background task that, once executed, will continue to send signals to the motor until it has reached its programmed destination.

Call this MotionOut function only to modify its values and only during a single PLC cycle. Under no circumstances should it be called for each PLC cycle. Otherwise, you risk seeing position shifts.

While MotionOut will create the logical signals for your motor, you’ll need a driver to interface between your PLC and the motor.

To enable MotionOut, Press the ‘Setup Hardware’ button. It’s on the upper left of vBuilder. Your ‘Setup Hardware’ button may look a little different from the one on the left, depending on whether you’ve setup your hardware and on the specific hardware you’re using.

The last page of the Setup Hardware lets you set MotionOut (Stepper Output) options.

Shown below is what the setup page look like. (Step Out 1, Step Out 2, Step Out 3)

Above shows 1 device setup for MotionOut. You can set up a MotionOut for all ACE PLC.

You’ll need to specify 2 Digital Output Pins. One to control the Step signal and the other for the Direction Signal. Make sure you don’t select the same pin for both signals.

Placing a MotionOut block is simple. Below is the MotionOut Dialog box.

MotionOut needs to know:

  • Move motor to: Your desired destination.
    • MotionOut will move the Motor from where ever it starts to this destination. Maybe your motor’s current location is 200 and you’d like to move to a destination of 300. This would require the MotionOut to Move the Motor 100 steps. Use a number or I32 Tag for this.
  • at a rate of: Speed to travel (pulses per second).
    • Use a number or Tag(I16, UI16 or I32) for this.
  • with a soft start and soft length of: Soft start length (optional, but typically a good idea).
    • Motors often need to be brought up to speed over a period of time. This enables that.
    • Just tell it how long you’d like it to take (in milliseconds) to go from stand still to speed.
    • This will be applied to both ramp up and ramp down.
  • store current location: What I32 Tag you want to store the motor’s current location in.

 

Capturing a Transition During a Move

An advanced feature found in ACE PLC MotionOut functions is the ability to capture the exact step that a digital input transition occurs on.

That is a very important feature for application where a material is being moved through a machine and operations on that material are required at precise distances from the leading edge.

In that type of application, typically and optical sensor is used to sense the leading edge and the PLC program captures it.

To use the transition capture feature:

  • Select the “Store location when digital input transitions” check box in the dialog box.
  • Select the Digital Input that you want to use.
    • You can set to capture on either a rising edge – rises – or falling edge – falls.
  • Next, you must enter a i32 tag named variable for the PLC to place the sensed position.
  • Finally, select a tag bit to use to indicate that the transition has been captured.

 

Execute a task only once

Don’t forget that MotionOut is a background task
If you call it at each PLC cycle, you freeze the function for a few microseconds during configuration, so it doesn’t work during this period.
You should only call it when you need to modify its values.

 

Here, we will show how to have a state for execute a task only once, from top to bottom of the cycle, when the PLC boots.

This state will never run again until the next boot. Usually used to initialize variables.

  • SET a Coil in the beginning of your program
  • Use this BIT and the Rising edge contact

 

PWM signal output with a soft start of 5000 ms