Programming instructions

13-2
NC Programming Practices NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
Example NC program
N0000 G00
N0001 S5000
N0002 M03
N0003 F10000
N0004 X100 Y50
Optimized for time, spindle starts after the move:
N0000 G00 X100 Y50 F10000 S5000 M03
Optimized for time, spindle starts before the move:
N0000 M03 S5000
N0001 G00 X100 Y50 F10000
The priority for processing an NC block in the NC memory is as follows:
Block
number
Label aux. fct.
before
move
G codes Variables Axis
values
IPO
parameter
F value S
value
aux. fct.
after
move
Pallet
com-
mands
Tool com-
mands
Events Proc.
com-
mands
Program
control
commands
N1234 .ENDE M03 G01 @100=x X100
Y100
I0
J50
F1000 S800 M03 SEL 1 MTP T6 SE 5 DP 1 HLT
While all of the above NC commands can, in theory, be programmed
in a single NC block, the maximum block length is limited to 240
characters.
While “auxiliary M-functions" can be used from all 16 groups, no more
than four auxiliary functions (S, M, Q words) can be programmed in a
single NC block.
Note:
Avoid repeating functions (G-codes) which are already active.
Remember which functions are modally active as a
consequence of the "power-on status."
Example NC program
N0000 G07 G09 G40 G43 G47 G53 G62 G90 G94 RAD
power-on states
N0001 G00 G90 S5000 M03 F10000 X100 Y50
N0002 G00 G90 F10000 X200 Y50
N0003 G01 G90 F10000 Y100
Time-optimized:
N0000 G00 X100 Y50 F10000 S5000 M03
N0001 X200
N0002 G01 Y100
Note:
Calculate all constants when you create the program, and
assign these constants without using equal signs.
Example NC program
N0000 DEG X=100 Y=20+100*SIN(30)
Time-optimized:
N0000 X100 Y70
Note:
Avoid using NC commands that stop NC block processing.