We saw how to call a drilling or tapping subprogram to the main program. Now how to input some complex program which is repeated by no. of time.
You know very well that in incremental program system every motion origin is its previous position.
Here there are three slot in square plate, and slot dimension are same so that all liner movement will be same in incremental program.
Here we are making one sub program for only one square in incremental syatem and call it main program.
Main Program
%
O0001 (Main Program)
N1 G0 G91 G28 Z0
N2 G90 G54 X0 Y0 M03 S2000
N3 Z5
N4 G01 X25 Y25 F200
N5 M98 P0002 ⇐ (Call Subprogram)
N6 G01 G54 X60 Y60
N7 M98 P0002 ⇐ (Call Subprogram)
N8 G01 G54 X100 Y100
N9 M98 P0002 ⇐ (Call Subprogram)
N10 Z10
N11 G0 G91 G28 Z0
N12 M05
N13 M30
%
Subprogram
%
O0002 (Sub Program)
N1 G91 G01 Z-5 F50
N2 X25
N3 Y25
N4 X-25
N5 Y-25
N6 Z5
N7 M99
%