Site hosted by Angelfire.com: Build your free website today!

SE/SA/SR/SV Peck Drilling Macro

Updated Sunday, January 28, 2001


Following is a macro written and proven specifically for the SE, SA, SR, or SV series of machines. It will execute a peck drilling cycle when executed with a "G65" command, and is presented as an excellent example of macro programming.

To use the program, follow the below instructions:

  1. Load the macro program 8999 into the control memory.

  2. In the main program, position the drilling tool at the clear starting position of the drilled hole.

  3. In the main program, program a G65 line specifying the pecking variables according to the below format:
    G65P8999A(xxx)B(xxx)C(xxx)D(xxx)E(xxx)F(xxx)R(xxx)S(xxx)W(xxx)Z(xxx)
    where (xxx) is the data indicated by the text in the program itself, below.

Program line example, drilling a .500 hole 4.0 deep:

Position drill to clear start point...
G65P8999A1.500B1.000C.500D1.0E3.0F.005R0S0W.040Z4.0
Drill escape...


The Program...

%
O8999(PECK DRILLING MACRO)

(A #1 = FIRST PECK DEPTH)
(B #2 = SECOND PECK DEPTH)
(C #3 = ALL PECKS REMAINING DEPTH)
(D #4 = DWELL TIME)
(E #5 = EVERY E PECKS - DWELL)
(F #9 = FEED RATE PER REV)
(R #18 = RETRACT POINT)
(S #19 = START POINT)
(W #23 = RETURN DISTANCE FROM LAST PECK)
(Z #26 = ENDPOINT)
G99
#100=#4001
#110=1
IF[#7GE0]GOTO1
#7=0
N1IF[ABS[#24]GT0]GOTO105
IF[ABS[#26]GE0]GOTO5
#3000=1(X*OR*Z*IN*COMMAND*LINE*MISSING)
N5(Z)
IF[ABS[#23]GT0]GOTO6
#3000=1(NO*W*ON*COMMAND*LINE)
N6#23=ABS[#23]
G0Z[#19-#23]
#101=#19+#1
N10IF[#101LT#26]GOTO20
#101=#26
GOTO100
N20G1Z#101F#9
G0Z#18
IF[#110NE#8]GOTO30
G4U#7
#110=0
N30#110=#110+1
G0Z[#101-#23]
#101=#101+#2
N40IF[#101LT#26]GOTO50
#101=#26
GOTO100
N50G1Z#101F#9
G0Z#18
IF[#110NE#8]GOTO60
G4U#7
#110=0
N60#110=#110+1
N65G0Z[#101-#23]
#101=#101+#3
N70IF[#101LT#26]GOTO80
#101=#26
GOTO100
N80G1Z#101F#9
G0Z#18
IF[#110NE#8]GOTO90
G4U#7
#110=0
N90#110=#110+1
GOTO65
N100G1Z#101F#9
G0Z#18
G#100
M99
N105(X)
IF[ABS[#21]GT0]GOTO106
#3000=1(NO*U*ON*COMMAND*LINE)
N106#21=ABS[#21]*2
G0X[#19+#21]
#101=#19-[#1*2]
N110IF[#101GT#24]GOTO120
#101=#24
GOTO200
N120G1X#101F#9
G0X#18
IF[#110NE#8]GOTO130
G4U#7
#110=0
N130#110=#110+1
G0X[#101+#21]
#101=#101-[#2*2]
N140IF[#101GT#24]GOTO150
#101=#24
GOTO200
N150G1X#101F#9
G0X#18
IF[#110NE#8]GOTO160
G4U#7
#110=0
N160#110=#110+1
N165G0X[#101+#21]
#101=#101-[#3*2]
N170IF[#101GT#24]GOTO180
#101=#24
GOTO200
N180G1X#101F#9
G0X#18
IF[#110NE#8]GOTO190
G4U#7
#110=0
N190#110=#110+1
GOTO165
N200G1X#101F#9
G0X#18
G#100
M99
%

Return to Star Tech Center, Ohio, Main Page