6 Motion Instructions & G-Code Instructions 6.4 O Pointer / M Pointer Explanations: 1. O100 is the start pointer of main control program. You need the main control program to activate OX0 ~ OX99 motion subroutines. O100 main control program ends when M102 instruction is executed. 2. OX0 ~ OX99 are the pointers for the 100 motion control subroutines and can be applied by the programming engineer for different motion routes. Register D1868 (CR72) stores the No. of subroutine, in which b14 or b15 has to be “1.” In addition, activate b12 of D1846 (CR50) or set M1074 = ON, and the motion subroutine will be enabled. See the example below. Example: 2 steps to activate OX99 motion subroutine:
(1) Set up the No. to be activated: D1868 = H’4063 (or H’8063, H’C063) (2) Enable OX99: D1846 = H’1000 or M1074 = ON 3. M2 is the instruction to end OX0 ~ OX99 motion subroutines. Program Example: In the program example below, N0000 ~ N0100 are O100 main control program; N0102 ~ N0304 are OX50 motion subroutine. No. of row Instruction List N0000 O100 N0001 N0002 LD M1000 MOV H8063 D1868 N0007 OUT M1074 : : : N0099 : OUT Y30 N0100 M102 N0101 N N0102 N0103 OX50 DRVZ N0104 ABS : : : N0304 : M2 DVP-PM Application Manual 6-40 Mnemonic Function Controllers Pointer for Main Program and Motion Subroutine O 20PM 10PM Main program pointer: O100 Motion subroutine pointer: OX0 ~ OX99 Explanation