Originally Posted by
stevo1
I don’t know your machine or control so some of the syntax might not be correct. First off get rid of all of your sequenced N addresses. This is for the purpose of using GOTO statements. You don’t want all the N if you are jumping to an address, too much room for a mistake.
This is probably the easiest and quickest way to set it up. If I think of a more creative way I will let you know but for now this should work.
Ok again I don’t know your control but if you have macro programming you should have variables #1-?. I would set up as many variables as you would need for each hole that you may or may not want to skip. Example below uses 6 holes. #1 is for the first hole and #6 is for the 6th. If you want to drill the hole make it =1 if you do not want to drill that hole make it =0. The example below will skip the 4th hole.
TA,1
#1=1
#2=1
#3=1
#4=1
#5=1
#6=1
H1Z.1M7
(spot drill)
G82X1.Y1.Z-.135R.1F20.P250.
IF[#1EQ0]GOTO5
X2.
N5IF[#2EQ0]GOTO10
X3.
N10IF[#3EQ0]GOTO15
X4.
N15IF[#4EQ0]GOTO20
X5.
N20IF[#5EQ0]GOTO30
X6.
N30IF[#6EQ0]GOTO40
X7.
N40G80
G0Z3.
M5M9
G49Z0
M1
M6T2
M3S6500
H2Z.1M7
(drill)
G83X1.Y1.Z-.75R.1Q.075F20.P.01
IF[#1EQ0]GOTO50
X2.
N50IF[#2EQ0]GOTO55
X3.
N55IF[#3EQ0]GOTO60
X4.
N60IF[#4EQ0]GOTO65
X5.
N65IF[#5EQ0]GOTO70
X6.
N70IF[#6EQ0]GOTO75
X7.
N75G80
G80
G0Z3.
Sorry I did not read your last post in great detail. I am posting this anyway because I typed it up. If you want just 6 locations and they can always be the same then you might be better off with a macro call or even a macro modal call with the coordinates block skipped or used via parameters. When I get some more time maybe today I will write something up using that format.
Stevo