Click here to learn the biblical way to get to heaven! (The most important page on this site)


Disclaimer: This document is written in the hope that you can utilize for your own education to gain knowledge of PLC systems (should you decide to utilize this document). Although I believe the information in this document to be accurate, it is YOUR responsibility to verify this information before implementing it in any way, especially when damage to personnel or equipment could result. By continuing to read this document, you agree to hold no one who writes, modifies, or distributes this document liable in any way (even negligence). Due to the wide variety of plant applications, some of the examples in this document may be prohibited at your location, or could cause damage to equipment, or harm personnel.
[Visit my Church Website] -- [Return to Index Page] -- [View Training Courses] -- [Contact ATI for Training] *Copyright 2005
Author: Ricky Bryce (Montgomery County, IL)
VPS Hosting Referral Code MJDCDJYou can have your very own virtual server though VPSLink! Using REFERRAL code MJDCDJ you will receive a 10% discount on your new account, and I will get a service credit on my account. My personal preference is the Link 2 package running XEN for starting out (You can upgrade any time). You can choose from a variety of Linux distributions such as CENTOS, Fedora, Debian, and Ubuntu. This is a great package for learning Linux, and setting up your own web page, or email server.

Moving an Axis


Simple movement of an axis is very easy to accomplish. First you must turn the servo on, then you must move the asis. The MSO command (Motion Servo On) can be used in logic to energize the servo, and the MAM command (Motion Axis Move) can be used to cause movement of the axis. The MSF command can be used to shut off the servo.



  1. From the Controller Organizer window, open the MainRoutine of the MainProgram.

  2. With rung 0 highlighted blue, type MSO and press enter. Or locate the motion commands on the instruction toolbar, and drag down the MSO instruction.



  3. Double click the ? Next to Axis, and select the axis we created earlier. Remember it is a controller scoped tag.


  4. The MSO instruction also needs a control scructure. On the Motion Control field of the MSO instruction, we must create a control tag. An easy way to do this is to type the name of the tag where the question mark is (Use MSOControl) then press enter.
    .


  5. Then right click on the tag to create it (select new).

  6. Next the New Tag dialog box appears. The data type will default correctly to MOTION_INSTRUCTION, so just press OK.



  7. Now we need a condition before the MSO instruction that will cause the servo to energize. This could be any bit or condition. (such as a pushbutton, or the done bit from a timer). For this example, we will simply toggle a bit. From the instruction toolbar, drag down an XIC instruction, a branch, and the “OTU” instruction. Place them on the rung as shown:


  8. On one of the question marks, type 'servo_on'.



  9. Since this is an undefined tag, we must declare the tag in the tag database. We'll just make this a controller tag to make things simple. To declare the tag, right click on the tag name, and select New 'servo_on' from the options list.

  10. In the New Tag window, be sure the tag is going into the controller tag database, then hit OK.




  11. Drag the servo_on tag you just created to the other instruction (having the ?) You will see a grey box as you approach the ?. Move close enough, and it will turn green. When you see the green oval you can drop the tag. Both instructions now use the same variable. You will see that as soon as you toggle the servo on later in this lesson, the MSO will be executed, then the processor will unlatch (or shut off) the bit you toggled on.


  12. You are ready to finish your online edit, and energize the servo. Click 'Finalize Edits' in the online edit toolbar. This is the equivalent of doing an accept, test, and assemble, but all in one step.

  13. You will get a warning asking you to ensure you want to finalize the edits. Read the warnings, then choose Yes.


  14. Next right click the servo_on tag on the XIC instruction, and toggle the bit. The servo should come on. You will notice the servo_on bit does not appear to turn green. This is because as soon as we turn the bit on, the MSO is executed, and the bit shut off by the unlatch. We only need to pulse the MSO command to turn on the servo.



  15. Using a similar procedure as documented above. Add the MSF instruction so we can shut the servo off. Don't forget to right click on the MSFControl tag and the servo_off tag to declare them for use in logic. You must also finalize your edits as you did when entering the MSO instruction. When finished your MSF rung should look like this:

  16. Right click and toggle the servo_off tag on the XIC. Ensure the servo shuts off when the command is executed.

  17. Now that you know now to turn the servo on and off, let's set up the MAM command in logic (Motion Axis Move). We should be able to cause movement of the axis.

  18. On the end rung, type MAM and press enter. You could also drag a new rung, and the MAM command from the instruction toolbar if you wish.


  19. Finish setting up the new rung as shown below: Dont forget to right click on the MAMControl, servo_move, and MyPosition tags to declare them. You must also finalize edits when you are finished since we are online with the controller.


  20. Toggle the servo_move tag. See if the axis moves. Change the position. Remember there are 100 revolutions per mm on the position, so changing the position from 2 to 3 will cause 100 revolutions in the positive direction. From 3 to 2 would cause 100 revolutions in the negative direction. After changing the position, toggle the servo_move tag again to execute the MAM command. If you were to look in the help file, a move type of 0 means the move will be absolute. This means that you enter exactly where you want the axis to be in the position field. For incremental moves, you enter how far you want the axis to move from it's current position. Merge is used to terminate motion produced by another motion instruction.