0 BEGIN PGM 8235_EN MM 1 ;This NC program is for measuring the 2 ;exact Z coordinates of machining 3 ;positions defined in a point table and 4 ;for entering these coordinates in the table. 5 ;In this example program, the control 6 ;performs the measuring routine on 7 ;five sides of a cube. 8 ;The respective point table is then defined 9 ;as a pattern for each side, and the 10 ;control carries out a defined machining cycle 11 ;at each position. 12 ;The Z coordinate entered in the table defines 13 ;the starting point of the cycle, 14 ;so that the depth defined in the cycle is 15 ;always referenced to the previously 16 ;measured Z coordinate. 17 ; 18 BLK FORM 0.1 Z X-25 Y-25 Z-50 19 BLK FORM 0.2 X+25 Y+25 Z+0 20 ; 21 ;MEASURE 22 ; 23 ;Tool call for touch probe 24 TOOL CALL "TOUCH_PROBE" Z 25 ; 26 ;Page 1 27 PLANE RESET STAY ;Reset the tilt 28 TRANS DATUM AXIS X+0 Y+0 Z+0 ;Datum shift 29 ;Call subprogram for moving to a safe position 30 CALL LBL "SAFE" 31 PLANE SPATIAL SPA+0 SPB+0 SPC+0 TURN FMAX ;Tilt the working plane 32 ; 33 ;Open the point table of page 1 34 FN 26: TABOPEN 82351.PNT 35 Q52 = 1 ;NUMBER OF POSITONS 36 ;Call subprogram for measuring 37 CALL LBL "MEASURE" 38 ; 39 ;Page 2 40 PLANE RESET STAY ;Reset the tilt 41 TRANS DATUM AXIS X+25 Y-14.1421 Z-10.8579 ;Datum shift 42 ;Call subprogram for moving to a safe position 43 CALL LBL "SAFE" 44 PLANE SPATIAL SPA+90 SPB+0 SPC+90 TURN FMAX ;Tilt the working plane 45 ; 46 ;Open the point table of page 2 47 FN 26: TABOPEN 82352.PNT 48 Q52 = 2 ;NUMBER OF POSITONS 49 ;Call subprogram for measuring 50 CALL LBL "MEASURE" 51 ; 52 ;Page 3 53 PLANE RESET STAY ;Reset the tilt 54 TRANS DATUM AXIS X+14.1421 Y+25 Z-10.8579 ;Datum shift 55 ;Call subprogram for moving to a safe position 56 CALL LBL "SAFE" 57 PLANE SPATIAL SPA+90 SPB+0 SPC-180 TURN FMAX ;Tilt the working plane 58 ; 59 ;Open the point table of page 3 60 FN 26: TABOPEN 82353.PNT 61 Q52 = 3 ;NUMBER OF POSITONS 62 ;Call subprogram for measuring 63 CALL LBL "MEASURE" 64 ; 65 ;Page 4 66 PLANE RESET STAY ;Reset the tilt 67 TRANS DATUM AXIS X-14.1421 Y-25 Z-10.8579 ;Datum shift 68 ;Call subprogram for moving to a safe position 69 CALL LBL "SAFE" 70 PLANE SPATIAL SPA+90 SPB+0 SPC+0 TURN FMAX ;Tilt the working plane 71 ; 72 ;Open the point table of page 4 73 FN 26: TABOPEN 82354.PNT 74 Q52 = 4 ;NUMBER OF POSITONS 75 ;Call subprogram for measuring 76 CALL LBL "MEASURE" 77 ; 78 ;Page 5 79 PLANE RESET STAY ;Reset the tilt 80 TRANS DATUM AXIS X-25 Y+14.1421 Z-10.8579 ;Datum shift 81 ;Call subprogram for moving to a safe position 82 CALL LBL "SAFE" 83 PLANE SPATIAL SPA+90 SPB+0 SPC-90 TURN FMAX ;Tilt the working plane 84 ; 85 ;Open the point table of page 5 86 FN 26: TABOPEN 82355.PNT 87 Q52 = 5 ;NUMBER OF POSITONS 88 ;Call subprogram for measuring 89 CALL LBL "MEASURE" 90 ; 91 ;MACHINING 92 ; 93 ;Tool call for drill 94 TOOL CALL "DRILL_D8.5" Z S9000 F2500 95 M3 96 CYCL DEF 200 DRILLING ~ Q200=+2 ;SET-UP CLEARANCE ~ Q201=-2 ;DEPTH ~ Q206= AUTO ;FEED RATE FOR PLNGNG ~ Q202=+5 ;PLUNGING DEPTH ~ Q210=+0 ;DWELL TIME AT TOP ~ Q203=+0 ;SURFACE COORDINATE ~ Q204=+50 ;2ND SET-UP CLEARANCE ~ Q211=+0 ;DWELL TIME AT DEPTH ~ Q395=+1 ;DEPTH REFERENCE 97 ; 98 ;Page 1 99 PLANE RESET STAY ;Reset the tilt 100 TRANS DATUM AXIS X+0 Y+0 Z+0 ;Datum shift 101 ;Call subprogram for moving to a safe position 102 CALL LBL "SAFE" 103 PLANE SPATIAL SPA+0 SPB+0 SPC+0 TURN FMAX ;Tilt the working plane 104 ; 105 ;Define the point table of page 1 as point pattern 106 SEL PATTERN "82351.PNT" 107 ;Call subprogram for machining 108 CALL LBL "MACHINING" 109 ; 110 ;Page 2 111 PLANE RESET STAY ;Reset the tilt 112 TRANS DATUM AXIS X+25 Y-14.1421 Z-10.8579 ;Datum shift 113 ;Call subprogram for moving to a safe position 114 CALL LBL "SAFE" 115 PLANE SPATIAL SPA+90 SPB+0 SPC+90 TURN FMAX ;Tilt the working plane 116 ; 117 ;Define the point table of page 2 as point pattern 118 SEL PATTERN "82352.PNT" 119 ;Call subprogram for machining 120 CALL LBL "MACHINING" 121 ; 122 ;Page 3 123 PLANE RESET STAY ;Reset the tilt 124 TRANS DATUM AXIS X+14.1421 Y+25 Z-10.8579 ;Datum shift 125 ;Call subprogram for moving to a safe position 126 CALL LBL "SAFE" 127 PLANE SPATIAL SPA+90 SPB+0 SPC-180 TURN FMAX ;Tilt the working plane 128 ; 129 ;Define the point table of page 3 as point pattern 130 SEL PATTERN "82353.PNT" 131 ;Call subprogram for machining 132 CALL LBL "MACHINING" 133 ; 134 ;Page 4 135 PLANE RESET STAY ;Reset the tilt 136 TRANS DATUM AXIS X-14.1421 Y-25 Z-10.8579 ;Datum shift 137 ;Call subprogram for moving to a safe position 138 CALL LBL "SAFE" 139 PLANE SPATIAL SPA+90 SPB+0 SPC+0 TURN FMAX ;Tilt the working plane 140 ; 141 ;Define the point table of page 4 as point pattern 142 SEL PATTERN "82354.PNT" 143 ;Call subprogram for machining 144 CALL LBL "MACHINING" 145 ; 146 ;Page 5 147 PLANE RESET STAY ;Reset the tilt 148 ;Nullpunktverschiebung 149 TRANS DATUM AXIS X-25 Y+14.1421 Z-10.8579 ;Datum shift 150 ;Call subprogram for moving to a safe position 151 CALL LBL "SAFE" 152 PLANE SPATIAL SPA+90 SPB+0 SPC-90 TURN FMAX ;Tilt the working plane 153 ; 154 ;Define the point table of page 5 as point pattern 155 SEL PATTERN "82355.PNT" 156 ;Call subprogram for machining 157 CALL LBL "MACHINING" 158 ; 159 ;Call subprogram for moving to a safe position 160 CALL LBL "SAFE" 161 PLANE RESET TURN FMAX ;Reset the tilt 162 ; 163 ;End of program 164 M30 165 ; 166 ;Subprograms 167 ;Move to a safe position based on the machine Move to a safe position based on the machine 168 LBL "SAFE" 169 M140 MB MAX F9999 170 L Z+0 R0 FMAX M91 171 L X+0 Y+0 R0 FMAX M91 172 LBL 0 173 ; 174 ;Mease 175 LBL "MEASURE" 176 Q50 = 0 ;First line 177 Q51 = Q52 - 1 ;Calculation for number of repetitions 178 LBL "LOOP" 179 ;Read X/Y coordinates for measurement 180 FN 28: TABREAD Q55 =Q50 /"X,Y" 181 TCH PROBE 427 MEASURE COORDINATE ~ Q263=+Q55 ;1ST POINT 1ST AXIS ~ Q264=+Q56 ;1ST POINT 2ND AXIS ~ Q261=+0 ;MEASURING HEIGHT ~ Q320=+5 ;SET-UP CLEARANCE ~ Q272=+3 ;MEASURING AXIS ~ Q267=-1 ;TRAVERSE DIRECTION ~ Q260=+15 ;CLEARANCE HEIGHT ~ Q281=+0 ;MEASURING LOG ~ Q288=+0 ;MAXIMUM LIMIT ~ Q289=+0 ;MINIMUM LIMIT ~ Q309=+0 ;PGM STOP TOLERANCE ~ Q330=+0 ;TOOL ~ Q498=+0 ;REVERSE TOOL ~ Q531=+0 ;ANGLE OF INCIDENCE 182 ;Save measurement result in Z in the point file 183 FN 27: TABWRITE Q50 /"Z" = Q160 184 Q50 = Q50 + 1 ;Increase the line number 185 CALL LBL "LOOP" REPQ51 186 LBL 0 187 ; 188 ;Machining 189 LBL "MACHINING" 190 L X+0 Y+0 Z+50 R0 FMAX ;Pre-position 191 CYCL CALL PAT FMAX ;Call cycle at the positions of the point table 192 LBL 0 193 M30 194 END PGM 8235_EN MM