
14. Coordinates System Setting Functions
14.10 Workpiece Coordinate System Setting and Offset
528
(Example 5)
Program example when continuously using 48 sets of added workpiece coordinate
system offsets.
In this example, the offsets for each workpiece are set beforehand in P1 to P48 when
48 workpieces are fixed on a table, as shown in the drawing below.
P8
P7
P1
P2
P3
P4
P5
P6
P9
P10
P16
P15
P14
P13
P12
P11
P24
P23
P17
P18
P19
P20
P21
P22
P25
P26
P32
P31
P30
P29
P28
P27
P40
P39
P33
P34
P35
P36
P37
P38
P41
P42
P48
P47
P46
P45
P44
P43
L1000
G28 XYZ ;
#100=1 ;
G90 ;
WHILE [#100LE48]D01 ;
G54.1 P#100 ;
G22 L1001 ;
#100=#100+1 ;
END1 ;
G28 Z ;
G28 XY ;
M02 ;
Reference position return
Initialize added workpiece coordinate system
subprogram No.
Absolute value mode
Repeat subprogram No. to 48
Set workpiece coordinate system
Call sub-program
Subprogram No. +1
Return to reference position
L1001
G43 X-10.Y-10.Z-100.H10.; Contour
G01 X-30.;
Y-30.;
X-10.;
Y-10.;
G00 G40 Z10.;
G98 G81·X-20.Y-15.Z-150.R5.F40; Drilling
X-25.Y-20.;
X-20.Y-25.;
X-15.Y-20.;
G80 ;
G23 ;