Tutorial: Using the MAM Instruction in Studio 5000

The Motion Axis Move (MAM) is a key instruction in Studio 5000 for motion control of Allen Bradley servo systems. This tutorial guides you on how to use the MAM instruction to control the movement of a servo axis.


A working knowledge of Studio 5000 and ladder logic programming.

An active Studio 5000 project with a configured servo axis.


Step 1: Open Your Project in Studio 5000

Launch Studio 5000 and open the project that contains your configured servo axis. You’ll need to know the name of the axis you wish to control.

Step 2: Find the Ladder Logic Program

Navigate to the ladder logic routine where you want to add the MAM instruction. This could be the MainProgram routine or a subroutine, depending on your application.

Step 3: Insert the MAM Instruction

In your chosen ladder logic routine, you’ll need to add a rung that contains the MAM instruction. This can be found under the “Motion” category in the instruction palette.

Step 4: Configure the MAM Instruction

Once you’ve added the MAM instruction to your rung, you’ll need to configure its parameters:

  • Axis – This is the name of the axis you want to move. You should have defined this when you added your servo drive to the I/O Configuration.
  • Distance – This is the distance you want the axis to move, in user units. You can enter a specific value or use a tag that contains the desired value.
  • Velocity – This is the speed at which you want the axis to move, in user units per second. Again, you can use a specific value or a tag.
  • Acceleration – This is the rate of change of velocity that the axis will use to reach the target velocity, expressed in user units per second per second.
  • Deceleration – This is the rate of change of velocity that the axis will use to come to a stop, also in user units per second per second.

Make sure to enter appropriate values for your specific system to ensure safe operation.

Step 5: Activate Your Rung

To execute the MAM instruction, the rung it’s on needs to be activated. You can do this by using an input condition or by tying the rung to an event in your process. Remember to ensure the Servo axis is enabled and ready before executing the MAM instruction.

Step 6: Test Your Program

Once you’ve completed these steps, you can test your program by putting your PLC in run mode and triggering the MAM instruction. Monitor your servo axis to ensure it’s moving the correct distance at the correct velocity.


The MAM instruction is a powerful tool for controlling servo systems in Studio 5000. By adjusting the Distance, Velocity, Acceleration, and Deceleration parameters, you can achieve precise and controlled movements for your servo axis. Remember, when working with motion control, always prioritize safety and make sure your movements are within the mechanical limits of your system.

PLC Programming an Allen-Bradley Servo Accel and Decel

The video below shows how to program a MAM instruction using Studio 5000

Throughout the video, I will give you a detailed reason so please watch the whole video for the best knowledge share.

I hope that with the video above, you easily picked up how to program a MAM instruction in Rockwell Automation’s Studio 5000.

I will be putting together more programming videos and articles upon request, I already have several ideas and will be starting to add more videos to my YouTube channel which is Shane Welcher

I would love to hear what you guys think so far as I am trying to get this website whipped into shape.

Drop me a comment here or on my YouTube channel.



Copyrighted.com Registered & Protected NMM4-RR3R-ZMC7-17XE

Check out our training center to see what we have to offer

Check out our training center to see what we have to offer

Online PLC Support Training Video Minutes Taught

MAM Instruction