hi all ,
i have a mill with a meldas 500 series controller that i need help with macros while using common variables.
heres what im doing,
i have similar parts, same zero, but want to be able to just change one variable and have the hole location move without having to edit program with each different part.
the way i do it now is as follows,,keep i mind this is for one part
#512=a (x)
#513=b (y)
c,d,e,f being my different hole locations
and my line will read
G90G0G73X#512Y#513Z-1R...Q...F...
what i want to do is something like this
(part 1 #501)
(part 2 #502)
(part 3 #503)
#501=1
IF[#501EQ1] then 512 = a and 513 = b
IF[#501EQ2] then 512 = c and 513 = d
IF[#501EQ3] then 512 = e and 513 = f
It looks like you've got it mostly figured out already. You just need to figure out how the branching works. The Mits controls don't allow IF - THEN statements, only IF - GOTO. You just need to structure your program sort of like this:
#501=1
IF[#501 NE 1] GOTO 10
#512 = a
#513 = b
GOTO 50
N10 IF[#501 NE 2] GOTO 20
#512 = c
#513 = d
GOTO 50