Mitsubishi — 8.2.2 Design Example Program

8 Application Examples 8.2.2 Design Example Program To design the example program, we can divide the program into four sections including OX0 ~ M2, O100 ~ M102, P255 ~ SRET and P0 ~ SRET explained below. 1. OX0 ~ M2: set up function parameters of X, Y axes When DVP-PM is in AUTO status and motion subroutine (OX) is ready (M1792 = ON), set ON X0 to ennable OX0 motion subroutine. OX0 will set up parameters for zero return, JOG speed, and input terminal polarity on X, Y axes. Next, enable zero return and move to (-200000, -200000) on X, Y axes by 100kHz then reset the current position to 0 and call P0 subroutine. OX0 subroutine will end when the execution of P0 subroutine is completed.

If you need to set up other control modes, please refer to explanations on special registers in Chapter 3. Ladder diagram: Operation: Zero return speed (V RT ) of X axis = 200kHz Zero return deceleration speed (V CR ) of X axis = 200kHz Zero return speed (V RT ) of Y axis = 200kHz Zero return deceleration speed (V CR ) of Y axis = 200kHz JOG speed of X axis = 100kHz JOG speed of Y axis =100kHz Set up input terminal polarity of X, Y axes DRVZ Enable zero return on X, Y axes DRV X-200000 FX100000 Y-200000 FY100000 Move to (-200000,-200000) on X, Y axes by 100kHz. M1000 Clear the current position of X axis as 0 Clear the current position of Y axis as 0 Call P0 subroutine 2. O100 ~ M102:

main program control and M1792 (indicating ready status of OX) in the program are ON, OX0 subroutine will be enabled. You can O100 main program controls whether to enable OX0 subroutine. When X0 (drive contact for enabling OX0) DVP-PM Application Manual 8-8 BRET DMOV K200000 D1828 DMOV K200000 D1830 DMOV K200000 D1908 DMOV K200000 D1910 DMOV K100000 D1826 DMOV K100000 D1906 MOV H3838 D1799 DMOV K0 D1848 DMOV K0 D1928 CALL P0