7
pause
X
,
U
,
P
0
~
9999.999 sec.
Program number
assign
,
times of repeat
P
1
~
9999
Tool offset
H
,
D
9999.999
Sequence number
P
,
Q
1
~
9999
2.4 Program Number and Block
Sequence number is used for distinguishing number of every blocks. Program number is used for
distinguishing the number of every program. Sequence number is represented for Nxx, and is composed of O and
following four numbers.
Program is begin with program number and is end of M30 or M99. Basic structure of block is as follows:
Table 2-4
1
2
3
4
5
6
7
8
9
10
1
1
N
G_
X
_
Y
_
Z
_
I
_ J_
K_
S_
F_
T
_
M_
;
Seq
uence
number
Prep
are
funct
ion
Size word
Spind
le
functi
on
Feed
funct
ion
To
ol
fu
nction
Auxi
liary
funct
ion
E
nd
m
ark
2.5 Main Program and Subprogram
When the same operation mode appears many times in a program, you can put this same mode into a
program which is regarded as a subprogram. The original program is the main program. Under normal
circumstances, the machine tool run according to the instruction from the main program. But when encountered
command about calling subprogram in main program, system will run the subprogram. When encountered
command about returning to the main program, system will return to the main program.
format:
O0000
;
subprogram number
……
……
M99;
end of subprogram
call subprogram format:
M98 P □□□ OOOO
;