6 Basic Usage of Motion Instructions and G-codes
Additional
remark
Relevant special data registers: Please refer to chapter 3 for more information.
D1848, D1849 Present command position of the X-axis
D1928, D1929 Present command position of the Y-axis
D2008, D2009 Present command position of the Z-axis
6.4 Descriptions of O Pointers/M-code Instructions
Instruction Function Applicable model
20PM
O
Program pointer
Description
Main program: O100
Motion subroutines: Ox0~Ox99
Explanation
O
100 is a main program pointer. The motion subroutines Ox0~Ox99 are
activated by the main program O100. M102 indicates the end of O100.
Ox0~Ox99 are motion subroutine pointers. Users can use them to create
different motion paths. A subroutine number is stored in D1868 (CR72). If users
want to store a subroutine number in D1868, they have to set bit 14 or bit 15 in
D1868 to 1. After bit 12 in D1846 is set to ON or M1074 is set to ON, the
execution of the Ox motion subroutine specified will start.
Example: Two steps to activate the motion subroutine Ox99 are as follows.
(1) Setting a number: D1868=H8063 (or H4063/HC063)
(2) Starting the execution of Ox99: D1846=H1000 or M1074=ON
M2: End of a motion subroutine
Example
The main program O100 is composed of N0000~N0100, and the motion
subroutine Ox50 is composed of N0102~N0304.
Line number Program
N0000 O100
N0001 LD M1000
N0002 MOV H8063 D1868
N0007 OUT M1074
: :
: :
N0099 OUT Y30
N0100 M102
N0101 NOP
N0102 OX50
N0103 DRVZ
N0104 ABS
: :
: :
N0304 M2
DVP-20PM Application
Manual
6-40