1、14COMPENSATION FUNCTION 14 COMPENSATION FUNCTION 14.1 TOOL LENGTH OFFSET(G43,G44,G49)14.2 AUTOMATIC TOOL LENGTH MEASUREMENT(G37)14.3 TOOL OFFSET(G45-G48)14.4 CUTTER COMPENSATION B(G39-G42)14.5 OVERVIEW OF CUTTER COMPENSATION C (G40-G42)14COMPENSATION FUNCTION 14.1 TOOL LENGTH OFFSET(G43,G44,G49)This
2、 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
3、 length offset value from the offset memory by entering the corresponding address and number(H code).14COMPENSATION FUNCTION Fig.14.1(a)Tool length offset14COMPENSATION FUNCTION The following three methods of tool length offset can be used,depending on the axis along which tool length offset can be
4、made.()Tool length offset A:Compensates for the difference in tool length along the Zaxis.()Tool length offset B:Compensates for the difference in tool length along the X,Y,or Zaxis.()Tool length offset C:Compensates for the difference in tool length along a specified axis.14COMPENSATION FUNCTION 14
5、.1.1 General Format14COMPENSATION FUNCTION Explanations Selection of tool length offsetSelect tool length offset A,B,or C,by setting bits 0 and 1 of parameter TLC,TLB No.5001.Direction of the offsetWhen G43 is specified,the tool length offset value(stored in offset memory)specified with the H code i
6、s 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 mo
7、de is selected.14COMPENSATION FUNCTION 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 val
8、ue 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.14COMPENSATION FUNCTION Specification
9、of the tool length offset valueThe 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.Tool length offset A/BWhen the offset numbers for tool length offset A/B are speci
10、fied or modified,the offset number validation order varies,depending on the condition,as described below.14COMPENSATION FUNCTION When OFH(bit 2 of parameter No.5001)=0: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.14COMPE
11、NSATION FUNCTION When OFH(bit 2 of parameter No.5001)=1: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.14COMPENSATION FUNCTION.Cutter compensation CWhen the offset numbers for cutter compensation C are specified or modifie
12、d,the offset number validation order varies,depending on the condition,as described below.When OFH(bit 2 of parameter No.5001)=0:O.;H01;G43P-;(1)G44P-H02;(2)H03;(3)14COMPENSATION FUNCTION(1)Offset number H01 is valid.(2)Offset number H02 is valid.(3)Offset number H03 is valid only for the axis to wh
13、ich compensation was applied most recently.When OFH(bit 2 of parameter No.5001)=1:O.;H01;G43P-;(1)G44P-H02;(2)H03;(3)14COMPENSATION FUNCTION 14COMPENSATION FUNCTION(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
14、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.14COMPENSATION FUNCTION WARNINGWhen the tool length offset value is changed due to a change of the offset number,the offset val
15、ue 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.0H2:tool length offset value 30.0G90 G43 Z100.0 H1;Z will move to 120.0G90 G43 Z100.0 H2;Z will move to 130.014COMPENSATION FUNCTION CAUTION
16、When the tool length offset is used and set a parameter OFH(No.50012)to 0,specify the tool length offset with H code and the cutter compensation with D code.NOTEThe 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 va
17、lue to H0.14COMPENSATION FUNCTION Performing tool length offset along two or more axesTool 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 axisG18 G43 H-;Offset in Y axis(Offsets in X and Y axes ar
18、e 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.14COMPENSATION FUNCTION Tool length offset cancelTo cancel tool length offset,specify G49 or H0.After G49 or H0 is specified,t
19、he 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 cancelled by specifying G49.If H0 is specified,only offset along an axis perpendicular to the specified plane is cancelled.()In the case of the offset in thr
20、ee axes or more,if the offset is cancelled by G49 code,the P/S alarm 015 is generated.Cancel the offset by using G49 and H00.14COMPENSATION FUNCTION ExamplesH1=-4.0(tool length offset value)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
21、 Y-50.0;(6)N7 G01 Z-41.0;(7)N8 G00 Z41.0;(8)N9 X50.0 Y30.0;(9)14COMPENSATION FUNCTION 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;14COMPENSATION FUNCTION Fig.14.1(b)Tool length offset(in boring holes)14COMPENSATION FUNCTION 14.1.2 G53,G28,G30,and G30.1 Com
22、mands in ToolLength Offset Mode This section describes the tool length offset cancellation and restoration performed when G53,G28,G30,or G30.1 is specified in tool length offset mode.Also described is the timing of tool length offset.()Tool length offset vector cancellation and restoration,performed
23、 when G53,G28,G30,or G30.1 is specified in tool length offset mode.()Specification of the G43/G44 command for tool length offset A/B/C,and independent specification of the H command.14COMPENSATION FUNCTION Explanations Tool length offset vector cancellationWhen G53,G28,G30,or G30.1 is specified in t
24、ool length offset mode,tool length offset vectors are cancelled as described below.However,the previously specified modal G code remains displayed;modal code display is not switched to G49.When G53 is specified14COMPENSATION FUNCTION NOTEWhen tool length offset is applied to multiple axes,all specif
25、ied 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.14COMPENSATION FUNCTION 14COMPENSATION FUNCTION NOTEWhen tool length offset is applied to multiple axes,all specified axes in
26、volved 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.14COMPENSATION FUNCTION Tool length offset vector restorationTool length offset vectors,cancelled
27、by specifying G53,G28,G30,or G30.1 in tool length offset mode,are restored as described below.14COMPENSATION FUNCTION WARNINGWhen tool length offset is applied to multiple axes,all axes for which G53,G28,G30,and G30.1 are specified are subject to cancellation.However,restoration is performed only fo
28、r that axis to which tool length offset was applied last;restoration is not performed for any other axes.NOTEIn a block containing G40,G41,or G42,the tool length offset vector is not restored.14COMPENSATION FUNCTION 14.2 AUTOMATIC TOOL LENGTH MEASUREMENT(G37)By issuing G37 the tool starts moving to
29、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.Difference between coordinate value when tool reaches the measurement position and coordinate value comma
30、nded by G37 is added to the tool length offset amount currently used.14COMPENSATION FUNCTION Fig.14.2(a)Automatic tool length measurement14COMPENSATION FUNCTION FormatG92 IP-;Sets the workpiece coordinate system(It can be set with G54 to G59.See Chapter 7,“Coordinate System.”)H ;Specifies an offset
31、number for tool length offset.G90 G37 IP-;Absolute command G37 is valid only in the block in which it is specified.IP-indicates the X,Y,Z,or fourth axis.14COMPENSATION FUNCTION Explanations Setting the workpiece coordinate systemSet the workpiece coordinate system so that a measurement can be made a
32、fter moving the tool to the measurement position.The coordinate system must be the same as the workpiece coordinate system for programming.14COMPENSATION FUNCTION Specifying G37 Specify the absolute coordinates of the correct measurement position.Execution of this command moves the tool at the rapid
33、 traverse rate toward the measurement position,reduces the feedrate 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
34、 the tool.14COMPENSATION FUNCTION Changing the offset valueThe 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
35、the position at which the tool reaches for measurement)-(Coordinates specified by G37)These offset values can be manually changed from MDI.14COMPENSATION FUNCTION AlarmWhen automatic tool length measurement is executed,the tool moves as shown in Fig.14.2(b).If the approach end signal goes on while t
36、he 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.14COMPENSATION FUNCTION Fig.14.2(b)Tool movement to the measurement position14COMPENSATION FUNCTION WARNINGWhen a manu
37、al movement is inserted into a movement at a measurement feedrate,return the tool to the position before the inserted manual movement for restart.14COMPENSATION FUNCTION NOTE()When an H code is specified in the same block as G37,an alarm is generated.Specify H code before the block of G37.()The meas
38、urement 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.()When offset memory A is used,the offset value is changed.When offset memory B is used,the tool wear compensation valu
39、e is changed.When offset memory C is used,the tool wear compensation value for the H code is changed.14COMPENSATION FUNCTION()The approach end signal is monitored usually every 2 ms.The following measuring error is generated:ERRmax.:Fm1/60TS/1000TS:Sampling period,for usual 2(ms)ERRmax.:maximum meas
40、uring error(mm)Fm:measurement feedrate(mm/min.)For example,when Fm=1000 mm/min.,ERRmax.=0.003m.14COMPENSATION FUNCTION()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
41、 stopped)is used to determine the offset amount.The overrun for 16 ms is:Qmax.=Fm 1/6016/1000Qmax.:maximum overrun(mm)Fm:measurement feed rate(mm/min.)14COMPENSATION FUNCTION ExampleG92 Z760.0 X1100.0;Sets a workpiece coordinate system with respect to the programmed absolute zero point.G00 G90 X850.
42、0;Moves the tool to X850.0.The tool ismoved 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 measurementposition.G00 Z204.0;Retracts the tool a small distance alongthe Zaxis.14COMPENSATION FUNCTIO
43、N 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).14COMPENSATION FUNCTION Fig.14.2(c)Correct measurement po
44、sition14COMPENSATION FUNCTION 14.3 TOOL OFFSET(G45-G48)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.14COMPENSATION FUNCTION Fig.14.3(a)TOOL OFF
45、SET(G45-G48)14COMPENSATION FUNCTION FormatG45 IP-D-;Increase the travel distance by the tooloffset valueG46 IP-D-;Decrease the travel distance by the tooloffset valueG47 IP-D-;Increase the travel distance by twicethe tool offset valueG48 IP-D-;Decrease the travel distance by twicethe tool offset val
46、ueG45 to G48:Oneshot G code for increasing or decreasing the travel distanceIP-:command for moving the toolD:code for specifying the tool offset value14COMPENSATION FUNCTION Explanations Increase and decreaseAs shown in Table 14.1,the travel distance of the tool is increased or decreased by the spec
47、ified 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.14COMPENSATION FUNCTION 14COMPENSATION FUNCTION If a move command with a travel dis
48、tance 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.Tool offset valueOnce selected by D
49、code,the tool offset value remains unchanged until another tool offset value is selected.Tool offset values can be set within the following range.14COMPENSATION FUNCTION 14COMPENSATION FUNCTION WARNING()When G45 to G48 is specified to n axes(n=1-6)simultaneously in a motion block,offset is applied t
50、o 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 14.3(b).14COMPENSATION FUNCTION Fig.14.3(b)Offset is applied to all n axes14COMPENSATION FUNCTION()G45 to G48(tool offse