1 Program Structure of DVP-PM 1.3 Structure of Pn Subroutine Pn subroutine is a general-purpose subroutine which can be called in O100 main program and OX motion subroutines. When Pn subroutine is called in O100 main program, the Pn subroutine area supports basic instructions and application instructions. When Pn subroutines is called in OX0 ~ OX99 motion subroutines, the Pn subroutine area supports basic instructions, application instructions (API), motion instructions (MON) and G-Code instructions. 1. How to enable Pn subroutine: z Call Pn subroutine in O100 main program. z Call Pn subroutine in OX motion subroutine. 2.
No matter Pn subroutine is called in O100 or OX, the execution will jump to Pn subroutine to execute the Pn subroutine once. When SRET (Pn subroutine ends instruction) is reached, the execution will return to the row under CALL Pn instruction and proceed with the remaining program as below. DVP-PM Application Manual 1-5 (*It will be inserted by PMSoft when compiling to IL instructions, therefore you don’t have to add it into ladder diagram.) End of OX M2, instruction indicates the end of OX subroutine (*It will be inserted by PMSoft when compiling to IL instructions, therefore you don’t have to add it into ladder diagram.) Activation 1.
When O100 main program is in RUN status, set M1074 = ON or D1846 b12 = 1 to _ enable OX motion subroutine by PMSoft. 2. When O100 main program is in RUN status, set M1074 = ON or D1846 b12 = 1 to _ enable OX motion subroutine through communication. 3. OX subroutine can be stopped by input signals at external control terminal (STOP0). Note: When you need to enable OX motion subroutine, make sure there are no other motion subroutines in operation. Execution Execute once whenever the subroutine is enabled. Re-enable it for the re-execution. Instruction supported Basic instructions, application instructions (API), motion instructions (MON), and G-Code instructions. Note:
Avoid pulse-type instruction when using basic instructions and application instructions. Quantity 100 OX motion subroutines are available. To activate more OX subroutines, please set up the number of OX (OXn) in D1868 and set M1074 = ON or D1846 b12 = 1 again. _ Features & functions 1. Motion subroutine especially for motion control. (Can be activated only by O100) 2. Offers the third axis (Z) control. See 6.4 G00 and G01 instructions for more details. 3. Can be enabled / disabled by controlling the external terminals, program design and communication. 4. Able to call Pn subroutine. 5. Can be placed in front of or after O100 main program and Pn subroutines.