%SysCalibKinematicDemo.nc #VAR ;Machine para V.P.TableOffset_Z=118 ;Platfomr to B origin ;Table center position V.P.TableCenter_X=62.3895 ;Probe on Table center X position------------------------ V.P.TableCenter_Y=310.0845 ;Probe on Table center Y Position----------------------- V.P.TableCenter_Z=-61.849 ;Probe on Table center Z position----------------------- ;Calibrate sphere position V.L.CalSpherePos_X=-30.5 ;Calibrate sphere on Table X position-------------------------- V.L.CalSpherePos_Y=-37 ;Calibrate sphere on Table Y position-------------------------- V.L.CalSpherePos_Z=70 ;Calibrate sphere on Table Z position-------------------------- ;safe position parameter V.L.SafePos_Z=30 ;Probe safty postion Z ;MEAS PARA N0140 V.P.RADIUS_TOOL N0150 V.P.SAFETY_DISTANCE_POS N0160 V.P.SAFETY_DISTANCE_MEAS N0170 V.P.RADIUS_WORKPIECE N0180 V.P.MEASURING_FEED N0190 V.P.POSITIONING_FEED N0200 V.P.KIN_TYP N0210 V.P.KIN_TYP_VARIANT V.CYC.KinID=57 N0220 ; V.P.MAX_PRECISION ( remove comment only if this mode is chosen ) N0230 ; V.P.DIST_NORTH_POLE ( remove comment only if this mode is chosen ) N0240 ; V.P.LATITUDE ( remove comment only if this mode is chosen ) N0250 #ENDVAR N0260 ( Geometry ) N0270 V.P.RADIUS_TOOL = 0.5 ( tool radius [mm] ) N0280 V.P.SAFETY_DISTANCE_POS = 10 ( safety distance around sphere during measurements for pre-positioning [mm] ) N0290 V.P.SAFETY_DISTANCE_MEAS = 10 ( safety distance around sphere during measurements [mm] ) N0300 V.P.RADIUS_WORKPIECE = 12.5 ( radius of workpiece [mm] ) N0310; V.G.WZ_AKT.L=41 N0320 ;V.G.WZ_AKT.V.X=30 N0330 ;V.G.WZ_AKT.V.Y=35 N0340 ; real machine parameters N0100 V.G.KIN[57].PARAM[0]=V.P.TableCenter_Z*10000 N0110 V.G.KIN[57].PARAM[1]=-V.P.TableCenter_X*10000 N0120 V.G.KIN[57].PARAM[2]=-V.P.TableCenter_Y*10000 N0130 V.G.KIN[57].PARAM[3]=0 N0140 V.G.KIN[57].PARAM[4]=0 N0150 V.G.KIN[57].PARAM[5]=V.P.TableOffset_Z*10000 N0160 V.G.KIN[57].PARAM[6]=0 N0170 V.G.KIN[57].PARAM[7]=0 N0180 V.G.KIN[57].PARAM[8]=V.P.TableOffset_Z*10000 N0190 V.G.KIN[57].PARAM[9]=0 N0200 V.G.KIN[57].PARAM[10]=0 N0210 V.G.KIN[57].PARAM[11]=0 N0220 V.G.KIN[57].PARAM[12]=0 N0230 V.G.KIN[57].PARAM[13]=0 N0240 V.G.KIN[57].PARAM[14]=0 N0430 #KIN ID[V.CYC.KinID] N0440 ( Velocity ) N0450 V.P.MEASURING_FEED = 100 ( velocity for measuring (G100 blocks) [mm/min] ) N0460 V.P.POSITIONING_FEED = 1000 ( velocity for positioning [mm/min] ) N0470 ( Kinematic ) N0480 V.P.KIN_TYP = 57 ( number of kinematic ) N0490 V.P.KIN_TYP_VARIANT = 2 ( variant of kinematic ) N0500 ( Measurement ) N0510 ; V.P.DIST_NORTH_POLE = 30 ( distance to sphere to omit North pole during Measurement [mm]; optional - remove comment only if this mode is chosen ) N0520 ; V.P.LATITUDE = 20 ( Latitude for measuring sphere [degree]; otpional - default 10 degree above Equator ) N0530 ( Result ) N0540 #VAR N0550 ; V.P.MAX_PRECISION = 1 ( maximal tolerated deviation [mm]; optional - remove comment only if this mode is chosen) N0560 V.L.PRINT = 2 ( print of measuring data: 1 German, 2 English, 0 no print; optional default: no print ) N0570 #ENDVAR N0580 ( Path for message file ) N0590 #FILENAME [MSG="calibration_result.txt"] N0750 $IF 1;$ELSE N0760 ;===================================== V A R I A N T 2 =====================================; N0770 ( array size is number of measuring proses, e.g. here 9 ) N0780 #VAR N0790 V.P.MEAS_POSE[3][6];V.P.MEAS_POSE[3][9] N0800 #ENDVAR N0810 ( B-axis A-axis C-axis ) N0820 V.P.MEAS_POSE[1][0] = 5 V.P.MEAS_POSE[0][0] = 0 V.P.MEAS_POSE[2][0] = 60 N0830 V.P.MEAS_POSE[1][1] = 10 V.P.MEAS_POSE[0][1] = 0 V.P.MEAS_POSE[2][1] = -90 N0840 V.P.MEAS_POSE[1][2] = -35 V.P.MEAS_POSE[0][2] = 0 V.P.MEAS_POSE[2][2] = 90 N0850 V.P.MEAS_POSE[1][3] = -15 V.P.MEAS_POSE[0][3] = 0 V.P.MEAS_POSE[2][3] = -30 N0860 V.P.MEAS_POSE[1][4] = -25 V.P.MEAS_POSE[0][4] = 0 V.P.MEAS_POSE[2][4] = -60 N0870 V.P.MEAS_POSE[1][5] = 10 V.P.MEAS_POSE[0][5] = 0 V.P.MEAS_POSE[2][5] = 45 N0880 ;V.P.MEAS_POSE[1][6] = 10 V.P.MEAS_POSE[0][6] = 0 V.P.MEAS_POSE[2][6] = 270 N0890 ;V.P.MEAS_POSE[1][7] = 15 V.P.MEAS_POSE[0][7] = 0 V.P.MEAS_POSE[2][7] = 45 N0900 ;V.P.MEAS_POSE[1][8] = 15 V.P.MEAS_POSE[0][8] = 0 V.P.MEAS_POSE[2][8] = 84 N1240 $ENDIF N1250 ; C A L L S U B P R O G R A M ; N1260 ( go to start position rough above sphere centre, given data are an example ) ;Probe move to the top of the clibrate sphere G53 G01 G90 ZV.L.SafePos_Z FV.P.POSITIONING_FEED G01 G90 X 32.731 Y 273.395 B0 C0 FV.P.POSITIONING_FEED G01 G90 Z10 FV.P.MEASURING_FEED M0 N1310 ( measuring mode 1: measuring with several axes ) N1320 #MEAS MODE[1] N1330 ( It might be necessary to set axis names and order by SET AX[...] to use desired kinematic, please look at the documentation. ) N1340 ( switch on parametrized kinematic ) N1350 #KIN ID[V.P.KIN_TYP] N1360 L SysCalibDetermineKinematic.ecy N1370 M30