� When the skip signal is input during operation sequence 3 or 6 (movement), the tool returns to the X (Z) coordinate at which the cycle started after the movement specified by X (Z) is completed.
Skip Signal (End)
(End)
Skip Signal
X, (Z), I, J, and K must all be specified in incremental mode.
I, J, X, and Z in canned cycles are modal data common to G75, G77, G78, and G79. They remain valid until new data is specified. They are cleared when a group 00 G code other than G04 or a group 01 G code other than G75, G77, G78, and G79 is specified.
� -%�� ��"� �
Limitations
� X(Z), I, J, K
� Clear
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
191
A continuous–feed surface grinding cycle is performed.
G78
G78 I_ (J_) K_ X_ F_ P_ L_ ;
I
I(J)
X
P(Dwell) (F)
P(Dwell) (F)
X
Z
I_ : Depth–of–cut 1 (A sign in the command specifies the direction of cutting.)
J_ : Depth–of–cut 2 (A sign in the command specifies the direction of cutting.)
K_ : Total depth of cut (A sign in the command specifies the direction of cutting.)
X(Z)_ : Range of grinding (A sign in the command specifies the direction of grinding.)
R_ : Feedrate for I and J F_ : Feed rate P_ : Dwell time L_ : Grinding–wheel wear compensation
(Only for continuous dressing)
�
�
The continuous–feed surface grinding cycle consists of four operation sequences. Operations � to � are repeated until the depth reaches the total depth of cut specified in address K. In the single block stop mode, operations � to � are performed every cycle start. � Dwell Grinding Dwell � Grinding (in reverse direction)
13.3.3 Continuous–Feed Surface Grinding Cycle (G78)
Format
Explanations
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
192
When J is omitted, it is assumed to be 1. J is valid only in the block where it is specified.
X, (Z), I, J, and K must all be specified in incremental mode.
I, J, X, and Z in canned cycles are modal data common to G75, G77, G78, and G79. They remain valid until new data is specified. They are cleared when a group 00 G code other than G04 or a group 01 G code other than G75, G77, G78, and G79 is specified.
When the total depth of cut is reached during cutting using I or J, the subsequent operation sequences (up to �) are executed, then the cycle terminates. In this case, no further cutting is performed after the total depth of cut is reached.
� Chart of operation in which the total depth of cut is reached by cutting specified by I and J:
I
J
K
I
K
�
�
�
�
� Chart of operation in which the total depth of cut is reached during cutting specified by I and J:
I
J
K
I
K
�
�
�
�
Restrictions
� 4
� I, J, K, X
� �� �
� Operation performed when the total depth of cut is reached
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
193
An intermittent–feed surface grinding cycle is performed.
G79
G79 I_ J_ K_ X_ R_ F_ P_ L_ ;
I
J
X
(R)
P
(F)
� P
X
Z
� (F)
(R)
I_: Depth–of–cut 1 (A sign in the command specifies the direction of cutting.)
J_ : Depth–of–cut 2 (A sign in the command specifies the direction of cutting.)
K_ : Total depth of cut (A sign in the command specifies the direction of cutting.)
X(Z)_ : Range of grinding (A sign in the command specifies the direction of grinding.)
R_ : Feedrate for I and J F_ : Feedrate for X (Z) P_ : Dwell time L_ : Grinding–wheel wear compensation (Only for continuous dressing)
�
�
The intermittent–feed surface grinding cycle consists of six operation sequences. Operations � to � are repeated until the depth reaches the total depth of cut specified at address K. In the single block stop mode, operations � to � are performed every cycle start.
� Cutting is performed along the Z–axis in cutting feed mode for the amount specified by I (depth of cut 1). The feedrate is specified by R.
Dwell is performed for the time specified by P.
Cutting feed is performed for the amount specified by X (or Z). The feedrate is specified by F.
� Cutting is performed along the Z–axis in cutting feed mode for the amount specified by J (depth of cut 2). The feedrate is specified by R.
� Dwell is performed for the time specified by P.
� Feeding is performed in the reverse direction for the amount specified by X at a feedrate specified by F.
13.3.4 Intermittent–Feed Surface Grinding Cycle (G79)
Format
Explanations
� Grinding wheel cutting
� Dwell
� Grinding
� Grinding wheel cutting
� �3���
� Grinding (return direction)
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
194
X, (Z), I, J, and K must all be specified in incremental mode.
I, J, X, and Z in canned cycles are modal data common to G75, G77, G78, and G79. They remain valid until new data is specified. They are cleared when a group 00 G code other than G04 or a group 01 G code other than G75, G77, G78, and G79 is specified.
������������
� 5/ 6/ 4/ 7
� �� �
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
195
This function enables continuous dressing. When G75, G77, G78, or G79 is specified, grinding wheel cutting and dresser cutting are compensated continuously according to the amount of continuous dressing during grinding.
Specify an offset number (grinding–wheel wear compensation number) at address L in the block containing G75. The compensation amount set in the offset memory area corresponding to the specified number is used as the amount of dressing. Up to 400 offset numbers (L1 to L400) can be specified. Compensation amounts must be set beforehand in offset memory corresponding to offset numbers from the MDI panel. When L is omitted or L0 is specified in a surface grinding canned cycle block, compensation is not performed.
Compensation is performed for every grinding operation (every movement along the X–axis) in the operation sequences of a canned grinding cycle. While the tool moves along the X–axis, compensation is performed along the Y–axis (grinding wheel cutting) and the V–axis (dresser cutting) for simultaneous three–axis interpolation. The travel distance (compensation amount) along the Y–axis is the same as specified dressing amount, and the travel distance along the V–axis is twice as long (diameter).
13.4 GRINDING–WHEEL WEAR COMPENSATION BY CONTINUOUS DRESSING (FOR GRINDING MACHINE)
Explanations
� Specification
� Compensation
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
196
Compensation amounts set in offset memory can be modified by using the external tool compensation function or programming (by changing offsets using custom macro variables). With these functions, the compensation amount for the diameter of the dressed grinding wheel can be changed. If the compensation amount associated with the offset number specified in the H code is smaller than the minimum grinding wheel diameter specified in parameter 5030 when programmed compensation (using G43 or G44) is performed, a signal is output to the PMC.
X
Workpiece
2a
a X
YV
Dresser
Grinding wheel
a : Amount of dressing
Checking the Minimum Grinding Wheel Diameter (For Grinding Machine)
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
197
Every time an external signal is input, cutting is performed by a fixed amount according to the programmed profile in the specified Y–Z plane.
G161 R_ ;
G160 ;
profile program
Specify the start of an operation mode and profile program. Also specify the depth of cut in R.
Program a workpiece figure in the Y–Z plane using linear interpolation (G01) and/or circular interpolation (G02 or G03). One or more blocks can be specified.
Cancel the operation mode (end of the profile program).
Do not specify codes other than G01, G02, and G03 within the profile program.
70.0 70.080.0
N1
N2
N3
R=67.000
α
�
�
O0001 ; : N0 G161 R10.0 ; N1 G91 G01 Z–70.0 F100 ; N2 G19 G02 Z–80.0 R67.0 ; N3 G01 Z–70.0 ; N4 G160 ; :
In the above program, every time the in–feed cutting start signal is input, the tool is moved by 10.000 along the machining profile shown above. α= Travel distance for each in–feed control cutting start signal input The feedrate is programmed with an F code.
13.5 IN–FEED GRINDING ALONG THE Y AND Z AXES AT THE END OF TABLE SWING (FOR GRINDING MACHINE)
Format
Explanations
� G161 R_
� Profile program
� G160
Restrictions
� Profile program
Examples
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
198
Chamfering and corner rounding blocks can be inserted automatically between the following: ⋅Between linear interpolation and linear interpolation blocks ⋅Between linear interpolation and circular interpolation blocks ⋅Between circular interpolation and linear interpolation blocks ⋅Between circular interpolation and circular interpolationblocks
, C_
, R_
Chamfering
����� �
When the above specification is added to the end of a block that specifies linear interpolation (G01) or circular interpolation (G02 or G03), a chamfering or corner rounding block is inserted. Blocks specifying chamfering and corner rounding can be specified consecutively.
After C, specify the distance from the virtual corner point to the start and end points. The virtual corner point is the corner point that would exist if chamfering were not performed.
C
C
Hypothetical corner intersection
Inserted chamfering block
(1) G91 G01 X100.0 ,C10.0 ; (2) X100.0 Y100.0 ;
After R, specify the radius for corner rounding.
(1) G91 G01 X100.0 ,R10.0 ; (2) X100.0 Y100.0 ;
Center of a circle with radius R
R
13.6 OPTIONAL ANGLE CHAMFERING AND CORNER ROUNDING
Format
Explanations
� Chamfering
� Corner R
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
199
N001 G92 G90 X0 Y0 ; N002 G00 X10.0 Y10.0 ; N003 G01 X50.0 F10.0 ,C5.0 ; N004 Y25.0 ,R8.0 ; N005 G03 X80.0 Y50.0 R30.0 ,R8.0 ; N006 G01 X50.0 ,R8.0 ; N007 Y70.0 ,C5.0 ; N008 X10.0 ,C5.0 ; N009 Y10.0 ; N010 G00 X0 Y0 ; N011 M0 ;
0 10.0 20.0 30.0 40.0 50.0 <IP_ADDRESS>
10.0
20.0
30.0
40.0
50.0
60.0
70.0
Y
XN001
N002 N003
N005
N004
N006
N007
N008
N009
N010 N011
Examples
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
200
Chamfering and corner rounding can be performed only in the plane specified by plane selection (G17, G18, or G19). These functions cannot be performed for parallel axes.
A block specifying chamfering or corner rounding must be followed by a block that specifies a move command using linear interpolation (G01) or circular interpolation (G02 or G03). If the next block does not contain these specifications, P/S alarm No. 052 is issued.
A chamfering or corner rounding block can be inserted only for move commands which are performed in the same plane. In a block that comes immediately after plane switching (G17, G18, or G19 is specified), neither chamfering nor corner rounding can be specified.
If the inserted chamfering or corner rounding block causes the tool to go beyond the original interpolation move range, P/S alarm No.055 is issued.
CC
G91 G01 X30.0 ; G03 X7.5 Y16.0 R37.0 ,C28.0 ; G03 X67.0 Y–27.0 R55.0 ;
The tool path without chamfering is indicated with a solid line.
Chamfering block to be inserted
In a block that comes immediately after the coordinate system is changed (G92, or G52 to G59) or a return to the reference position (G28 to G30) is specified, neither chamfering nor corner rounding can be specified.
When two linear interpolation operations are performed, the chamfering or corner rounding block is regarded as having a travel distance of zero if the angle between the two straight lines is within +1 . When linear interpolation and circular interpolation operations are performed, the corner rounding block is regarded as having a travel distance of zero if the angle between the straight line and the tangent to the arc at the intersection is within +1 . When two circular interpolation operations are performed, the corner rounding block is regarded as having a travel distance of zero if the angle between the tangents to the arcs at the intersection is within +1 .
The following G codes cannot be used in a block that specifies chamfering or corner rounding. They also cannot be used between chamfering and corner rounding blocks that define a continuous figure. ⋅G codes of group 00 (except G04) ⋅G68 of group 16
Corner rounding cannot be specified in a threading block.
DNC operation cannot be applied to optional–angle chamfering or corner rounding.
Restrictions
� Plane selection
� Next block
� Plane switching
� Exceeding the move range
� Coordinate system
� Travel distance 0
� Unavailable G codes
� Threading
� DNC operation
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
201
Upon completion of positioning in each block in the program, an external operation function signal can be output to allow the machine to perform specific operation. Concerning this operation, refer to the manual supplied by the machine tool builder.
G81 IP_ ; ( IP_ Axis move command )IPIP
Every time positioning for the IP_ move command is completed, the CNC sends a external operation function signal to the machine. An external operation signal is output for each positioning operation until canceled by G80 or a group 01 G code.
No external operation signals are output during execution of a block that contains neither X nor Y.
G81 can also be used for a drilling canned cycle (II–13.1.4). Whether G81 is to be used for an external motion function or for a drilling canned cycle is psecified with EXC, bit 1 of parameter No.5101.
13.7 EXTERNAL MOTION FUNCTION (G81)
Format
Explanations
Restrictions
� A block without X or Y axis
� Relationship with canned cycle G81
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
202
By specifying indexing positions (angles) for the indexing axis (one rotation axis, A, B, or C), the index table of the machining center can be indexed. Before and after indexing, the index table is automatically unclamped or clamped .
Specify an indexing position with address A, B, or C (set to bit 0 of parameter ROTx No.1006). The indexing position is specified by either of the following (depending on bit 4 of parameter G90 No.5500):
1. Absolute value only
2. Absolute or incremental value depending on the specified G code: G90 or G91
A positive value indicates an indexing position in the counterclockwise direction. A negative value indicates an indexing position in the clockwise direction. The minimum indexing angle of the index table is the value set to parameter 5512. Only multiples of the least input increment can be specified as the indexing angle. If any value that is not a multiple is specified, an P/S alarm (No. 135) occurs. Decimal fractions can also be entered. When a decimal fraction is entered, the 1’s digit corresponds to degree units.
0° –45°
+60° G90 B–45.0 ; or G91 B–105.0;
A Value specified for rotation from A to B (case 2 described above)
B
The direction of rotation and angular displacement are determined by either of the following two methods. Refer to the manual written by the machine tool builder to find out which method is applied.
1. Using the miscellaneous function specified in parameter No. 5511 (Address) (Indexing position) (Miscellaneous function); Rotation in the negative direction (Address) (Indexing position); Rotation in the positive direction (No miscellaneous functions are specified.) An angular displacement greater than 360° is rounded down to the corresponding angular displacement within 360° when bit 2 of parameter ABS No. 5500 specifies this option. For example, when G90 B400.0 (miscellaneous function); is specified at a position of 0 , the table is rotated by 40°in the negative direction.
13.8 INDEX TABLE INDEXING FUNCTION
Explanations
� Indexing position
� ��������� �� � ��� ��
��� ����
PROGRAMMINGB–64124EN/01 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
203
2. Using no miscellaneous functions By setting to bits 2, 3, and 4 of parameter ABS, INC,G90 No.5500, operation can be selected from the following two options. Select the operation by referring to the manual written by the machine tool builder.
(1)Rotating in the direction in which an angular displacement becomes shortest This is valid only in absolute mode. A specified angular dis–placement greater than 360° is rounded down to the correspond–ing angular displacement within 360° when bit 2 of parameter ABS No.5500 specifies this option. For example, when G90 B400.0; is specified at a position of 0, the table is rotated by 40° in the positive direction.
(2)Rotating in the specified direction In the absolute mode, the value set in bit 2 of parameter ABS No.5500 determines whether an angular displacement greater than 360° is rounded down to the corresponding angular displacement within 360°. In the incremental mode, the angular displacement is not rounded down. For example, when G90 B720.0; is specified at a position of 0, the table is rotated twice in the positive direction, when the angular displacement is not rounded down.
The table is always rotated around the indexing axis in the rapid traverse mode. Dry runs cannot be executed for the indexing axis.
WARNING If a reset is made during indexing of the index table, a reference position return must be made before each time the index table is indexed subsequently.
NOTE 1 Specify the indexing command in a single block. If the
command is specified in a block in which another controlled axis is specified, P/S alarm (No.136) occurs.
2 The waiting state which waits for completion of clamping or unclamping of the index table is indicated on diagnostic screen 12.
3 The miscellaneous function specifying a negative direction is processed in the CNC. The relevant M code signal and completion signal are sent between the CNC and the machine.
4 If a reset is made while waiting for completion of clamping or unclamping, the clamp or unclamp signal is cleared and the CNC exits the completion wait state.
� ����� ��
PROGRAMMING 13. FUNCTIONS TO SIMPLIFY
PROGRAMMING B–64124EN/01
204
Table 13.8 Index indexing function and other functions
Item Explanation
Relative position display This value is rounded down when bit 1 of parameter REL No. 5500 specifies this option.
Absolute position display This value is rounded down when bit 2 of parameterABS No. 5500 specifies this option.
Automatic return from the reference position (G29) 2nd reference position return (G30)
Impossible to return
Movement in the machine coordinate system Impossible to move
Single direction positioning Impossible to specify
2nd auxiliary function (B code) Possible with any address other than B that of the indexing axis.
Operations while moving the indexing axis Unless otherwise processed by the machine, feed hold, interlock and emerrgency stop can be executed. Machine lock can be executed after indexing is completed.
SERVO OFF signal Disabled The indexing axis is usually in the servo–off state.
Incremental commands for indexing the index table
The workpiece coordinate system and machine coordinate system must always agree with each other on the indexing axis (the work- piece zero point offset value is zero.).
Operations for indexing the index table
Manual operation is disabled in the JOG, INC, or HANDLE mode. A manual reference position return can be made. If the axis selec- tion signal is set to zero during manual reference position return, movement is stopped and the clamp command is not executed.
� 6������" �������� ��
����� ���������
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
205
14 0.* 8-�#608 �98 #608 This chapter describes the following compensation functions:
14.1 TOOL LENGTH OFFSET (G43, G44, G49) 14.2 AUTOMATIC TOOL LENGTH MEASUREMENT (G37) 14.3 TOOL OFFSET (G45–G48) 14.4 OVERVIEW OF CUTTER COMPENSATION C (G40–G42) 14.5 DETAILS OF CUTTER COMPENSATION C 14.6 TOOL COMPENSATION VALUES, NUMBER OF
COMPENSATION VALUES, AND ENTERING VALUES FROM THE PROGRAM (G10)
14.7 SCALING (G50, G51) 14.8 COORDINATE SYSTEM ROTATION (G68, G69) 14.9 NORMAL DIRECTION CONTROL
(G40.1, G41.1, G42.1 OR G150, G151, G152) 14.10 PROGRAMMABLE MIRROR IMAGE (G50.1, G51.1)
����� �
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
206
This function can be used by setting the difference between the tool length assumed during programming and the actual tool length of the tool used into the offset memory. It is possible to compensate the difference without changing the program. Specify the direction of offset with G43 or G44. Select a tool length offset value from the offset memory by entering the corresponding address and number (H code).
ÇÇ ÇÇ ÇÇ ÇÇ
ÇÇ ÇÇ ÇÇ
Tool assumed dur- ing programming
Actual tool
Specify this distance as the value of tool length offset.
Fig. 14.1 Tool length offset
The following three methods of tool length offset can be used, depending on the axis along which tool length offset can be made. ⋅Tool length offset A Compensates for the difference in tool length along the Z–axis. ⋅Tool length offset B Compensates for the difference in tool length along the X–,Y–,or Z–axis. ⋅Tool length offset C Compensates for the difference in tool length along a specified axis.
G43 Z_ H_ ;
G44 Z_ H_ ;
Tool length offset A
G17 G43 Z_ H_ ;
G17 G44 Z_ H_ ;
G18 G43 Y_ H_ ;
G18 G44 Y_ H_ ;
G19 G43 X_ H_ ;
Tool length offset B
G43 α_ H_ ; G44 α_ H_ ;
Tool length offset C
G49 ; or H0 ;Tool length offset cancel
G43 : Positive offset G44 : Negative offset G17 : XY plane selection G18 : ZX plane selection G19 : YZ plane selection α : Address of a specified
axis H : Address for specifying
the tool length offset value
Explanation of each address
G19 G44 X_ H_ ;
14.1 TOOL LENGTH OFFSET (G43, G44, G49)
14.1.1 General
Format
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
207
Select tool length offset A, B, or C, by setting bits 0 and 1 of parameter TLC,TLB No. 5001.
When G43 is specified, the tool length offset value (stored in offset memory) specified with the H code is added to the coordinates of the end position specified by a command in the program. When G44 is specified, the same value is subtracted from the coordinates of the end position. The resulting coordinates indicate the end position after compensation, regardless of whether the absolute or incremental mode is selected. If movement along an axis is not specified, the system assumes that a move command that causes no movement is specified. When a positive value is specified for tool length offset with G43, the tool is moved accordingly in the positive direction. When a positive value is specified with G44, the tool is moved accordingly in the negative direction. When a negative value is specified, the tool is moved in the opposite direction. G43 and G44 are modal G codes. They are valid until another G code belonging to the same group is used.
The tool length offset value assigned to the number (offset number) specified in the H code is selected from offset memory and added to or subtracted from the moving command in the program.
(1) Tool length offset A/B When the offset numbers for tool length offset A/B are specified or modified, the offset number validation order varies, depending on the condition, as described below.
O××××; H01 ; : G43Z_ ; (1) : G44Z_H02 ; (2) : H03 ; (3) :
(1) Offset number H01 is valid. (2) Offset number H02 is valid. (3) Offset number H03 is valid.
O××××; H01 ; : G43Z_ ; (1) : G44Z_H02 ; (2) : H03 ; (3) :
(1) Offset number H00 is valid. (2) Offset number H02 is valid. (3) Offset number H02 is valid.
��� � �����
� Selection of tool length offse�
� Direction of the offset
� Specification of the tool length offset value
� When OFH (bit 2 of parameter No. 5001) = 0
� When OFH (bit 2 of parameter No. 5001) = 1
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
208
(2) Cutter compensation C
When the offset numbers for cutter compensation C are specified or modified, the offset number validation order varies, depending on the condition, as described below.
O××××; H01 ; : G43P_ ; (1) : G44P_H02 ; (2) : H03 ; (3) :
(1)Offset number H01 is valid. (2)Offset number H02 is valid. (3)Offset number H03 is valid only for
the axis to which compensation was applied most recently.
O××××; H01 ; : G43P_ ; (1) : G44P_H02 ; (2) : H03 ; (3) :
(1) Offset number H00 is valid. (2) Offset number H02 is valid. (3) Offset number H02 is valid.
(However, the H number displayed is changed to 03.)
The tool length offset value may be set in the offset memory through the CRT/MDI panel. The range of values that can be set as the tool length offset value is as follows.
Metric input Inch input
Tool length offset value 0 to ±999.999mm 0 to ±99.9999inch
WARNING When the tool length offset value is changed due to a change of the offset number, the offset value changes to the new tool length offset value, the new tool length offset value is not added to the old tool length offset value. H1 : tool length offset value 20.0 H2 : tool length offset value 30.0 G90 G43 Z100.0 H1 ; Z will move to 120.0 G90 G43 Z100.0 H2 ; Z will move to 130.0
CAUTION When the tool length offset is used and set a parameter OFH (No. 5001#2) to 0, specify the tool length offset with H code and the cutter compensation with D code.
� When OFH (bit 2 of parameter No. 5001) = 0
� When OFH (bit 2 of parameter No. 5001) = 1
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
209
NOTE The tool length offset value corresponding to offset No. 0, that is, H0 always means 0. It is impossible to set any other tool length offset value to H0.
Tool length offset B can be executed along two or more axes when the axes are specified in two or more blocks.
Offset in X and Y axes. G19 G43 H _ ; Offset in X axis G18 G43 H _ ; Offset in Y axis
(Offsets in X and Y axes are performed)
If the TAL bit (bit 3 of parameter No. 5001) is set to 1, an alarm will not occur even when tool length offset C is executed along two or more axes at the same time.
To cancel tool length offset, specify G49 or H0. After G49 or H0 is specified, the system immediately cancels the offset mode.
NOTE After tool length offset B is executed along two or more
axes, offset along all the axes is canceled by specifying G49. If H0 is specified, only offset along an axis perpendicular to the specified plane is canceled.
In the case of the offset in three axes or more, if the offset is canceled by G49 code, the P/S alarm 015 is generated. Cancel the offset by using G49 and H0.
� Performing tool length offset along two or more axes
� Tool length offset cancel
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
210
Actual position
Programmed position
offset value ε=4mm
t1
20
30
30
120
t3
t2
+Y
+X
30 50 +Z
335
30 18 22
8
���� �� * ) ����� !' ���' * )���� ����0 �0 � % �"
(1)
(2)
(3)
(4)
(5)
(6)
(7) (8)
(9)(13)
(10)
(11)
(12)
⋅8��*��+ H1=–4.0 !���� �� * ) ����� 3��(�" N1 G91 G00 X120.0 Y80.0 ; (1) N2 G43 Z–32.0 H1 ; (2) N3 G01 Z–21.0 F1000 ; (3) N4 G04 P2000 ; (4) N5 G00 Z21.0 ; (5) N6 X30.0 Y–50.0 ; (6) N7 G01 Z–41.0 ; (7) N8 G00 Z41.0 ; (8) N9 X50.0 Y30.0 ; (9) N10 G01 Z–25.0 ; (10) N11 G04 P2000 ; (11) N12 G00 Z57.0 H0 ; (12) N13 X–200.0 Y–60.0 ; (13) N14 M2 ;
� ����
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
211
This section describes the tool length offset cancellation and restoration performed when G53, G28, or G30 is specified in tool length offset mode. Also described is the timing of tool length offset.
(1)Tool length offset vector cancellation and restoration, performed when G53, G28, or G30 is specified in tool length offset mode
(2)Specification of the G43/G44 command for tool length offset A/B/C, and independent specification of the H command
When G53, G28, or G30 is specified in tool length offset mode, tool length offset vectors are canceled as described below. However, the previously specified modal G code remains displayed; modal code display is not switched to G49.
(1) When G53 is specified
Command Specified axis Common to type A/B/C
G53P_; Tool length offset axis
Canceled upon movement being performed according to a speci- fied value
Other than tool length offset axis
Not canceled
NOTE When tool length offset is applied to multiple axes, all specified axes are subject to cancellation.
When tool length offset cancellation is specified at the same time, tool length offset vector cancellation is performed as indicated below.
Command Specified axis Common to type A/B/C
G49G53P_; Tool length offset axis
Canceled upon movement being performed according to a speci- fied value
Other than tool length offset axis
Canceled upon movement being performed according to a speci- fied value
(2) When G28, or G30 is specified
Command Specified axis Common to type A/B/C
G28P_; Tool length offset axis
Canceled upon movement to a reference position being per- formed
Other than tool length offset axis
Not canceled
14.1.2 G53, G28, and G30 Commands in Tool Length Offset Mode
Explanations
� Tool length offset vector cancellation
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
212
NOTE When tool length offset is applied to multiple axes, all specified axes involved in reference position return are subject to cancellation.
When tool length offset cancellation is specified at the same time, tool length offset vector cancellation is performed as indicated below.
Command Specified axis Common to type A/B/C
G49G28P_; Tool length offset axis
Canceled upon movement to an intermediate position being per- formed
Other than tool length offset axis
Canceled upon movement to an intermediate position being per- formed
Tool length offset vectors, canceled by specifying G53, G28, or G30 in tool length offset mode, are restored as described below.
(1) When OFH (bit 2 of parameter No. 5001) = 0
Type EVO (bit 6 of pa- rameter No. 5001)
Restoration block
A/B
1 Block to be buffered next
A/B 0 Block containing an H command or G43/44 command
C Ignored Block containing an H command
Block containing a G43P_/G44P_ command
(2)When OFH (bit 2 of parameter No. 5001) = 1 In a mode other than tool length offset mode
Type EVO (bit 6 of pa- rameter No. 5001)
Restoration block
A/B
1 Block to be buffered next
A/B 0 Block containing an H command or G43/44 command
C Ignored Block containing an H command
Block containing a G43P_/G44P_ command
� Tool length offset vector restoration
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
213
In tool length offset mode
Type EVO (bit 6 of pa- rameter No. 5001)
Restoration block
A/B
1 Block containing a G43/G44 block
A/B 0 Block containing an H command
and G43/44 command
C Ignored Block containing a
G43P_H_/G44P_H_ command
WARNING When tool length offset is applied to multiple axes, all axes for which G53, G28, and G30 are specified are subject to cancellation. However, restoration is performed only for that axis to which tool length offset was applied last; restoration is not performed for any other axes.
NOTE In a block containing G40, G41, or G42, the tool length offset vector is not restored.
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
214
By issuing G37 the tool starts moving to the measurement position and keeps on moving till the approach end signal from the measurement device is output. Movement of the tool is stopped when the tool tip reaches the measurement position. A difference is determined between a coordinate value obtained when the tool reaches the measurement position and a coordinate value specified by G37. The difference is then added to the wear compensation value for the H code of an offset number currently used.
Ç Ç
Z
X0
Rapid traverse
Measurement feedrate
A (Start position) Measurement position is commanded with G37
B (Deceleration position)
C (Measurement position) The tool stops when the approach end signal goes on.
Compensation value = (Current compensation value) + [(Coordinates of the point at which the tool is stopped) – (Coordinates of the programmed measure- ment position)]
Fig. 14.2 (a) Automatic tool length measurement
G92 _ ; Sets the workpiece coordinate system. (It can be set with G54 to G59. See Chapter II–7, “Coordinate System.”)
H��; Specifies an offset number for tool length offset.
G90 G37 _ ; Absolute command G37 is valid only in the block in which it is specified.
_ indicates the X–, Y–, Z–, or fourth axis.
IP
IP
IP
Set the workpiece coordinate system so that a measurement can be made after moving the tool to the measurement position. The coordinate system must be the same as the workpiece coordinate system for programming.
Specify the absolute coordinates of the correct measurement position. Execution of this command moves the tool at the rapid traverse rate toward the measurement position, reduces the federate halfway, then continuous to move it until the approach end signal from the measuring instrument is issued. When the tool tip reaches the measurement position, the measuring instrument sends an approach end signal to the CNC which stops the tool.
14.2 AUTOMATIC TOOL LENGTH MEASUREMENT (G37)
Format
Explanations
� Setting the workpiece coordinate system
� Specifying G37
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
215
The difference between the coordinates of the position at which the tool reaches for measurement and the coordinates specified by G37 is added to the current tool length offset value. Offset value = (Current compensation value) + [(Coordinates of the position at which the tool reaches for measurement) – (Coordinates specified by G37)] These offset values can be manually changed from MDI.
When automatic tool length measurement is executed, the tool moves as shown in Fig. 14.2 (b). If the approach end signal goes on while the tool is traveling from point B to point C, an alarm occurs. Unless the approach end signal goes on before the tool reaches point F, the same alarm occurs. The P/S alarm number is 080.
Start position
Rapid traverse Approach end signal ON
Position commanded by G37
Permitted range of approach end signal
A B D E F
Deceleration feedrate (measurement feedrate)
C
Fig. 14.2 (b) Tool movement to the measurement position
� Changing the offset value
� �� �
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
216
WARNING When a manual movement is inserted into a movement at a measurement federate, return the tool to the!position before the inserted manual movement for restart.
NOTE 1 When an H code is specified in the same block as G37, an
alarm is generated. Specify H code before the block!of G37.
2 The measurement speed (parameter No. 6241), deceleration position (parameter No. 6251), and permitted range of the approach end signal (parameter No. 6254) are specified by the machine tool builder.
3 The approach end signal is monitored usually every 2 ms. The following measuring error is generated: ERRmax. : Fm×1/60×TS/1000 where
TS : Sampling period, for usual 2 (ms) ERRmax. : maximum measuring error (mm) Fm : measurement federate (mm/min.)
For example, when Fm = 1000 mm/min., ERRmax. = 0.003m 4 The tool stops a maximum of 16 ms after the approach end
signal is detected. But the value of the position!at which the approach end signal was detected (note the value when the tool stopped) is used to determine the offset amount. The overrun for 16 ms is:
Qmax. = Fm × 1/60 ×16/1000 Qmax.: maximum overrun (mm) Fm : measurement federate (mm/min.)
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
217
G92 Z760.0 X1100.0 ; Sets a workpiece coordinate system with respect to the programmed absolute zero point.
G00 G90 X850.0 ; Moves the tool to X850.0. That is the tool is moved to a position that is a specified distance from the measurement position along the Z–axis.
H01 ; Specifies offset number 1. G37 Z200.0 ; Moves the tool to the measurement position. G00 Z204.0 ; Retracts the tool a small distance along the
Z–axis.
For example, if the tool reaches the measurement position with Z198.0;, the compensation value must be corrected. Because the correct measurement position is at a distance of 200 mm, the compensation value is lessened by 2.0 mm (198.0 – 200.0 = –2.0).
ÇÇ ÇÇ ÇÇ
200
760
850 1100 X
Z
ÇÇ ÇÇ
Measurement position along Z axis
0
� ����
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
218
The programmed travel distance of the tool can be increased or decreased by a specified tool offset value or by twice the offset value. The tool offset function can also be applied to an additional axis.
ÇÇÇ ÇÇÇ ÇÇÇ
Programmed pathTool center path Tool
Workpiece
: Command for moving the tool
G45 _D_ ; Increase the travel distance by the tool offset value
Decrease the travel distance by the tool offset value
Increase the travel distance by twice the tool offset value
Decrease the travel distance by twice the tool offset value
D : Code for specifying the tool offset value
G45 to G48 : One–shot G code for increasing or decreasing the travel distance
G46 _D_ ;
G47 _D_ ;
G48 _D_ ;
IP_
IP
IP
IP
IP
14.3 TOOL OFFSET (G45–G48)
Format
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
219
As shown in Table 14.3 (a), the travel distance of the tool is increased or decreased by the specified tool offset value. In the absolute mode, the travel distance is increased or decreased as the tool is moved from the end position of the previous block to the position specified by the block containing G45 to G48.
G code When a positive tool offset val- ue is specified
When a negative tool offset value is specified
Start position End position
G45
G46
G47
G48
Programmed movement distance Tool offset value
Actual movement position
Table 14.3 (a) Increase and decrease of the tool travel distance
Start position End position
Start position End positionStart position End position
Start position End position Start position End position
Start position End position Start position End position
If a move command with a travel distance of zero is specified in the incremental command (G91) mode, the tool is moved by the distance corresponding to the specified tool offset value. If a move command with a travel distance of zero is specified in the absolute command (G90) mode, the tool is not moved.
Once selected by D code, the tool offset value remains unchanged until another tool offset value is selected. Tool offset values can be set within the following range:
Table 14.3 (b) Range of tool offset values
Metric input inch input
Tool offset value 0 to ±999.999mm 0 to ±99.9999inch
0 to ±999.999deg 0 to ±999.999deg
D0 always indicates a tool offset value of zero.
Explanations
� Increase and decrease
� #��� ������ � ���
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
220
WARNING 1 When G45 to G48 is specified to n axes (n=1–6) simultaneously in a motion block, offset is
applied to all n axes. When the cutter is offset only for cutter radius or diameter in taper cutting, overcutting or undercutting occurs. Therefore, use cutter compensation (G40 or G42) shown in II–14.4 or 14.5.
2 G45 to G48 (tool offset) must not be used in the G41 or G42 (cutter compensation) mode.
ÇÇÇ ÇÇÇ
ÇÇÇ ÇÇÇ ÇÇÇ
ÇÇÇ ÇÇÇ ÇÇÇ
ÇÇ ÇÇ
Shape actually cut
Desired shape
Overcutting
Y axis
Undercutting
G01 X_ F_ ; G47 X_ Y_ D_ ; Y_ ;
G01 G45 X_ F_ D_; X_ Y_ ; G45 Y_ ;
X axis
Desired shape
Shape actually cut
Y axis
X axis
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
221
NOTE 1 When the specified direction is reversed by decrease as shown in the figure below, the tool
moves in the opposite direction.
2 Tool offset can be applied to circular interpolation (G02, G03) with the G45 to G48 commands only for 1/4 and 3/4 circles using addresses I, J and K by the parameter setting, providing that the coordinate rotation be not specified at the same time. This function is provided for compatibility with the conventional CNC tape without any cutter compensation. The function should not be used when a new CNC program is prepared.
3 D code should be used in tool offset mode (G45 to G48). However, H code can be used by setting the parameter TPH (No. 500195" because of compatibility with conventional CNC tape format. The H code must be used under tool length offset cancel (G49).
4 G45 to G48 are ignored in canned cycle mode. Perform tool offset by specifying G45 to G48 before entering canned cycle mode and cancel the offset after releasing the canned cycle mode.
G46 X2.50 ; Tool offset value +3.70
Equivalent command X–1.20 ;
Movement of the tool Program command Start position End
position
Tool offset value
Example
ÇÇÇ ÇÇÇ ÇÇÇ
ÇÇÇ ÇÇÇ ÇÇÇ
ÇÇ ÇÇ ÇÇ
N1
N2
N3 N4
Program
N1 G46 G00 X_ Y_ D_ ; N2 G45 G01 Y_ F_ ; N3 G45 G03 X_ Y_ I_ ; N4 G01 X_ ;
Tool offset for circular interpolation
Programmed tool path
Actual tool path
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
222
ÇÇÇ ÇÇÇ ÇÇÇ
Tool diameter : 20φ Offset No. : 01 Tool offset value : +10.0
80 50
40
50
40
30R
N1 N2
N3
N4
N5
N6 N7
N8
N9 N10
N11
N12
N13
N14 30 3040
X axis
Y axis
Program using tool offset
Origin
30R
Program
N1 G91 G46 G00 X80.0 Y50.0 D01 ; N2 G47 G01 X50.0 F120.0 ; N3 Y40.0 ; N4 G48 X40.0 ; N5 Y–40.0 ; N6 G45 X30.0 ; N7 G45 G03 X30.0 Y30.0 J30.0 ; N8 G45 G01 Y20.0 ; N9 G46 X0 ; Decreases toward the positive direction for
movement amount “0”. The tool moves in the –X direction by theoffset value.
N10 G46 G02 X–30.0 Y30.0 J30.0 ; N11 G45 G01 Y0 ; Increase toward the positive direction for movement
amount “0”. The tool moves in the +Y direction by the offset value. N12 G47 X–120.0 ; N13 G47 Y–80.0 ; N14 G46 G00 X80.0 Y–50.0 ;
� ����
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
223
When the tool is moved, the tool path can be shifted by the radius of the tool (Fig. 14.4 (a)). To make an offset as large as the radius of the tool, CNC first creates an offset vector with a length equal to the radius of the tool (start–up). The offset vector is perpendicular to the tool path. The tail of the vector is on the workpiece side and the head positions to the center of the tool. If a linear interpolation or circular interpolation command is specified after start–up, the tool path can be shifted by the length of the offset vector during machining. To return the tool to the start position at the end of machining, cancel the cutter compensation mode.
ÇÇÇ ÇÇÇ ÇÇÇ
Start–up
Cutter compensation cancel
Fig. 14.4 (a) Outline of cutter compensation C
14.4 OVERVIEW OF CUTTER COMPENSATION C (G40–G42)
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
224
� Start up (Tool compensation start)
G00(or G01)G41(or G42) P_ D_ ;
G41
G42 P_
D_
: Cutter compensation left (Group07)
: Cutter compensation right (Group07)
: Command for axis movement : Code for specifying as the cutter compensation value(1–3digits) (D code)
� Cutter compensation cancel (offset mode cancel)
G40 ;
G40 : Cutter compensation cancel(Group 07) (Offset mode cancel) : Command for axis movement
� Selection of the offset plane
Offset plane
XpYp
ZpXp
YpZp
Command for plane selection
G17 ;
G18 ;
G19 ;
_
Xp_Yp_
Xp_Zp_
Yp_Zp_
IP
IP
P_IP
IP
At the beginning when power is applied the control is in the cancel mode. In the cancel mode, the vector is always 0, and the tool center path coincides with the programmed path.
When a cutter compensation command (G41 or G42, nonzero dimension words in the offset plane, and D code other than D0) is specified in the offset cancel mode, the CNC enters the offset mode. Moving the tool with this command is called start–up. Specify positioning (G00) or linear interpolation (G01) for start–up. If circular interpolation (G02, G03) is specified, P/S alarm 34 occurs. When processing the start–up block and subsequent blocks, the CNC prereads two blocks.
In the offset mode, compensation is accomplished by positioning (G00), linear interpolation (G01), or circular interpolation (G02, G03). If two or more blocks that do not move the tool (miscellaneous function, dwell, etc.) are processed in the offset mode, the tool will make either an excessive or insufficient cut. If the offset plane is switched in the offset mode, P/S alarm 37 occurs and the tool is stopped.
Format
Explanations
� Offset cancel mode
� Start Up
� Offset mode
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
225
In the offset mode, when a block which satisfies any one of the following conditions is executed, the CNC enters the offset cancel mode, and the action of this block is called the offset cancel. 1. G40 has been commanded. 2. 0 has been commanded as the offset number for cutter compensation. When performing offset cancel, circular arc commands (G02 and G03) are not available. If a circular arc is commanded, an P/S alarm (No. 034) is generated and the tool stops. In the offset cancel, the control executes the instructions in that block and the block in the cutter compensation buffer. In the meantime, in the case of a single block mode, after reading one block, the control executes it and stops. By pushing the cycle start button once more, one block is executed without reading the next block. Then the control is in the cancel mode, and normally, the block to be executed next will be stored in the buffer register and the next block is not read into the buffer for cutter compensation.
Offset cancel mode Offset mode
Start up
Offset modecancel
(G41/G42)
(G40/D0)
Fig. 14.4 (b) Changing the offset mode
In general, the cutter compensation value shall be changed in the cancel mode, when changing tools. If the cutter compensation value is changed in offset mode, the vector at the end point of the block is calculated for the new cutter compensation value.
Calculated from the cutter compensation value in the block N6
Calculated from the cutter compensation value in the block N7
N7
N6 N8
Fig. 14.4 (c) Changing the cutter compensation value
Programmed path
� Offset mode cancel
� Change of the Cutter compensation value
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
226
If the offset amount is negative (–), distribution is made for a figure in which G41’s and G42’s are all replaced with each other on the program. Consequently, if the tool center is passing around the outside of the workpiece, it will pass around the inside, and vice versa. The figure below shows one example. Generally, the offset amount is programmed to be positive (+). When a tool path is programmed as in ((1)), if the offset amount is made negative (–), the tool center moves as in ((2)), and vice versa. Consequently, the same tape permits cutting both male and female shapes, and any gap between them can be adjusted by the selection of the offset amount. Applicable if start–up and cancel is A type. (See II– 14.5.2 and 14.5.4)
Assign a cutter compensation values to the D codes on the MDI panel. The table below shows the range in which cutter compensation values can be specified.
mm input inch input
Cutter compensation value 0 to ±999.999mm 0 to ±99.9999inch
NOTE 1 The cutter compensation value corresponding to offset No.
0, that is, D0 always means 0. It is impossible to set D0 to any other offset amount.
2 Cutter compensation C can be specified by H code with parameter OFH (No. 5001 #2) set to 1.
The offset vector is the two dimensional vector that is equal to the cutter compensation value assigned by D code. It is calculated inside the control unit, and its direction is up–dated in accordance with the progress of the tool in each block. The offset vector is deleted by reset.
Specify a cutter compensation value with a number assigned to it. The number consists of 1 to 3 digits after address D (D code). The D code is valid until another D code is specified. The D code is used to specify the tool offset value as well as the cutter compensation value.
� Positive/negative cutter compensation value and tool center path
� Cutter compensation value setting
� 0����� ������
� Specifying a cutter compensation value
Fig. 14.4 (d) Tool center paths when positive and negative cutter compensation values are specified
ÇÇÇ ÇÇÇ ÇÇÇ
ÇÇ ÇÇ ÇÇ
!�" !�"
Programmed path
Tool center path
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
227
Offset calculation is carried out in the plane determined by G17, G18 and G19, (G codes for plane selection). This plane is called the offset plane. Compensation is not executed for the coordinate of a position which is not in the specified plane. The programmed values are used as they are. In simultaneous 3 axes control, the tool path projected on the offset plane is compensated. The offset plane is changed during the offset cancel mode. If it is performed during the offset mode, a P/S alarm (No. 37) is displayed and the machine is stopped.
� Plane selection and vector
PROGRAMMING14.  The tool is positioned at the start position (X0, Y0, Z0).
N1 G90 G17 G00 G41 D07 X250.0 Y550.0 ; Starts cutter compensation (start–up). The tool is shifted to the left of the programmed path by the distance specified in D07. In other words the tool path is shifted by the radius of the tool (offset mode) because D07 is set to 15 beforehand (the radius of the tool is 15 mm).

The tool is returned to the start position (X0, Y0, Z0).
� ����
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
229
This section provides a detailed explanation of the movement of the tool for cutter compensation C outlined in Section 14.4. This section consists of the following subsections:
14.5.1 General 14.5.2 Tool Movement in Start–up 14.5.3 Tool Movement in Offset Mode 14.5.4 Tool Movement in Offset Mode Cancel 14.5.5 Interference Check 14.5.6 Overcutting by Cutter Compensation 14.5.7 Input Command from MDI 14.5.8 G53,G28,G30 and G29 Commands in Cutter
Compensation C Mode 14.5.9 Corner Circular Interpolation (G39)
When an angle of intersection created by tool paths specified with move commands for two blocks is over 180°, it is referred to as “inner side.” When the angle is between 0° and 180°, it is referred to as “outer side.”
αWorkpiece α
Programmed path
Inner side
180°�α 0°�α<180°
Outer side
Workpiece
Programmed path
The following symbols are used in subsequent figures: – S indicates a position at which a single block is executed once. – SS indicates a position at which a single block is executed twice. – SSS indicates a position at which a single block is executed three times. – L indicates that the tool moves along a straight line. – C indicates that the tool moves along an arc. – r indicates the cutter compensation value. – An intersection is a position at which the programmed paths of two
blocks intersect with each other after they are shifted by r. – indicates the center of the tool.
14.5 DETAILS OF CUTTER COMPENSATION C
14.5.1 General
� Inner side and outer side
� .� ���" �� �! ����
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
230
When the offset cancel mode is changed to offset mode, the tool moves as illustrated below (start–up):
α
LS
G42 r
L
α
S
r
L C
G42
Tool center pathStart position
Programmed path
Work- piece
Linear→Circular
Start position
Workpiece
Tool center path
Linear→Linear
14.5.2 Tool Movement in Start–up
Explanations
� Tool movement around an inner side of a corner ��')°�α�
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
231
Tool path in start–up has two types A and B, and they are selected by parameter SUP (No. 5003#0).
Linear→Linear
α
Programmed path
Tool center pathLS
G42
r
L
Linear→Circular
r
Type A
Type B
α
L S
G42
L
Workpiece
Start position
r
L
Linear→Linear
Linear→Circular
Workpiece
Start position
Start position
Work- piece
Programmed path
Tool center path
Tool center path
Intersection
Intersection
Work- piece
Programmed path
Start position
C
G42
L
r
S
α
Tool center path
L
L
α
S
C
G42
r
L
r
Programmed path
Work- piece
� Tool movement around the outside of a corner at an obtuse angle �,)°�α<�')°�
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
232
Tool path in start–up has two types A and B, and they are selected by parameter SUP (No.5003#0).
α
LS
G42
r
L
S C
Type A
Type B
r
G42 L
G42
L
L L
L
S
r
r
G42
L
L
L
S
r
r
C
L
L
Linear→Linear
Linear→Circular
Linear→Linear
Linear→Circular
Workpiece
Work- piece
Workpiece
Work- piece
Start position
Start position
Start position
Start position
Programmed path
Programmed path
Programmed path
Programmed path
Tool center path
Tool center path
Tool center path
Tool center path
α
α
α
r
G41
G41
L
L
S
Start position
Tool center path
Programmed path
Less than 1 deg
� Tool movement around the outside of an acute angle (α<,)°)
� Tool movement around the outside linear→linear at an acute angle less than 1 degree �α<�°�
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
233
If the command is specified at start–up, the offset vector is not created.
S
N9
N6
N7
N8
SS
G91 G40 … ; : N6 X100.0 Y100.0 ; N7 G41 X0 ; N8 Y–100.0 ; N9 Y–100.0 X100.0 ;
Programmed path
Tool center path
r
NOTE For the definition of blocks that do not move the tool, see II–14.5.3.
� A block without tool movement specified at start–up
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
234
In the offset mode, the tool moves as illustrated below:
α
L
L
α
C
S
L
S
C
L
S
CSC
Linear→Circular
Linear→Linear
Programmed path
Intersection Tool center path
Workpiece
Work- piece
Tool center path
Intersection
Programmed path
Workpiece
Programmed path
Tool center pathIntersection
Circular→Linear
Circular→Circular
Work- piece
Tool center path Programmed path
Intersection
α
α
14.5.3 #��� .��� ��� ��
0����� .���
Explanations
� Tool movement around the inside of a corner (�')°�α)
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
235
r
r S
r
Intersection
Programmed path
Tool center path
Intersection
Also in case of arc to straight line, straight line to arc and arc to arc, the reader should infer in the same procedure.
� Tool movement around the inside �α<�°� with an abnormally long vector, linear → linear
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
236
α
L
r
C
S
L
S
C
L
S
L
L
r
L
L L
S
r r
Linear→Linear
Linear→Circular
Programmed path
Tool center pathIntersection
Workpiece
Circular→Linear
Circular→Circular
Intersection
Tool center path Programmed path
Work- piece
Intersection Tool center path
Programmed path
Workpiece
Work- piece
Programmed path
Intersection
Tool center path
α
α
α
C
C
� Tool movement around the outside corner at an obtuse angle (90°�α<180°)
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
237
α
L
L L
L
S r
r
L
L
r
r
C
L
L
L
L L
L
r
r
L
S
L
S
r
r
L
C
CL
Linear→Linear
Programmed path
Tool center path
Workpiece
Linear→Circular
Circular→Linear
Circular→Circular
Programmed path
Work- piece
Tool center path
Workpiece
Programmed path
Tool center path
Work- piece
Tool center path Programmed path
α
α
α
S
C
� Tool movement around the outside corner at an acute angle (α<90°)
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
238
If the end of a line leading to an arc is programmed as the end of the arc by mistake as illustrated below, the system assumes that cutter compensation has been executed with respect to an imaginary circle that has the same center as the arc and passes the specified end position. Based on this assumption, the system creates a vector and carries out compensation. The resulting tool center path is different from that created by applying cutter compensation to the programmed path in which the line leading to the arc is considered straight.
rr
Center of the arc
Imaginary circle
Leading of the arc End the arc
L
L L
r C S
Programmed path
Tool center path
Work- piece
The same description applies to tool movement between two circular paths.
If the cutter compensation value is sufficiently small, the two circular tool center paths made after compensation intersect at a position (P). Intersection P may not occur if an excessively large value is specified for cutter compensation. When this is predicted, P/S alarm No.033 occurs at the end of the previous block and the tool is stopped. In the example shown below, tool center paths along arcs A and B intersect at P when a sufficiently small value is specified for cutter compensation. If an excessively large value is specified, this intersection does not occur.
When the cutter compensation value is large
Arc B P
When the cutter compensa- tion value is small
Alarm(No.033)occurs and the tod stops
Programmed path
Center of the arc B Center of the arc A
Arc A
r r
� When it is exceptional
End position for the arc is not on the arc
There is no inner intersection
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
239
If the center of the arc is identical with the start position or end point, P/S alarm (No. 038) is displayed, and the tool will stop at the end position of the preceding block.
N5 N6
N7
r
Alarm(No.038)is displayed and the tool stops
(G41) N5 G01 X100.0 ; N6 G02 X100.0 I0 J0 ; N7 G03 Y–100.0 J–100.0 ;Tool center path
Programmed path
The offset direction is decided by G codes (G41 and G42) for cutter radius and the sign of cutter compensation value as follows.
Sign of offset amount
Gcode + –
G41 Left side offset Right side offset
G42 Right side offset Left side offset
The offset direction can be changed in the offset mode. If the offset direction is changed in a block, a vector is generated at the intersection of the tool center path of that block and the tool center path of a preceding block. However, the change is not available in the start–up block and the block following it.
#�� ������ �� ��� �� �� ������:
� � 3��� ��� �� �� �������� ��
��� ��� ��������
� Change in the offset direction in the offset mode
PROGRAMMING14.  COMPENSATION FUNCTION
241
When changing the offset direction in block A to block B using G41 and G42, if intersection with the offset path is not required, the vector normal to block B is created at the start point of block B.
G41(G42) (G42)
L
L
L
A B
r
r
S
G42
G41
L S
L
S
(G41) G42
A
B
L
S
r
L L
G41
C
C
r
r r
(G42)
S
S
Center
(G42)
Linear→Linear
Linear→Circular
Programmed path
Tool center path
Programmed path
Tool center path
Workpiece
Workpiece
Tool center path
Programmed path
Circular→Circular
An arc whose end position is not on the arc
Programmed path
Tool center path Center
C
(G41)
Tool center path without an in- tersection
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
242
Normally there is almost no possibility of generating this situation. However, when G41 and G42 are changed, or when a G40 was commanded with address I, J, and K this situation can occur. In this case of the figure, the cutter compensation is not performed with more than one circle circumference: an arc is formed from P1 to P2 as shown. Depending on the circumstances, an alarm may be displayed due to the “Interference Check” described later. To execute a circle with more than one circumference, the circle must be specified in segments.
N5
N6
N7
P1 P2
(G42)
N5 G01 G91 X500.0 Y–700.0 ;
N6 G41 G02 J–500.0 ;
N7 G42 G01 X500.0 Y700.0 ;
Programmed pathTool center path
The length of tool center path larger than the circumference of a circle
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
243
If the following command is specified in the offset mode, the offset mode is temporarily canceled then automatically restored. The offset mode can be canceled and started as described in II–14.5.2 and 14.5.4.
If G28 is specified in the offset mode, the offset mode is canceled at an intermediate position. If the vector still remains after the tool is returned to the reference position, the components of the vector are reset to zero with respect to each axis along which reference position return has been made.
(G42 G00) S
S
S
S
G28
G00 r r
Intermediate position
Reference position
If G29 is commanded in the offset mode, the offset will be cancelled at the intermediate point, and the offset mode will be restored automatically from the subsequent block.
G29 specified immediately after G28
(G42 G00) S
S
S
G28
G00 r
r
(G42 G00)
S
S G00r
r
S
S
G29
G29
Tool center path
Programmed path
Reference position
Intermediate position
Intermediate position
Tool center path
Programmed path
G29 specified not immediately after G28
G29
� Temporary cutter compensation cancel
Specifying G28 (automatic re- turn to the reference position) in the offset mode
Specifying G29 (automatic re- turn from the reference posi- tion) in the offset mode
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
244
The offset vector can be set to form a right angle to the moving direction in the previous block, irrespective of machining inner or outer side, by commanding the cutter compensation G code (G41, G42) in the offset mode, independently. If this code is specified in a circular command, correct circular motion will not be obtained. When the direction of offset is expected to be changed by the command of cutter compensation G code (G41, G42), refer to “change in the offset direction in the offset mode” in this Subsec.14.5.3.
Linear→Linear
r
A block specified by G42G42 mode
r
C Intersection
S L
L
S
L
Circular→Linear
A block specified by G42
Intersection
Programmed path
G42 mode
Tool center path
During offset mode, if G92 (absolute zero point programming) is commanded,the offset vector is temporarily cancelled and thereafter offset mode is automatically restored. In this case, without movement of offset cancel, the tool moves directly from the intersecting point to the commanded point where offset vector is canceled. Also when restored to offset mode, the tool moves directly to the intersecting point.
S
L L L
L
S
SN5 N6
N7
N8
G92 block(G41) N5 G91 G01 X300.0 Y700.0 ; N6 X–300.0 Y600.0 ; N7 G92 X100.0 Y200.0 ; N8 G90 G01 X400.0 Y800.0 ;
Tool center path
Programmed path
� Cutter compensation G code in the offset mode
� Command cancelling the offset vector temporarily
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
245
The following blocks have no tool movement. In these blocks, the tool will not move even if cutter compensation is effected.
M05 ; M code output. S21 ; S code output. G04 X10.0 ; Dwell G10 L11 P01 R10.0 ; Cutter compensation value setting (G17) Z200.0 ; Move command not included in the
offset plane. G90 ; G code only. G91 X0 ; Move distance is zero.
Commands (1) to (6) are of no movement.
When a single block without tool movement is commanded in the offset mode, the vector and tool center path are the same as those when the block is not commanded. This block is executed at the single block stop point.
L
N6
N7 N8
L
SS
N6 G91 X100.0 Y100.0 ; N7 G04 X100.0 ; N8 X100.0 ;
Tool center path
Programmed path
Block N7 is executed here.
However, when the move distance is zero, even if the block is commanded singly, tool motion becomes the same as that when more than one block of without tool movement are commanded, which will be described subsequently.
L
N6
N7 N8
L SS
N6 G91 X100.0 Y100.0 ; N7 X0 ; N8 X100.0 ;
Programmed path
Tool center path
Two blocks without tool movement should not be commanded consecutively. If commanded, a vector whose length is equal to the offset value is produced in a normal direction to tool motion in earlier block, so overcutting may result.
L
N6
N7 N8
L SSS
N6 G91 X100.0 Y100.0 ; N7 S21 ; N8 G04 X10.0 ; N9 X100.0 ;
Blocks N7 and N8 are executed here.
N9 Programmed path
Tool center path
� A block without tool movement
A block without tool move- ment specified in offset mode
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
246
When two or more vectors are produced at the end of a block, the tool moves linearly from one vector to another. This movement is called the corner movement. If these vectors almost coincide with each other, the corner movement isn’t performed and the latter vector is ignored.
r
�Vx
�VY
This vector is ignored, if ∆Vx�∆V Limit, and ∆VY�∆V Limit
r
Programmed path
Tool center path
If ∆Vx�∆Vlimit and ∆Vy�∆Vlimit, the latter vector is ignored. The ∆Vlimit is set in advance by parameter (No. 5010). If these vectors do not coincide, a move is generated to turn around the corner. This move belongs to the latter block.
This move belongs to block N7, thus, the feedrate is equal to that in block N7. If the block N7 is G00 mode, the tool is moved at G00 mode, while if it is G01, G02, G03, the tool is moved at G01 mode.
S
N6 N7
However, if the path of the next block is semicircular or more, the above function is not performed. The reason for this is as follows:
� Corner movement
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
247
N4 G41 G91 G01 X150.0 Y200.‘0 ; N5 X150.0 Y200.0 ; N6 G02 J–600.0 ; N7 G01 X150.0 Y–200.0 ; N8 G40 X150.0 Y–200.0 ; P1
P2 P3 P4P5
P6
N5
N6
N4
N7
N8
Programmed pathTool center path
If the vector is not ignored, the tool path is as follows: P1 → P2 → P3 → (Circle) → P4 → P5 → P6 But if the distance between P2 and P3 is negligible, the point P3 is ignored. Therefore, the tool path is as follows: P2 → P4 Namely, circle cutting by the block N6 is ignored.
For manual operation during the cutter compensation, refer to Section III–3.5, “ Manual Absolute ON and OFF.”
� Interruption of manual operation
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
248
α
S
r
L C
α
L S
G40 r
L
Workpiece
G40
L
Programmed path
Programmed path Tool center path
Tool center path
Work- piece
Linear→Linear
Circular→Linear
14.5.4 #��� .��� ��� ��
0����� .��� ����
Explanations
� Tool movement around an inside corner (180°�α)
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
249
Tool path has two types, A and B; and they are selected by parameter SUP (No. 5003#0).
α
L S
G40
r
L
α
S
r
C
Type A
Type B
α
L S
G40
L
Intersection
r
α
S C
r r
L L
G40
L
G40
L
Programmed path
Workpiece
Tool center path
Linear→Linear
Circular→Linear
Linear→Linear
Work- piece
Programmed path Tool center path
Workpiece
Programmed path
Tool center path
Circular→Linear
Work- piece
Programmed path Tool center path Intersection
� Tool movement around an outside corner at an obtuse angle �,)°�α<�')°�
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
250
Tool path has two types, A and B : and they are selected by parameter SUP (No. 5003#0)
α
L S
G40
r
L
S C
Type A
Type B
r
α
G40
L
LL
Lr
r
L
L
S
r
r
C
L
L
G42
α G40
L
G42
L
α
S
Linear→Linear
Circular→Linear
Programmed path
Tool center path
Workpiece
Work- piece
Tool center pathProgrammed path
Linear→Linear
Circular→Linear
Workpiece
Programmed path
Tool center path
Programmed path Tool center path
Work- piece
� Tool movement around an outside corner at an acute angle (α<90°)
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
251
Start position
r
G40
(G42)
L
L
S
1°or less
Programmed path
Tool center path
When a block without tool movement is commanded together with an offset cancel, a vector whose length is equal to the offset value is produced in a normal direction to tool motion in the earlier block, the vector is cancelled in the next move command.
L
N6
N7 N8
L SS
N6 G91 X100.0 Y100.0 ; N7 G40 ; N8 X100.0 Z0 ;
Tool center path
Programmed path
� Tool movement around the outside linear→linear at an acute angle less than 1 degree (α<1°)
� A block without tool movement specified together with offset cancel
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
252
If a G41 or G42 block precedes a block in which G40 and I_, J_, K_ are specified, the system assumes that the path is programmed as a path from the end position determined by the former block to a vector determined by (I,J), (I,K), or (J,K). The direction of compensation in the former block is inherited.
E(a, b)
r
N1 (G42 mode) ; N2 G40 Xa Yb I_ J_ ;
(I, J)
r
X
S
N2
N1
(G42)
Workpiece
Programmed path
Tool center path
In the N1 block, the tool center moves towards X. In the N2 block, the tool moves towards E.
G40
In this case, note that the CNC obtains an intersection of the tool path irrespective of whether inner or outer side machining is specified
r
X
S
(G42)
E
G40
r
(I, J)
Tool center path
Programmed path
When an intersection is not obtainable, the tool comes to the normal position to the previous block at the end of the previous block.
E
(I, J)
r
S
G40 X
r
Tool center path
Programmed path(G42)
� Block containing G40 and I_J_K_
The previous block contains G41 or G42
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
253
In the example shown below, the tool does not trace the circle more than once. It moves along the arc from P1 to P2. The interference check function described in II–14.5.5 may raise an alarm.
(I, J)
N5
N6
N7
P1
P2
(G41) N5 G01 G91 X100.0 ; N6 G02 J–60.0 ; N7 G40 G01 X50.0 Y50.0 I–10.0 J–10.0 ;
Tool center path
Programmed path
To make the tool trace a circle more than once, program two or more arcs.
The length of the tool center path larger than the circumfer- ence of a circle
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
254
Tool overcutting is called interference. The interference check function checks for tool overcutting in advance. However, all interference cannot be checked by this function. The interference check is performed even if overcutting does not occur.
(1) The direction of the tool path is different from that of the programmed path (from 90 degrees to 270 degrees between these paths).
Tool center path Programmed path
Programmed path
Tool center path
The directions of these two paths are different (180°).
The directions of these two paths are different (180°).
14.5.5 Interference Check
Explanations
� Criteria for detecting interference
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
255
(2) In addition to the condition (1), the angle between the start point and end point on the tool center path is quite different from that between the start point and end point on the programmed path in circular machining(more than 180 degrees).
Center
N5 N6
N7
r1 r2
Tool center path
Programmed path
(G41) N5 G01 G91 X800.0 Y200.0 D1 ; N6 G02 X320.0 Y–160.0 I–200.0 J–800.0 D2 ; N7 G01 X200.0 Y–500.0 ; (Tool compensation value corresponding to D1 : r1 = 200.0) (Tool compensation value corresponding to D2 : r2 = 600.0)
In the above example, the arc in block N6 is placed in the one quadrant. But after cutter compensation, the arc is placed in the four quadrants.
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
256
(1) Removal of the vector causing the interference When cutter compensation is performed for blocks A, B and C and vectors V1, V2, V3 and V4 between blocks A and B, and V5, V6, V7 and V8 between B and C are produced, the nearest vectors are checked first. If interference occurs, they are ignored. But if the vectors to be ignored due to interference are the last vectors at the corner, they cannot be ignored. Check between vectors V4 and V5 Interference ––– V4 and V5 are ignored. Check between V3 and V6 Interference ––– V3 and V6 are ignored Check between V2 and V7 Interference ––– V2 and V7 are Ignored Check between V1 and V8 Interference ––––– V1 and V8 are cannot be ignored If while checking, a vector without interference is detected, subsequent vectors are not checked. If block B is a circular movement, a linear movement is produced if the vectors are interfered.
(Example 1) The tool moves linearly from V1 to V8
Tool center path C C
C
r r
V1 V2
V3
V4V5
V6
V7 V8
A
O1 O2
B
Programmed path
V4, V5 : Interference V3, V6 : Interference V2, V7 : Interference V1, V8 : No Interference
� Correction of interference in advance
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
257
(Example 2) The tool moves linearly from V1, V2, V7, to V8
V6 V3
V5
C C
C
r r
V1 V2
V4
V7 V8
A
O1 O2
B
V4, V5 : Interference V3, V6 : Interference V2, V7 : No Interference
Programmed path
Tool center path
(2) If the interference occurs after correction (1), the tool is stopped with an alarm. If the interference occurs after correction (1) or if there are only one pair of vectors from the beginning of checking and the vectors interfere, the P/S alarm (No.41) is displayed and the tool is stopped immediately after execution of the preceding block. If the block is executed by the single block operation, the tool is stopped at the end of the block.
C
V6
A
B
V5 V2
V1
Stopped
Tool center path
Programmed path
After ignoring vectors V2 and V5 because of interference, interference also occurs between vectors V1 and V6. The alarm is displayed and the tool is stopped.
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
258
(1) Depression which is smaller than the cutter compensation value
Tool center path
A B
C
Stopped
Programmed path
There is no actual interference, but since the direction programmed in block B is opposite to that of the path after cutter compensation the tool stops and an alarm is displayed.
(2) Groove which is smaller than the cutter compensation value
A B C
Programmed pathTool center path
Stopped
Like (1), P/S alarm is displayed because of the interference as the direction is reverse in block B.
� When interference is assumed although actual interference does not occur
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
259
When the radius of a corner is smaller than the cutter radius, because the inner offsetting of the cutter will result in overcuttings, an alarm is displayed and the CNC stops at the start of the block. In single block operation, the overcutting is generated because the tool is stopped after the block execution.
Tool center path
ÇÇÇÇ ÇÇÇÇ
Programmed path
Workpiece
An alarm is generated and the operation stops
An alarm is generated and the operation stops here in single block operation
If the CNC does not stop, overcutting occurs
ÇÇ ÇÇ ÇÇ ÇÇ
Since the cutter compensation forces the path of the center of the tool to move in the reverse of the programmed direction, overcutting will result. In this case an alarm is displayed and the CNC stops at the start of the block.
ÇÇÇÇÇ ÇÇÇÇÇ ÇÇÇÇÇ ÇÇÇÇÇ
ÇÇÇÇÇ ÇÇÇÇÇ ÇÇÇÇÇ ÇÇÇÇÇ
Tool center path
Programmed path
Workpiece
An alarm is displayed and the operation stops
Overcutting if the operation would not stop
14.5.6 0���������" �! �����
� ���� ����
Explanations
� Machining an inside corner at a radius smaller than the cutter radius
� Machining a groove smaller than the tool radius
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
260
When machining of the step is commanded by circular machining in the case of a program containing a step smaller than the tool radius, the path of the center of tool with the ordinary offset becomes reverse to the programmed direction. In this case, the first vector is ignored, and the tool moves linearly to the second vector position. The single block operation is stopped at this point. If the machining is not in the single block mode, the cycle operation is continued. If the step is of linear, no alarm will be generated and cut correctly. However uncut part will remain.
ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ ÇÇÇÇÇÇÇ
S The first vector is ignored
Tool center path
Programmed path
Workpiece
Center of the circu- lar machining
An overcutting will result if the first vector is not ignored. However, tool moves linearly.
Linear movement Stop position after execution of a single block
It is usually used such a method that the tool is moved along the Z axis after the cutter compensation is effected at some distance from the workpiece at the start of the machining. In the case above, if it is desired to divide the motion along the Z axis into rapid traverse and cutting feed, follow the procedure below.
ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ
Work- piece
N1
N1 G91 G00 G41 X500.0 Y500.0 D1 ; N3 G01 Z–300.0 F100 ; N6 Y1000.0 F200 ;
N6
(500, 500) N3:Move command in Z axis
After compensation
In the program example above, when executing block N1, blocks N3 and N6 are also entered into the buffer storage, and by the relationship among them the correct compensation is performed as in the figure above. Then, if the block N3 (move command in Z axis) is divided as follows: As there are two move command blocks not included in the selected plane and the block N6 cannot be entered into the buffer storage, the tool center path is calculated by the information of N1 in the figure above. That is, the offset vector is not calculated in start–up and the overcutting may result.
� Machining a step smaller than the tool radius
� Starting compensation and cutting along the Z–axis
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
261
The above example should be modified as follows:
ÊÊÊÊÊ ÊÊÊÊÊ ÊÊÊÊÊ ÊÊÊÊÊ
N1
N1 G91 G00 G41 X500.0 Y500.0 D1 ; N3 G01 Z–250.0 ; N5 G01 Z–50.0 F100 ; N6 Y1000.0 F200 ;
N6
(500, 500) N3, N5:Move command for the Z axis
After compensation
Workpiece
The move command in the same direction as that of the move command after the motion in Z axis should be programmed.
ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ
ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ ÊÊÊÊ
N1
N1 G91 G00 G41 X500.0 Y400.0 D1 ; N2 Y100.0 ; N3 Z–250.0 ; N5 G01 Z–50.0 F100 ; N6 Y1000.0 F200 ;
N6
N2
Workpiece
After compensation
N3, N5 : Move command for the Z axis (2blocks) (500, 500)
As the block with sequence No. N2 has the move command in the same direction as that of the block with sequence No. N6, the correct compensation is performed.
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
262
Cutter compensation C is not performed for commands input from the MDI. However, when automatic operation using the absolute commands is temporarily stopped by the single block function, MDI operation is performed, then automatic operation starts again, the tool path is as follows : In this case, the vectors at the start position of the next block are translated and the other vectors are produced by the next two blocks. Therefore, from next block but one, cutter compensation C is accurately performed.
VB2
VB1
VC1’
VC1
VC2
VB1’
VB2’
PB
PA
PB’
PC
PD
Command for MDI
When position PA, PB, and PC are programmed in an absolute command, tool is stopped by the single block function after executing the block from PA to PB and the tool is moved by MDI operation. Vectors VB1 and VB2 are translated to VB1’ and VB2’ and offset vectors are recalculated for the vectors VC1 and VC2 between block PB–PC and PC–PD. However, since vector VB2 is not calculated again, compensation is accurately performed from position PC.
14.5.7 Input Command from MDI
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
263
A function has been added which performs positioning by automatically canceling a cutter compensation vector when G53 is specified in cutter compensation C mode, then automatically restoring that cutter compensation vector with the execution of the next move command. The cutter compensation vector restoration mode is of FS16/21/0i type when CCN (bit 2 of parameter No. 5003) is set to 0; it is of FS15 type when CCN is set to 1. When G28 or G30 is specified in cutter compensation C mode, automatic reference position return is performed by automatically canceling a cutter compensation vector, that cutter compensation vector automatically being restored with the execution of the next move command. In this case, the timing and format of cutter compensation vector cancellation/restoration, performed when CCN (bit 2 of parameter No. 5003) is set to 1, are changed to FS15 type. When CCN (bit 2 of parameter No. 5003) is set to 0, the conventional specification remains applicable.
When G29 is specified in cutter compensation C mode, the cutter compensation vector is automatically canceled/restored. In this case, the timing and format of cutter compensation vector cancellation/restoration, performed when CCN (bit 2 of parameter No. 5003) is set to 1, are changed to FS15 type. When CCN (bit 2 of parameter No. 5003) is set to 0, the conventional specification remains applicable.
When G53 is specified in cutter compensation C mode, the previous block generates a vector that is perpendicular to the move direction and which has the same magnitude as the offset value. Then, the offset vector is canceled when movement to a specified position is performed in the machine coordinate system. In the next block, offset mode is automatically resumed.
Note that cutter compensation vector restoration is started when CCN (bit 2 of parameter No. 5003) is set to 0; when CCN is set to 1, an intersection vector is generated (FS15 type).
14.5.8 G53,G28,G30 and G29 Commands in Cutter Compensation C Mode
Explanations
� G53 command in cutter compensation C mode
PROGRAMMING14.  COMPENSATION FUNCTION
265
When CCN (bit2 of parameter No.5003)=1
G90G00
[FS15 Type]
r
s
s
(G91G41G00) G53
G00
(3)G53 specified in offset mode with no movement specified When CCN (bit2 of parameter No.5003)=0
Oxxxx; G90G41_ _;
G00X20.Y20. ; G53X20.Y20.  COMPENSATION FUNCTION B–64124EN/01
266
WARNING 1 When cutter compensation C mode is set and all–axis machine lock is applied, the G53
command does not perform positioning along the axes to which machine lock is applied. The vector, however, is preserved. When CCN (bit 2 of parameter No. 5003) is set to 0, the vector is canceled. (Note that even if the FS15 type is used, the vector is canceled when each–axis machine lock is applied.)
Example 1: When CCN (bit 2 of parameter No. 5003) = 0, type A is used, and all–axis machine lock is applied
Example 2: When CCN (bit 2 of parameter No. 5003) = 1 and all–axis machine lock is applied [FS15 type]
Example 3: When CCN (bit 2 of parameter No. 5003) = 1 and specified–axis machine lock is applied [FS15 type]
2 When G53 is specified for a compensation axis in cutter compensation mode, the vectors along the other axes are also canceled. (This also applies when CCN (bit 2 of parameter No.5003) is set to 1. When the FS15 type is used, only the vector along a specified axis is canceled. Note that the FS15 type cancellation differs from the actual FS15 specification in this point.)
 COMPENSATION FUNCTION
267
NOTE 1 When a G53 command specifies an axis that is not in the cutter compensation C plane, a
perpendicular vector is generated at the end point of the previous block, and the tool does not move. In the next block, offset mode is automatically resumed (in the same way as when two or more continuous blocks do not specify any move commands).
Example: When CCN (bit 2 of parameter No. 5003) = 0, and type A is used
2 When a G53 block is specified to become a start–up block, the next block actually becomes the start–up block. When CCN (bit 2 of parameter No. 5003) is set to 1, an intersection vector is generated.
Example: When CCN (bit 2 of parameter No. 5003) = 0 and type A is used
s
G53Z_
G00
(G41G00X_Y_)
�
�
s
sG00
G00
Start–up
s
G00
G41G53 �
s
sG00
G00Start–up
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
268
When G28 or G30 is specified in cutter compensation C mode, an operation of FS15 type is performed if CCN (bit 2 of parameter No. 5003) is set to 1.
This means that an intersection vector is generated in the previous block, and a perpendicular vector is generated at an intermediate position. Offset vector cancellation is performed when movement is made from the intermediate position to the reference position. As part of restoration, an intersection vector is generated between a block and the next block.
(1)G28 or G30, specified in offset mode (with movement to both an intermediate position and reference position performed)
(a) For return by G29 When CCN (bit 2 of parameter No. 5003) = 0
Oxxxx; G91G41_ _ _;
G28X40.Y0 ; G29X45.Y15. ;
G29
[Type A] Intermediate position G28/30
r
rs (G42G01)
G01s s Return posiiton
Reference position
G29
[Type B] Intermediate position G28/30
s (G42G01)
G01s s
s
s
r
Return posiiton
Reference position
When CCN (bit 2 of parameter No. 5003) = 1
G29
[FS15 Type] Intermediate position G28/30 s
(G42G01) G01
s s
�
s
Return posiiton
Reference position
� G28 or G30 command in cutter compensation C mode
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
269
(b) For return by G00 When CCN (bit 2 of parameter No. 5003) = 0
G00
[Type A]
(G42G01)
G01s
��
s
s
Oxxxx; G91G41_ _ _;
G28X40.Y0 ;
G00
[Type B]
s
(G42G01)
G01s
��
s
s
Reference position
Reference position
s
Intermediate position G28/30
Intermediate position G28/30
When CCN (bit 2 of parameter No. 5003) = 1
G00
[FS15 Type]
s
(G42G01)
G01s
��
s
s
Reference position
Intermediate position G28/30
(2)G28 or G30, specified in offset mode (with movement to an intermediate position not performed)
(a) For return by G29 When CCN (bit 2 of parameter No. 5003) = 0
O××××; G91G41_ _ _;
G28X0Y0 ; G29X0Y0 ; G29
[Type A]
r
s(G42G01) G01
G29
[Type B]
G28/30
s(G42G01) G01 s
s
s
G28/30 G01
r
s
G01
Intermediate position = return position
Intermediate position = return position
Reference position
Reference position
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
270
When CCN (bit 2 of parameter No. 5003) = 1
G29
[FS15 Type]
G28/30
s(G42G01) G01 s
r
s
G01
Intermediate position = return position
Reference position
(b)For return by G00 When CCN (bit 2 of parameter No.5003)=0
Intermediate position
Oxxxx; G91G41_ _ _;
G28X0Y0 ;
G00
[Type A]
r s(G42G01)
[Type B]
G28/30
s(G42G01)
s
s
s
G28/30
G01
r
s G01
r
Start–up
G00
r
Reference position
Intermediate position
Start–up
Reference position
When CCN (bit 2 of parameter No.5003)=1
G00
[FS15 Type]
G28/30
s
(G41G01) G01s
r
s
Reference position
Intermediate position
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
271
(3)G28 or G30, specified in offset mode (with movement to a reference position not performed) (a) For return by G29
When CCN (bit 2 of parameter No.5003)=0
Oxxxx; G91G41_ _ _;
G28X40.Y–40.; G29X40.Y40.;
G29
[Type A]
r s(G42G01)
[Type B]
G28/30
s
(G42G01) s
s
s G28/30
G01
r s G01
r
r G29
Reference position =Intermediate position
Return position
Return position
Reference position =Intermediate position
When CCN (bit 2 of parameter No.5003)=1
G29
[FS15 Type]
G28/30 s(G42G01) G01
r s
s
Return position
Reference position =Intermediate position
(b)For return by G00 When CCN (bit 2 of parameter No.5003)=0
Oxxxx; G91G41_ _ _;
G28X40.Y–40.;  COMPENSATION FUNCTION B–64124EN/01
272
(4)G28 or G30 specified in offset mode (with no movement performed)
(a) For return by G29 When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X0Y0; G29X0Y0;
[Type A]
r
s (G41G01)
[Type B] G28/30/G29
(G41G01)
G28/30/G29
G01
r
s G01
G01
G01
Reference position =Intermediate position =return position
Intersection vector
Reference position =Intermediate position =return position
Intersection vector
When CCN (bit 2 of parameter No.5003)=1
G01
[FS15 Type] G28/30/G29
s
(G42G01) r
G01Reference position =Intermediate position =return position
Intersection vector
(b)For return by G00 When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X0Y0; G00
[Type A]
r s
(G41G01)
[Type B]
G28/30
(G41G01) s
s
G28/30
G01
r s
G01
Start–up
r G00
Start–up
Reference position =Intermediate position
Reference position =Intermediate position
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
273
When CCN (bit 2 of parameter No.5003)=1
G00
[FS15 Type]
G28/30
(G41G01)
G01
r
s Reference position =Intermediate position
WARNING 1 When a G28 or G30 command is specified during all–axis machine lock, a perpendicular offset
vector is applied at the intermediate position, and movement to the reference position is not performed; the vector is preserved. Note, however, that even if the FS15 type is used, the vector is canceled only when each–axis machine lock is applied. (The FS15 type preserves the vector even when each–axis machine lock is applied.)
Example1: When CCN (bit 2 of parameter No.5003)=1 and all–axis machine lock is applied
Example2: When CCN (bit 2 of parameter No.5003)=1 and each–axis machine lock is applied
2 When G28 or G30 is specified for a compensation axis in cutter compensation mode, the vectors along the other axes are also canceled. (This also applies when CCN (bit 2 of parameter No. 5003) is set to 1. When the FS15 type is used, only the vector along a specified axis is canceled. Note that the FS15 type cancellation differs from the actual FS15 specification in this point.)
Example: When CCN (bit 2 of parameter No.5003)=1
G28
(G42G01) r
s
G01
s G01
[FS15Type ]
s
r
s Reference position or floating reference positionIntermediate position
G28Z_
s s
s
r
G00
G00 (G41G00X_Z_)
Intermediate position Reference position or floating reference position
(G42G01)
r
s
s
[FS15Type]
s
G01
G01G28 s
Reference position or floating reference positionIntermediate position
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
274
NOTE 1 When a G28 or G30 command specifies an axis that is not in the cutter compensation C plane,
a perpendicular vector is generated at the end point of the previous block, and the tool does not move. In the next block, offset mode is automatically resumed (in the same way as when two or more continuous blocks do not specify any move commands).
Example: When CCN (bit 2 of parameter No. 5003) = 1
2 When a G28 or G30 block is specified such that the block becomes a start–up block, a vector perpendicular to the move direction is generated at an intermediate position, then subsequently canceled at the reference position. In the next block, an intersection vector is generated.
Example: When CCN (bit 2 of parameter No.5003)=1
s
G28(G30/30.1)Z__
G01 (G41G01X_Y_)
r
s
s
[FS15 Type]
G01
[FS15 Type] G01
r
s
G42G28
s
s G01
G01
s
Reference position or floating reference position
Intermediate position
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
275
When G29 is specified in cutter compensation C mode, an operation of FS15 type is performed if CCN (bit 2 of parameter No. 5003) is set to 1.
This means that an intersection vector is generated in the previous block, and vector cancellation is performed when a movement to an intermediate position is performed. When movement from the intermediate position to the return position is performed, the vector is restored; an intersection vector is generated between the block and the next block.
(1)G29 specified in offset mode (with movement to both an intermediate position and reference position performed)
(a) For specification made immediately after automatic reference position return When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X40.Y0; G29X45.Y15.;
G29
[Tlype A]
r
s
(G42G01)
G01
G29
[Type B]
G28/30
s
(G42G01)
G01 s
s
s G28/30
ss
s
Return position
Reference position
Reference position
Intermediate position
Return position Intermediate position
When CCN (bit 2 of parameter No.5003)=1
G29
[FS15Type]
G28/30
(G42G01)
G01
s
r ss
s
Return position
Reference position
Intermediate position
� G29 command in cutter compensation C mode
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
276
(b)For specification made other than immediately after automatic reference position return
When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G29X40.Y40.;
[Type A]
G29
[Type B]
(G42G01) G01
s
s r
ss
ss r
(G42G01) r
r
G01
Return position
Intermediate position
G29
Intermediate position
Return position
Start–up
Start–up
When CCN (bit 2 of parameter No.5003)=1
G29
[FS15 Type]
(G42G01) G01s
ss
Intermediate position
Return position
(2)G29 specified in offset mode (with movement to an intermediate position not performed)
(a) For specification made immediately after automatic reference position return
When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X40.Y–40.; G29X40.Y40.;
[Type A]
(G42G01)
G29
[Type B]
s
(G42G01)
s G28/30 r
s
r
s G28/30
s G29
s r
G01
G01
Reference position =Intermediate position
Return position
Return position
Reference position =Intermediate position
PROGRAMMINGB–64124EN/01 14.  COMPENSATION FUNCTION B–64124EN/01
278
(3)G29 specified in offset mode (with movement to a reference position not performed)
(a) For specification made immediately after automatic reference position return
When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X0Y0; G29X0Y0;
[Type A]
(G42G01)
G29
s s
G28/30
s
r
[Type B]
(G42G01)
G29
s s
G28/30
s
r G01
G01
G01
G01
Intermediate position =Return position
Reference position
Intermediate position =Return position
Reference position
When CCN (bit 2 of parameter No.5003)=1
G29
[FS15 Type]
G28/30
(G42G01) G01 s
r
s
s
G01
Intermediate position =Return position
Reference position
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
279
(b)For specification made other than immediately after automatic reference position return
O××××; G91G41_ _ _;
G29X0Y0;
[Type A]
(G42G01)
G29
[Type B]
s
(G42G01)
s
s
r
s
s
G29
s G01
G01
G01
G01
Intermediate position =Return position
Intermediate position =Return position
When CCN (bit 2 of parameter No.5003)=1
[FS15 Type]
(G42G01) s
s
G29
s G01
G01
Intermediate position =Return position
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
280
(4)G29 specified in offset mode (with movement to an intermediate position and reference position not performed)
(a) For specification made immediately after automatic reference position return
When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G28X0Y0; G29X0Y0;
[Type A]
(G41G01)
s
s
G28/30,G29
r
[Type B]
(G41G01)
s s
r
G01
G01 G01
G01
s
G28/30,G29
Reference position =Intermediate position =return position
Intersection vector
Intersection vector
Reference position =Intermediate position =return position
When CCN (bit 2 of parameter No.5003)=1
[FS15 Type]
G28/30,G29
(G42G01) G01
r
s s G01
Intersection vector
Reference position =Intermediate position =return position
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
281
(b)For specification made other than immediately after automatic reference position return
When CCN (bit 2 of parameter No.5003)=0
O××××; G91G41_ _ _;
G29X0Y0;
[Type A]
(G41G01)
s
r
[Type B]
(G41G01) s
s r G01
G01 G01
G01
s G29
G29
Intermediate position=return position
Intermediate position=return position
When CCN (bit 2 of parameter No.5003)=1
[FS15 Type]
(G41G01) G01r
s
s
G01 G29
Intermediate position=return position
NOTE When a G29 command is specified for an axis that is not in the cutter compensation C plane in cutter compensation C mode, a perpendicular vector is generated at the end point of the previous block, and the tool does not move. In the next block, an intersection vector is generated (in the same way as when two or more continuous blocks do not specify any move commands).
s G29Z__
(G41G01X_Y_)
r
s
G01G01
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
282
By specifying G39 in offset mode during cutter compensation C, corner circular interpolation can be performed. The radius of the corner circular interpolation equals the compensation value.
In offset mode
or
G39 ;
; I_J_ I_K_ J_K_
G39
When the command indicated above is specified, corner circular interpolation in which the radius equals compensation value can be performed. G41 or G42 preceding the command determines whether the arc is clockwise or counterclockwise. G39 is a one–shot G code.
When G39; is programmed, the arc at the corner is formed so that the vector at the end point of the arc is perpendicular to the start point of the next block.
When G39 is specified with I, J, and K, the arc at the corner is formed so that the vector at the end point of the arc is perpendicular to the vector defined by the I, J, and K values.
In a block containing G39, no move command can be specified.
Two or more consecutive non–move blocks must not be specified after a block containing G39 without I, J, or K. (A single block specifying a travel distance of zero is assumed to be two or more consecutive non–move blocks.) If the non–move blocks are specified, the offset vector is temporarily lost. Then, offset mode is automatically restored.
14.5.9 Corner Circular Interpolation (G39)
Format
Explanations
� Corner circular interpolation
� G39 without I, J, or K
� G39 with I, J, and K
Limitations
� Move command
� Non–move command
PROGRAMMINGB–64124EN/01 14.

Block N1 Offset vector Block N2
Block N3
Programmed path
Tool center path
!:�;���0 <����"
(0.0, 10.0)
(–10.0, 20.0)
Examples
� G39 without I, J, or K
� G39 with I, J, and K
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
284
Tool compensation values include tool geometry compensation values and tool wear compensation (Fig. 14.6 (a)).
OFSG
OFSW OFSG:Geometric compensation value
OFSW:Wear compensation value
ÇÇ ÇÇ ÇÇ ÇÇ
ÇÇ Reference position
Fig. 14.6 (a) Geometric compensation and wear compensation
Tool compensation values can be entered into CNC memory from the CRT/MDI panel (see section III–11.4.1) or from a program. A tool compensation value is selected from the CNC memory when the corresponding code is specified after address H or D in a program. The value is used for tool length compensation, cutter compensation, or the tool offset.
Table 14.6 (a) shows the valid input range of tool compensation values.
Table 14.6 (a) The valid input range of tool compensation value
Increment system
Geometric compensation value Wear compensation valueIncrement system Metric input Inch input Metric input Inch input
IS–B 999.999 mm 99.9999inch 99.999 mm 9.9999 inch
IS–C 999.9999 mm 99.99999inch 99.9999 mm 9.99999 inch
The memory can hold 400 tool compensation value (option). Address D or H is used in the program. The address used depends on which of the following functions is used: tool length compensation(see II–14.1), tool offset (see II–14.3), or cutter compensation C (see II–14.5). The range of the number that comes after the address (D or H) : 0 to 400.
14.6 TOOL COMPENSA– TION VALUES, NUMBER OF COMPENSATION VALUES, AND ENTERING VALUES FROM THE PROGRAM (G10)
Explanations
� Valid range of tool compensation values
� Number of tool compensation values and the addresses to be specified
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
285
Tool compensation memory C can be used. The tool compensation values are as following that are entered (set) (Table 14.6 (b)).
Table 14.6 (b) Setting contents tool compensation memory and tool compensation value
Tool compensation value Tool compensation memory C
Tool geometry compensation value for address D
set
Tool geometry compensation value for address H
set
Tool wear compensation for value ad- dress D
set
Tool wear compensation value for address H
set
The programming format depends on which tool compensation value is used.
Table 14.6 (c) Setting range of Tool compensation memory and Tool compensation value
Tool compensation value Format
C
Geometry compensation value for H code G10L10P_R_;
C Geometry compensation value for D code G10L12P_R_;
C Wear compensation value for H code G10L11P_R_;
Wear compensation value for D code G10L13P_R_;
P : Number of tool compensation R : Tool compensation value in the absolute command(G90) mode
Value to be added to the specified tool compensation value in the incremental command(G91) mode (the sum is also a tool compensation value.)
NOTE To provide compatibility with the format of older CNC programs, the system allows L1 to be specified instead of L11.
� Tool compensation memory and the tool compensation value to be entered
Format
� Input of tool compensation value by programing
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
286
A programmed figure can be magnified or reduced (scaling). The dimensions specified with X_, Y_, and Z_ can each be scaled up or down with the same or different rates of magnification. The magnification rate can be specified in the program. Unless specified in the program, the magnification rate specified in the parameter is applied.
Y
X
P4
P4’
P1
P1’
P3’
P2’
P2
P3
P0
P0:Scaling center 0
Fig. 14.7 (a) Scaling(P1 P2 P3 P4�P1’P2’P3’P4’)
G51X_Y_Z_P_ ; Scaling start
Scaling is effective.  (Scaling mode)
Scaling up or down along each axes at a different rate of magnification (mirror image)
WARNING Specify G51 in a separate block. After the figure is enlarged or reduced, specify G50 to cancel the scaling mode.
14.7 SCALING (G50, G51)
Format
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
287
Least input increment of scaling magnification is: 0.001 or 0.00001 It is depended on parameter SCR (No. 5400#7) which value is selected. Then, set parameter SCLx (No.5401#0) that enables scaling for each axis. If scaling P is not specified on the block of scaling (G51X_Y_Z_P_ ;), the scaling magnification set to parameter (No. 5411) is applicable. If X,Y,Z are omitted, the tool position where the G51 command was specified serves as the scaling center.
Each axis can be scaled by different magnifications. Also when a negative magnification is specified, a mirror image is applied. First of all, set a parameter XSC (No. 5400#6) which validates each axis scaling (mirror image). Then, set parameter SCLx (No. 5401#0) to enable scaling along each axis. Least input increment of scaling magnification of each axis (I, J, K) is 0.001 or 0.00001( set parameter SCR (No. 5400#7)). Magnification is set to parameter 5421 within the range +0.00001 to +9.99999 or +0.001 to +999.999 If a negative value is set, mirror image is effected. If magnification I, J or K is not commanded, a magnification value set to parameter (No. 5421) is effective. However, a value other than 0 must be set to the parameter.
NOTE Decimal point programming can not be used to specify the rate of magnification (I, J, K).
Y axis
X axis
b
a
d
a/b : Scaling magnification of X axis c/d : Scaling magnification of Y axis
0 : Scaling center
Programmed figure
Scaled figure
0 c
Fig. 14.7 (b) Scaling of each axis
Explanations
� Scaling up or down along all axes at the same rate of magnification
� Scaling of each axis, programmable mirror image (negative magnification)
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
288
Even if different magnifications are applie to each axis in circular interpolation, the tool will not trace an ellipse. When different magnifications are applied to axes and a circular interpolation is specified with radius R, it becomes as following figure 14.7 (c) (in the example shown below, a magnification of 2 is applied to the X–component and a magnification of 1 is applied to the Y– component.).
G90 G00 X0.0 Y100.0 ; G51 X0.0 Y0.0 Z0.0 I2000 J1000; G02 X100.0 Y0.0 R100.0 F500 ;
Above commands are equivalent to the following command:
G90 G00 X0.0 Y100.0 Z0.0 ; G02 X200.0 Y0.0 R200.0 F500 ;
Magnification of radius R depends on I, or J whichever is larger.
(0,0) (100.0) (200.0)
Y
X
Scaled shape
Fig. 14.7 (c) Scaling for circular interpolation1
When different magnifications are applied to axes and a circular interpolation is specified with I, J and K, it becomes as following figure 14.7 (d) (In the example shown below, a magnification of 2 is applied to the X–component and a magnification of 1 is applied to the Y–component.).
G90 G00 X0.0 Y0.0 ; G51 X0.0 Y0.0 I2000 J1000; G02 X100.0 Y0.0 I0.0 J–100.0 F500 ;
Above commands are equivalent to the following commands.
G90 G00 X0.0 Y100.0; G02 X200.0 Y0.0 I0.0 J–100.0 F500 ;
In this case, the end point does not beet the radius, a linear section is included.
(0,0) (100.0) (200.0)
Y
X
Scaled shape
(100.0)
(200.0)
Fig. 14.7 (d) Scaling for circular interpolation 2
� Scaling of circular interpolation
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
289
This scaling is not applicable to cutter compensation values, tool length offset values, and tool offset values (Fig. 14.7 (e)).
Cutter compensation values are not scaled.
Programmed figure
Scaled figure
Fig. 14.7 (e) Scaling during cutter compensation
Scaling is not applicable to the Z–axis movement in case of the following canned cycle. ⋅Cut–in value Q and retraction value d of peck drilling cycle (G83, G73). ⋅Fine boring cycle (G76) ⋅Shift value Q of X and Y axes in back boring cycle (G87). In manual operation, the travel distance cannot be increased or decreased using the scaling function.
In scaling mode, G27, G28, G29, G30, or commands related to the coordinate system (G52 to G59, G92) must not be specified. When any of these G codes is necessary, specify it after canceling scaling mode.
WARNING 1 If a parameter setting value is employed as a scaling magnification without specifying P, the
setting value at G51 command time is employed as the scaling magnification, and a change of this value, if any, is not effective.
2 Before specifying the G code for reference position return (G27, G28, G29, G30) or coordinate system setting (G52 to G59, G92), cancel the scaling mode.
3 If scaling results are rounded by counting fractions of 5 and over as a unit and disregarding the rest, the move amount may become zero. In this case, the block is!regarded as a no movement block, and therefore, it may affect the tool movement by!cutter compensation C. See the description of blocks that do not move the tool at II–14.5.3.
� Tool compensation
� Invalid scaling
� Commands related to reference position return and coordinate system
PROGRAMMING14.
Example of a mirror image program Subprogram O9000 ; G00 G90 X60.0 Y60.0; G01 X100.0 F100; G01 Y100.0; G01 X60.0 Y60.0; M99; Main program N10 G00 G90; N20M98P9000; N30 G51 X50.0 Y50.0 I–1000 J1000; N40 M98 P9000; N50 G51 X50.0 Y50.0 I–1000 J–1000; N60 M98 P9000; N70 G51 X50.0 Y50.0 I1000 J–1000 N80 M98 P9000; N90 G50;
60 50
100
50 60 100
Y
X
40
400
Fig. 14.7 (f) Example of a mirror image program
Examples
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
291
A programmed shape can be rotated. By using this function it becomes possible, for example, to modify a program using a rotation command when a workpiece has been placed with some angle rotated from the programmed position on the machine.Further, when there is a pattern comprising some identical shapes in the positions rotated from a shape, the time required for programming and the length of the program can be reduced by preparing a subprogram of the shape and calling it after rotation.
Angle of rotation
Center of rotation
�
�
Fig. 14.8 (a) Coordinate system rotation
G68 α_β_R_ ; Start rotation of a coordinate system.
G17 (G18 or G19) : Select the plane in which contains the figure to be rotated.
α_β_ Absolute command for two of the x_,y_,and Z_ axes that correspond to the current plane selected by a command (G17, G18, or G19). The command specifies the coordinates of the center of rotation for the values specified subsequent to G68.
R_ Angular displacement with a positive value indicates counter clockwise rotation. Bit 0 of parameter 5400 selects whether the specified angular displacement is alwarys considered an absolute value or is considered an absolute or incremental value depending on the specified G code (G90 or G91).
Least input increment: 0.001 deg Valid data range : –360,000 A360,000
Coordinate system rotation mode (The coordinate system is rotated.)
G69 ; Coordinate system rotation cancel command
Format
Meaning of command
G17 G18 G19
14.8 COORDINATE SYSTEM ROTATION (G68, G69)
Format
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
292
(α, β)
X
Z
Center of rotation
Angle of rotation R (incremental value) Angle of rotation (absolute value)
Fig. 14.8 (b) Coordinate system rotation
NOTE When a decimal fraction is used to specify angular displacement (R_), the 1’s digit corresponds to degree units.
The G code for selecting a plane (G17,G18,or G19) can be specified before the block containing the G code for coordinate system rotation (G68). G17, G18 or G19 must not be designated in the mode of coordinate system rotation.
The center of rotation for an incremental command programmed after G68 but before an absolute command is the tool position when G68 was programmed (Fig. 14.8 (c)).
When α_β_ is not programmed, the tool position when G68 was programmed is assumed as the center of rotation.
When R_ is not specified, the value specified in parameter 5410 is assumed as the angular displacement.
The G code used to cancel coordinate system rotation (G69) may be specified in a block in which another command is specified.
Cutter compensation, tool length compensation, tool offset, and other compensation operations are executed after the coordinate system is rotated.
Explanations
� G code for selecting a plane: G17,G18 or G19
� Incremental command in coordinate system rotation mode
� Center of rotation
� Angular displacement
� Coordinate system rotation cancel command
� Tool compensation
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
293
In coordinate system rotation mode, G codes related to reference position return (G27, G28, G29, G30, etc.) and those for changing the coordinate system (G52 to G59, G92, etc.) must not be specified. If any of these G codes is necessary, specify it only after canceling coordinate system rotation mode.
The first move command after the coordinate system rotation cancel command (G69) must be specified with absolute values. If an incremental move command is specified, correct movement will not be performed.
N1 G92 X�500.0 Y�500.0 G69 G17 ; N2 G68 X700.0 Y300.0 R60.0 ; N3 G90 G01 X0 Y0 F200 ;
(G91X500.0Y500.0) N4 G91 X1000.0 ; N5 G02 Y1000.0 R1000.0 ; N6 G03 X�1000.0 I�500.0 J�500.0 ; N7 G01 Y�1000.0 ; N8 G69 G90 X�500.0 Y�500.0 M02 ;
Tool path when the incremental command is designated in the N3 block (in parenthesis)
Originally programmed tool path
Center of rotation (700.0,300.0)
Tool path after rotation
6��
(–500.0,–500.0)
!�0�"
Fig. 14.8 (c) Absolute/incremental command during coordinate system rotation
Limitations
� Commands related to reference position return and the coordinate system
� Incremental command
Explanations
Absolute/Incremental position commands
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
294
N1 G92 X0 Y0 G69 G01 ; N2 G42 G90 X1000 Y1000 F1000 D01 ; N3 G68 R�30000 ; N4 G91 X2000 ; N5 G03 Y1000 R1000 J500 ; N6 G01 X�2000 ; N7 Y�1000 ; N8 G69 G40 G90 X0 Y0 M30 ;
It is possible to specify G68 and G69 in cutter compensation C mode. The rotation plane must coincide with the plane of cutter compensa- tion C.
Programmed shape before coordinate system rotation
Programmed shape after coordinate system rotation
Tool path
30°
(0, 0)
Fig. 14.8 (d) Cutter compensation C and coordinate system rotation
If a coordinate system rotation command is executed in the scaling mode (G51 mode), the coordinate value (α,β,) of the rotation center will also be scaled, but not the rotation angle (R). When a move command is issued, the scaling is applied first and then the coordinates are rotated. A coordinate system rotation command (G68) should not be issued in cutter compensation C mode (G41, G42) on scaling mode (G51). The coordinate system rotation command should always be specified prior to setting the cutter compensation C mode.
1. When the system is not in cutter compensation mode C, specify the commands in the following order :
G51 ; scaling mode start G68 ; coordinate system rotation mode start
G69 ; coordinate system rotation mode cancel G50 ; scaling mode cancel
Examples
� Cutter compensation C and coordinate system rotation
� Scaling and coordinate system rotation
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
295
2. When the system is in cutter compensation model C, specify the commands in the following order (Fig. 14.8 (e)) : (cutter compensation C cancel)
G51 ; scaling mode start G68 ; coordinate system rotation start
: G41 ;cutter compensation C mode start
:
When only coordinate system rotation is applied
When scaling and coordinate system rotation are applied
When only scaling is applied
Cutting program
0
100.0
200.0
200.0 400.0 X
Y
G92 X0 Y0 ; G51 X300.0 Y150.0 P500 ; G68 X200.0 Y100.0 R45.0 ; G01 X400.0 Y100.0 ; Y100.0 ; X–200.0 ; Y–100.0 ; X200.0 ;
Fig. 14.8 (e) Scaling and coordinate system rotation in cutter compensation C mode
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
296
It is possible to store one program as a subprogram and recall subprogram by changing the angle.
Programmed path
When offset is applied(0, –10.0)
Subprogram
(0, 0)
Sample program for when the RIN bit (bit 0 of parameter 5400) is set to 1. The specified angular displancement is treated as an absolute or incremental value depending on the specified G code (G90 or G91).
G92 X0 Y0 G69 G17; G01 F200 H01 ; M98 P2100 ; M98 P072200 ; G00 G90 X0 Y0 M30 ;
O 2200 G68 X0 Y0 G91 R45.0 ; G90 M98 P2100 ; M99 ;
O 2100 G90 G01 G42 X0 Y–10.0 ; X4.142 ; X7.071 Y–7.071 ; G40 ; M99 ;
Fig. 14.8 (f) Coordinate system rotation command
� Repetitive commands for coordinate system rotation
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
297
When a tool with a rotation axis (C–axis) is moved in the XY plane during cutting, the normal direction control function can control the tool so that the C–axis is always perpendicular to the tool path (Fig. 14.9 (a)).
Tool
Tool
Programmed tool pat)
Normal direction (in which the tool moves)
C–axi�
C–axi�
Fig. 14.9 (a) Sample Movement of the tool
G code Function Explanation
G41.1 or G151 Normal direction control left
If the workpiece is to the right of the tool path looking toward the direc- tion in which the tool advances, the normal direction control left (G41.1 or G151) function is speci-
G42.1 or G152 Normal direction control right
(G41.1 or G151) function is speci- fied. After G41.1 (or G151) or G42.1 (or G152) is specified, the normal direction control function is en- abled (normal direction control
G40.1 or G150 Normal direction control cancel
abled (normal direction control mode). When G40.1 (or G150) is speci- fied, the normal direction control mode is canceled.
14.9 NORMAL DIRECTION CONTROL (G40.1, G41.1, G42.1 OR G150, G151, G152)
��� �
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
298
Center of the arc
Fig. 14.9 (c) Normal direction control right (G42.1)
Programmed path
Cutter center path
Fig. 14.9 (b) Normal direction control left (G41.1)
Cutter center path
Programmed path
When viewed from the center of rotation around the C–axis, the angular displacement about the C–axis is determined as shown in Fig. 14.9 (d). The positive side of the X–axis is assumed to be 0 , the positive side of the Y–axis is 90°, the negative side of the X–axis is 180°, and the negative side of the Y–axis is 270°.
Center of rotation
+Y
180° +X
270°
0°
90°
Fig. 14.9 (d) Angle of the C axis
When the cancel mode is switched to the normal direction control mode, the C–axis becomes perpendicular to the tool path at the beginning of the block containing G41.1 or G42.1. In the interface between blocks in the normal direction control mode, a command to move the tool is automatically inserted so that the C–axis becomes perpendicular to the tool path at the beginning of each block. The tool is first oriented so that the C–axis becomes perpendicular to the tool path specified by the move command, then it is moved along the X– and Y axes. In the cutter compensation mode, the tool is oriented so that the C–axis becomes perpendicular to the tool path created after compensation. In single–block operation, the tool is not stopped between a command for rotation of the tool and a command for movement along the X– and Y–axes. A single–block stop always occurs after the tool is moved along the X– and Y–axes.
Explanations
� ��"�� �� ��� ���
� Normal direction control of the C axis
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
299
S
N1
N2
S
N3
S
Programmed path
S : Single block stop point
Cutter center path
Fig. 14.9 (e) Point at which a Single–Block Stop Occurs in the Normal Direction Control Mode
Before circular interpolation is started, the C–axis is rotated so that the C–axis becomes normal to the arc at the start point. During circular interpolation, the tool is controlled so that the C–axis is always perpendicular to the tool path determined by circular interpolation.
Center of the arc Programmed path
Tool center path
The tool is controlled so that the C– axis is always normal to the tool path de- termined by circular interpolation.
A rotation command is inserted so that the C–axis becomes nor- mal to the arc at the start point.
Fig. 14.9 (f) Normal direction control of the circular interpolation
NOTE During normal direction control, the C axis always rotates through an angle less than 180 deg. I.e., it rotates in whichever direction provides the shorter route.
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
300
Movement of the tool inserted at the beginning of each block is executed at the feedrate set in parameter 5481. If dry run mode is on at that time, the dry run feedrate is applied. If the tool is to be moved along the X–and Y–axes in rapid traverse (G00) mode, the rapid traverse feedrate is applied.
The federate of the C axis during circular interpolation is defined by the following formula.
Amount of movement of the C axis (deg)
Length of arc (mm or inch) (deg/min)F×
F : Federate (mm/min or inch/min) specified by the corresponding block of the arc
Amount of movement of the C axis : The difference in angles at the beginning and the end of the block.
NOTE If the federate of the C axis exceeds the maximum cutting speed of the C axis specified to parameter No. 1422, the federate of each of the other axes is clamped to keep the federate of the C axis below the maximum cutting speed of the C axis.
A C–axis to which normal–direction control is applied can be assigned to any axis with parameter No. 5480.
When the rotation angle to be inserted, calculated by normal–direction control, is smaller than the value set with parameter No. 5482, the corresponding rotation block is not inserted for the axis to which normal–direction control is applied. This ignored rotation angle is added to the next rotation angle to be inserted, the total angle being subject to the same check at the next block. If an angle of 360 degrees or more is specified, the corresponding rotation block is not inserted. If an angle of 180 degrees or more is specified in a block other than that for circular interpolation with a C–axis rotation angle of 180 degrees or more, the corresponding rotation block is not inserted.
� C axis feedrate
� Normal direction control axis
� Angle for which figure insertion is ignored
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
301
Specify the maximum distance for which machining is performed with the same normal direction as that of the preceding block.
� Linear movement When distance N2, shown below, is smaller than the set value, machining for block N2 is performed using the same direction as that for block N1.
N1
N2
N3
Tool–center path
Distance
Programmed path
� Circular movement When the diameter of block N2, shown below, is smaller than the set value, machining for block N2 is performed using the same normal direction as that for block N1. The orientation of the axis to which normal–direction control is applied, relative to the normal direction of block N2, does not change as machining proceeds along the arc.
N1
N2
N3
Tool–center path
Programmed path
Diameter
NOTE 1 Do not specify any command to the C axis during normal
direction control. Any command specified at this time is ignored.
2 Before processing starts, it is necessary to correlate the workpiece coordinate of the C axis with the actual position of the C axis on the machine using the coordinate system setting (G92) or the like.
3 The helical cutting option is required to use this function. Helical cutting cannot be specified in the normal direction control mode.
4 Normal direction control cannot be performed by the G53 move command.
5 The C–axis must be a rotation axis.
� Movement for which arc insertion is ignored
PROGRAMMING14. COMPENSATION FUNCTION B–64124EN/01
302
A mirror image of a programmed command can be produced with respect to a programmed axis of symmetry (Fig. 14.10).
Y
10060
50
5� X
60
100 (1)(2)
(3) (4)
(1) Original image of a programmed command
Axis of symmetry (X=50)
Axis of symmetry (Y=50)
(2) Image symmetrical about a line parallel to the Y–axis and crossing the X–axis at 50
(3) Image symmetrical about point (50, 50)
(4) Image symmetrical about a line parallel to the X–axis and crossing the Y–axis at 50
40
0
400
Fig. 14.10 Programmable Mirror image
G51.1 _ ; Setting a programmable image A mirror image of a command specified in these blocks is produced with respect to the axis of symmetry specified by G51.1 _;.
G50.1 _ ; Canceling a programmable mirror image
_ : Point (position) and axis of symmetry for producing a mirror image when specified with G51.1. Axis of symmetry for producing a mirror image when specified with G50.1. Point of symmetry is not speci– fied.
IP
IP
IP
IP
14.10 PROGRAMMABLE MIRROR IMAGE (G50.1, G51.1)
Format
PROGRAMMINGB–64124EN/01 14. COMPENSATION FUNCTION
303
If the programmable mirror image function is specified when the command for producing a mirror image is also selected by a CNC external switch or CNC setting (see III–4.8), the programmable mirror image function is executed first.
Applying a mirror image to one of the axes on a specified plane changes the following commands as follows :
Command Explanation
Circular command G02 and G03 are interchanged.
Cutter compensation G41 and G42 are interchanged.
Coordinate rotation CW and CCW (directions of rotation) are interchanged.
Processing proceeds from program mirror image to scaling and coordinate rotation in the stated order. The commands should be specified in this order, and, for cancellation, in the reverse order. Do not specify G50.1 or G51.1 during scaling or coordinate rotation mode.
In programmable mirror image mode, G codes related to reference position return (G27, G28, G29, G30, etc.) and those for changing the coordinate system (G52 to G59, G92, etc.) must not be specified. If any of these G codes is necessary, specify it only after canceling the programmable mirror image mode.
Explanations
� Mirror image by setting
� Mirror image on a single axis in a specified plane
Limitations
� Scaling/coordinate system rotation
� Commands related to reference position return and coordinate system
PROGRAMMING15. CUSTOM MACRO B–64124EN/01
304
15 CUSTOM MACRO Although subprograms are useful for repeating the same operation, the custom macro function also allows use of variables, arithmetic and logic operations, and conditional branches for easy development of general programs such as pocketing and user–defined canned cycles.A machining program can call a custom macro with a simple command, just like a subprogram.
O0001 ; : : : G65 P9010 R50.0 L2 ; : : M30 ;
Machining program Custom macro
O9010 ; #1=#18/2 ; G01 G42 X#1 Y#1 F300 ; G02 X#1 Y–#1 R#1 ; : : : M99 ;
PROGRAMMINGB–64124EN/01 15. CUSTOM MACRO
305
An ordinary machining program specifies a G code and the travel distance directly with a numeric value; examples are G00 and X100.0. With a custom macro, numeric values can be specified directly or using a variable number. When a variable number is used, the variable value can be changed by a program or using operations on the MDI panel.
#1=#2+100 ;
G01 X#1 F300 ;
When specifying a variable, specify a number sign (#) followed by a variable number. General–purpose programming languages allow a name to be assigned to a variable, but this capability is not available for custom macros.
Example: #1
An expression can be used to specify a variable number. In such a case, the expression must be enclosed in brackets.
Example: #[#1+#2–12]
Variables are classified into four types by variable number.
Table 15.1 Types of variables
Variable number
Type of variable
Function
#0 Always null
This variable is always null. No value can be assigned to this variable.
#1 – #33 Local variables
Local variables can only be used within a macro to hold data such as the results of operations. When the power is turned off, local variables are initialized to null. When a macro is called, arguments are assigned to local variables.
#100 – #199 #500 – #999
Common variables
Common variables can be shared among different macro programs. When the pow- er is turned off, variables #100 to #199 are initialized to null. Variables #500 to #999 hold data even when the power is turned off.
#1000 – System variables
System variables are used to read and write a variety of NC data items such as the current position and tool compensation values.
Local and common variables can have value 0 or a value in the following ranges : –1047 to –10–29
10–29 to 1047
If the result of calculation turns out to be invalid, an P/S alarm No. 111 is issued.
15.1 VARIABLES
��� � ����
� Variable representation
� Types of variables
� Range of variable values
PROGRAMMING15. CUSTOM MACRO B–64124EN/01
306
When a variable value is defined in a program, the decimal point can be omitted.
Example: When #1=123; is defined, the actual value of variable #1 is 123.000.
To reference the value of a variable in a program, specify a word address followed by the variable number. When an expression is used to specify a variable, enclose the expression in brackets.
Example: G01X[#1+#2]F#3;
A referenced variable value is automatically rounded according to the least input increment of the address.
Example: When G00X#1; is executed on a 1/1000–mm CNC with 12.3456 assigned to variable #1, the actual command is interpreted as G00X12.346;.
To reverse the sign of a referenced variable value, prefix a minus sign (–) to #.
Example: G00X–#1;
When an undefined variable is referenced, the variable is ignored up to an address word.
Example: When the value of variable #1 is 0, and the value of variable #2 is null, execution of G00X#1Y#2; results in G00X0;.
When the value of a variable is not defined, such a variable is referred to as a “null” variable. Variable #0 is always a null variable. It cannot be written to, but it can be read.
(a) Quotation When an undefined variable is quotated, the address itself is also ignored.
[Example] When #1 is 0 and #2 is null, the result of executing G00 X#1 Y#2; will be the same as when G00 X0; is executed.
(b)Operation < vacant > is the same as 0 except when replaced by < vacant>
When #1 = < vacant > When #1 = 0
#2 = #1 �
#2 = < vacant >
#2 = #1 �
#2 = 0
#2 = #1*5 �
#2 = 0
#2 = #1*5 �
#2 = 0
#2 = #1+#1 �
#2 = 0
#2 = #1 + #1 �
#2 = 0
� Omission of the decimal point
� Referencing variables
� Undefined variable
PROGRAMMINGB–64124EN/01 15. CUSTOM MACRO
307
(c) Conditional expressions < vacant > differs from 0 only for EQ and NE.
When #1 = < vacant > When #1 = 0
#1 EQ #0 �
Established
#1 EQ #0 �
Not established
#1 NE 0 �
Established
#1 NE 0 �
Not established
#1 GE #0 �
Established
#1 GE #0 �
Established
#1 GT 0 �
Not established
#1 GT 0 �
Not established
VARIABLE O1234 N12345
NO. DATA NO. DATA
100 123.456 108
101 0.000 109
102 110
103 111
104 112
105 113
106 114
107 115
ACTUAL POSITION (RELATIVE)
X 0.000 Y 0.000
Z 0.000 B 0.000
MEM **** *** *** 18:42:15
[ MACRO ] [ MENU ] [ OPR ] [ ] [ (OPRT) ]
� When the value of a variable is blank, the variable is null.
� The mark ******** indicates an overflow (when the absolute value of a variable is greater than 99999999) or an underflow (when the absolute value of a variable is less than 0.0000001).
Program numbers, sequence numbers, and optional block skip numbers cannot be referenced using variables.
Example: Variables cannot be used in the following ways: O#1; /#2G00X100.0; N#3Y200.0;
;� �� �����
PROGRAMMING15. CUSTOM MACRO B–64124EN/01
308
System variables can be used to read and write internal NC data such as tool compensation values and current position data. Note, however, that some system variables can only be read. System variables are essential for automation and general–purpose program development.
Signals can be exchanged between the programmable machine controller (PMC) and custom macros.
Table 15.2 (a) System variables for interface signals
(When the parameter MIF (bit 0 of No. 6001) is set to 0.)
Variable number
Function
#1000 to #1015 #1032
A 16–bit signal can be sent from the PMC to a custom macro. Variables #1000 to #1015 are used to read a signal bit by bit. Variable #1032 is used to read all 16 bits of a signal at one time.
#1100 to #1115 #1132
A 16–bit signal can be sent from a custom macro to the PMC. Variables #1100 to #1115 are used to write a signal bit by bit. Variable #1132 is used to write all 16 bits of a signal at one time.
#1133 Variable #1133 is used to write all 32 bits of a signal at one time from a custom macro to the PMC. Note, that values from –99999999 to +99999999 can be used for #1133.
(When the parameter MIF (bit 0 of No. 6001) is set to 1.)
Variable number
Function
#1000 to #1031 A 32–bit signal can be sent from the PMC to a custom macro. Variables #1000 to #1031 are used to read a signal bit by bit.
#1100 to #1131 A 32–bit signal can be sent from a custom macro to the PMC. Variables #1100 to #1131 are used to write a signal bit by bit.
#1032 to #1035 Variables #1032 to #1035 are used to output all 32 bits of a signal at one time from the PMC to a custom macro. Note, that values from –99999999 to +99999999 can be used for #1032 to #1035.
#1132 to #1135 Variables #1132 to #1135 are used to write all 32 bits of a sig- nal at one time from a custom macro to the PMC. Note, that values from –99999999 to +99999999 can be used for #1132 to #1135.
For detailed information, refer to the connection manual (B–64113EN–1).
15.2 SYSTEM VARIABLES
Explanations
� Interface signals
PROGRAMMINGB–64124EN/01 15. CUSTOM MACRO
309