0 BEGIN PGM 1105_EN MM 1 ;Program for defining a point pattern in the 2 ;form of a frame. 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 ;Afer defining all necessary parameters, 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 =+15 ;STARTING POINT IN THE X-AXIS 14 FN 0: Q2 =+15 ;STARTING POINT IN THE Y-AXIS 15 FN 0: Q30 =+8 ;NUMBER OF MACHINING STEPS IN 16 ; ;X-AXIS 17 FN 0: Q31 =+8 ;NUMBER OF MACHINING STEPS IN 18 ; ;Y-AXIS 19 FN 0: Q32 =+10 ;DISTANCE OF MACHINING STEPS IN X 20 FN 0: Q33 =+10 ;DISTANCE OF MACHINING STEPS IN Y 21 FN 0: Q7 =+0 ;ROTATION 22 FN 0: Q8 =+2 ;SAFETY CLEARANCE 23 ;Input parameter completed 24 ; 25 BLK FORM 0.1 Z X+0 Y+0 Z-25 26 BLK FORM 0.2 X+100 Y+100 Z+0 27 ; 28 ;Tool call 29 TOOL CALL 225 Z S5000 30 ; 31 ;Define the cycle for the machining process 32 CYCL DEF 1.0 PECKING 33 CYCL DEF 1.1 SET UPQ8 34 CYCL DEF 1.2 DEPTH-20 35 CYCL DEF 1.3 PLNGNG10 36 CYCL DEF 1.4 DWELL0 37 CYCL DEF 1.5 F100 38 ; 39 CALL LBL 20 ;Call subprogram position calculation 40 ; 41 ;Move back and end of program 42 L Z+100 R0 FMAX M2 43 ; 44 LBL 20 ;Definition of the positions 45 FN 12: IF +Q30 LT +3 GOTO LBL 5 46 FN 12: IF +Q31 LT +3 GOTO LBL 5 47 ;Datum shift to the first position 48 CYCL DEF 7.0 DATUM SHIFT 49 CYCL DEF 7.1 X+Q1 50 CYCL DEF 7.2 Y+Q2 51 ;Set rotation 52 CYCL DEF 10.0 ROTATION 53 CYCL DEF 10.1 ROT+Q7 54 ; 55 L Z+100 R0 FMAX ;Move to a safe hight 56 L X+0 Y+0 R0 FMAX M3 ;Move to the first position 57 L Z+Q8 R0 FMAX M99 ;Move to set-up clearance and call the cycle 58 FN 2: Q34 =+Q30 - +1 ;Counter columns 59 LBL 1 60 FN 2: Q34 =+Q34 - +1 ;Counter columns 61 L IX+Q32 FMAX M99 ;Move to the next position and call the cycle 62 FN 11: IF +Q34 GT +0 GOTO LBL 1 ;Compare whether additional columns are necessary 63 FN 2: Q35 =+Q31 - +1 ;Counter lines 64 LBL 2 65 FN 2: Q35 =+Q35 - +1 ;Counter lines 66 L IY+Q33 FMAX M99 ;Move to the next position and call the cycle 67 FN 11: IF +Q35 GT +0 GOTO LBL 2 ;Compare whether additional lines are necessary 68 FN 2: Q34 =+Q30 - +1 ;Counter columns 69 LBL 3 70 FN 2: Q34 =+Q34 - +1 ;Counter columns 71 L IX-Q32 FMAX M99 ;Move to the next position and call the cycle 72 FN 11: IF +Q34 GT +0 GOTO LBL 3 ;Compare whether additional columns are necessary 73 FN 2: Q36 =+Q31 - +2 ;Counter lines 74 LBL 4 75 FN 2: Q36 =+Q36 - +1 ;Counter lines 76 L IY-Q33 FMAX M99 ;Move to the next position and call the cycle 77 FN 11: IF +Q36 GT +0 GOTO LBL 4 ;Compare whether additional lines are necessary 78 FN 9: IF +0 EQU +0 GOTO LBL 6 ;Jump to the end of the subprogram 79 LBL 5 80 FN 14: ERROR= 1011 81 LBL 6 82 ;Reset datum shift and rotation 83 CYCL DEF 7.0 DATUM SHIFT 84 CYCL DEF 7.1 X+0 85 CYCL DEF 7.2 Y+0 86 CYCL DEF 7.3 Z+0 87 CYCL DEF 10.0 ROTATION 88 CYCL DEF 10.1 ROT+0 89 LBL 0 90 END PGM 1105_EN MM