Mitsubishi — 1.4 Structure of P Subroutines

Chapter 1 Framework of an AH500 Series Motion Control Module 5. The description of P subroutines is shown below. 1-9 P subroutine Description Enabling a P subroutine There are 256 P subroutines (P0~P255). (If a P subroutine is a ladder diagram in PMSoft, the starting flag in the P subroutine will be set automatically, and users do not have to write the starting flag.) Disabling a P subroutine Ending instruction SRET (If a P subroutine is a ladder diagram in PMSoft, the ending instruction SRET will be set automatically, and users do not have to write the ending instruction SRET.) Executing a P 1. O100 can call P subroutines. 2. Ox motion subroutines can call P subroutines.

subroutine Operation Whenever a P subroutine is enabled, it is executed once. If a Pn subroutine needs to be executed again, it has to be enabled again. characteristic Instruction 1. If P subroutines are called by O100, the P subroutines will support basic instructions and applied instructions. 2. If P subroutines are called by Ox motion subroutines, the P subroutines will support basic instructions, applied instructions, motion instructions, and G-codes. Note: If P subroutines are called by Ox motion subroutines, users have to avoid using pulse instructions. Number There are 256 P subroutines in a program. Characteristic and function 1. P subroutines are general subroutines. 2.

P subroutines can be called by O100 and Ox motion subroutines. 3. If P subroutines are used with O100 and Ox motion subroutines, the P subroutines, O100, and the Ox motion subroutines can be arranged in any order.