0 BEGIN PGM 1020_EN MM 1 ;Program for defining a point pattern in form 2 ;of grid lines. 3 ;For manufacturing, a cycle for the machining 4 ;process is called at the calculated points. 5 ;In this program a drilling cycle is used. 6 ;After defining all necessary parameter, the 7 ;tool and the cycle a subprogram is 8 ;called. Where the individual positions are 9 ;calculated, the tool gets positioned and 10 ;the cycle is called. 11 ; 12 ;Input parameter 13 FN 0: Q1 =+10 ;STARTING POINT IN THE X-AXIS 14 FN 0: Q2 =+10 ;STARTING POINT IN THE Y-AXIS 15 FN 0: Q3 =+9 ;DISTANCE OF MACHINING STEPS IN X 16 FN 0: Q4 =+12 ;DISTANCE OF MACHINING STEPS IN Y 17 FN 0: Q5 =+10 ;NUMBER OF MACHINING STEPS IN X 18 FN 0: Q6 =+7 ;NUMBER OF MACHINING STEPS IN Y 19 FN 0: Q7 =+5 ;ROTATION 20 FN 0: Q8 =+2 ;SAFETY CLEARANCE 21 ;Input parameter completed 22 ; 23 BLK FORM 0.1 Z X+0 Y+0 Z-25 24 BLK FORM 0.2 X+100 Y+100 Z+0 25 ; 26 ;Tool call 27 TOOL CALL 227 Z S1000 28 ; 29 ;Define the cycle for the machining process 30 CYCL DEF 1.0 PECKING 31 CYCL DEF 1.1 SET UPQ8 32 CYCL DEF 1.2 DEPTH-20 33 CYCL DEF 1.3 PLNGNG10 34 CYCL DEF 1.4 DWELL0 35 CYCL DEF 1.5 F100 36 ; 37 CALL LBL 1 ;Call subprogram 38 ; 39 ;Move back and end of program 40 L Z+50 R0 FMAX M2 41 ; 42 LBL 1 ;Subprogram 43 FN 0: Q21 =+0 ;Current position in X 44 FN 0: Q22 =+0 ;Current position in Y 45 FN 0: Q25 =+0 ;Current column 46 FN 0: Q26 =+0 ;Current line 47 FN 0: Q23 =+Q3 ;X increment 48 ;datum shift to the first position 49 CYCL DEF 7.0 DATUM SHIFT 50 CYCL DEF 7.1 X+Q1 51 CYCL DEF 7.2 Y+Q2 52 ;Set rotation 53 CYCL DEF 10.0 ROTATION 54 CYCL DEF 10.1 ROT+Q7 55 LBL 2 56 L X+Q21 Y+Q22 R0 F9999 M3 ;Move to position 57 L Z+Q8 R0 F9999 M99 ;Move to set-up clearance and call the cycle 58 LBL 3 ;Calculate new position 59 FN 1: Q21 =+Q21 + +Q23 ;X step 60 FN 1: Q25 =+Q25 + +1 ;Update column 61 FN 12: IF +Q25 LT +Q5 GOTO LBL 2 62 FN 0: Q25 =+0 ;Reset column counter 63 FN 1: Q26 =+Q26 + +1 ;Update line 64 FN 0: Q23 =-Q23 ;Reverse X increment 65 FN 1: Q21 =+Q21 + +Q23 ;Compensate X increment 66 FN 1: Q22 =+Q22 + +Q4 ;Y step 67 FN 12: IF +Q26 LT +Q6 GOTO LBL 2 68 ;Reset datum shift and rotation 69 CYCL DEF 7.0 DATUM SHIFT 70 CYCL DEF 7.1 X+0 71 CYCL DEF 7.2 Y+0 72 CYCL DEF 10.0 ROTATION 73 CYCL DEF 10.1 ROT+0 74 LBL 0 75 END PGM 1020_EN MM