User manual

Publication 1768-UM001C-EN-P - November 2007
102 Develop Motion Applications
Programming Motion
Control
The controller gives you a set of motion control instructions for your axes and:
uses these instructions just like the rest of the Logix5000 instructions.
You can program motion control in these programming languages:
Ladder diagram (LD)
Structured text (ST)
Sequential function chart (SFC)
each motion instruction works on one or more axes.
each motion instruction needs a motion control tag. The tag uses a
MOTION_INSTRUCTION data type and stores the instruction’s
information status.
Motion Control Instruction
Example
Here is an example of a simple ladder diagram that homes, jogs, and moves
an axis.
ATTENTION
Use the tag for the motion control operand of motion instruction
only once. Reuse of the same motion control tag in other
instructions may cause unintended operation of the control
variables.
Motion Control Tag
If Initialize_Pushbutton = on and the axis = off (My_Axis_X.ServoActionStatus = off) then
The MSO instruction turns on the axis.
If Home_Pushbutton = on and the axis hasn’t been homed (My_Axis_X.AxisHomedStatus = off) then
The MAH instruction homes the axis.