Examples4.2 Examples 3-6: SETTCOR function for tool environmentsBasic logic functions: Tool Offset (W1)Function Manual, 11/2006, 6FC5397-0BP10-2BA0 193Example 5N10 def real _CORVAL[3]N20 $TC_DP1[1,1] = 120 ; Milling toolN30 $TC_DP3[1,1] = 10.0 ; Geometry L1N40 $TC_DP12[1,1] = 1.0 ; Wear L1N50 _CORVAL[0] = 0.333N60 t1 d1 g17 g0N70 r1 = settcor(_CORVAL, "GW", 0, 3, 0)N80 t1 d1 x0 y0 z0 ;==> MCS position X0.333 Y0.000Z11.000N90 M30_CORCOMP is 3, as in the previous example, but the compensation is now effective on thegeometry axis with index 0 (X axis). The tool components L3 are assigned to this geometryaxis due to G17 with a milling tool. Calling SETTCOR thus does not affect tool parameters$TC_DP3 and $TC_DP12. Instead, the compensation value is entered in $TC_DP5.Example 6N10 def real _CORVAL[3]N20 $TC_DP1[1,1] = 500 ; Turning toolN30 $TC_DP3[1,1] = 10.0 ; Geometry L1N40 $TC_DP4[1,1] = 15.0 ; Geometry L2N50 $TC_DP12[1,1]= 10.0 ; Wear L1N60 $TC_DP13[1,1] =0.0 ; Wear L2N70 _CORVAL[0] = 5.0N80 rot y 30N90 t1 d1 g18 g0N100 r1 = settcor(_CORVAL, "GW", 0, 3, 1)N110 t1 d1 x0 y0 z0 ; ==> MCS position X24.330Y0.000 Z17.500N120 M30The tool is a turning tool. A frame rotation is activated in N80, causing the basic coordinatesystem (BCS) to be rotated in relation to the workpiece coordinate system (WCS). In theWCS, the compensation value (N70) acts on the geometry axis with index 1, i.e., on the Xaxis because G18 is active. Since "_CORRMODE = 3", the tool wear in the direction of the Xaxis of the WCS must become zero once N100 has been executed. The contents of therelevant tool parameters at the end of the program are thus:$TC_DP3[1,1] : 21.830 ; Geometry L1$TC_DP4[1,1] : 21.830 ; Geometry L2$TC_DP12[1,1] : 2.500 ; Wear L1$TC_DP13[1,1] : -4.330 ; Wear L2