AH500 Motion Control Module Manual 2. Whenever an Ox motion subroutine is enabled, it is executed once. After O100 enables an Ox motion subroutine, the execution of the Ox motion subroutine will start from the starting flag in the Ox motion subroutine. After the ending instruction M2 in the Ox motion subroutine is executed, the execution of the Ox motion subroutine will stop. . . . O100 Main program Ox10 Motion subroutine X0.0 Cyclic scan It is executed once. Setting the Ox num ber Ox10, and setting bit 15 to ON. If X0.0 is ON, the motion subroutine Ox10 will be enabled. X0.0 is ON. If X0.0 is ON, the motion subroutine Ox10 will be enabled.
After the ending instruction M2 in Ox10 is executed, the execution of Ox10 will stop. (Ox10 is executed once. If Ox10 needs to be executed again, X0.0 has to be set to ON.) 3. There are four methods of disabling an Ox motion subroutine. If the STOP/RUN switch of an AH500 series motion control module is turned form the “RUN” position to the “STOP” position when the AH500 series motion control module is powered, SM072 will be OFF, O100 will stop, and Ox motion subroutines will not be executed. If an AH500 series motion control module is powered, users can use communication to set SR1030 to 0, or to set SM072 to OFF, and to stop the execution of Ox motion subroutines.
If an error occurs when an Ox motion subroutine is compiled or when an Ox motion subroutine is executed, the execution of the Ox motion subroutine will stop automatically. 4. An Ox motion subroutine supports basic instructions, applied instructions, motion instructions, and G-codes. Users can write a motion program according to their needs. They can control the motion of the axes of an AH500 series motion control module by setting the parameters of the axes. Basic instructions, applied instructions, motion instructions and G-codes must be used in the motion subroutines Ox0~Ox99. Ox motion subroutines can call P subroutines. Please refer to section 1.4 for more information. 5.
The description of Ox motion subroutines is shown below. 1-6 MOV 16#800A SR1052 SR1030 MOV 16#1000 SR10 . . . . . . MOVP K100 SR1020 MOVP K100 SR1021 . . . MOV 16#1000 SR10 MOVP K100 SR1020 MOVP K100 SR1021 Ox motion Description subroutine Enabling an Ox motion subroutine There are 100 Ox motion subroutines (Ox0~Ox99).
(If an Ox motion subroutine is a ladder diagram in PMSoft, the starting flag in the Ox motion subroutine will be set automatically, and users do not have to write the starting flag.) Disabling an Ending instruction M2 (If an Ox motion subroutine is a ladder diagram in PMSoft, the ending instruction M2 will be set automatically, and users do not have to write the ending instruction M2.) Ox motion subroutine