Program Motion Control
The controller provides a set of motion control instructions for your axes:
- The controller uses these instructions just like the rest of the Logix 5000® instructions.
- Each motion instruction works on one or more axes.
- You can program by using motion control instructions in these programming languages:
- Ladder Diagram (LD)
- Structured Text (ST)
- Sequential Function Chart (SFC)
- Each motion instruction needs a motion control tag. The tag uses a MOTION_INSTRUCTION data type and stores the information status of the instruction.
For more information, see the Logix 5000 Controller Motion Instructions Reference Manual, publication MOTION-RM002.
ATTENTION:
Use each motion control tag in only one motion instruction. Unintended operation can result if you reuse the same motion control tag in other motion instructions, or if you write to any of the motion control tag elements.
In this example, a simple ladder diagram that homes, jogs, and moves an axis.
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.

If Jog_Pushbutton = on and the axis = on (My_Axis_X.ServoActionStatus = on) then the MAJ instruction jogs the axis forward at 8 units/second.

If Jog_Pushbutton = off then the MAS instruction stops the axis at 100 units/second². Make sure that Change Decel is Yes. Otherwise, the axis decelerates at its maximum speed.

If Move_Command = on and the axis = on (My_Axis_X.ServoActionStatus = on) then the MAM instruction moves the axis. The axis moves to the position of 10 units at 1 unit/second.

Provide Feedback