What's new
What's new

Using a macro statements to adjust a tool to dia.'s

GSMachinist

Plastic
Joined
Jul 27, 2020
Anyone know of a better way to control 2 bore's/dia's on a lathe using 1 tool? Below is my current method I am going to tryout today.




M0(READ ME - 5/8 BORING BAR)
(USES MACRO STATEMENTS TO)
(CONTROL THE 2 BORE DIA'S)
(ADJUST TOOL WEAR OFFSET TO)
(CONTROL THE 8.50 DIA. & )
(USE #4 VALUE TO CONTROL)
(THE 1.499 DIA. - BE SURE)
(#5 IS OPPOSITE VALUE OF #4)
(DELETE M0 TO RUN PARTS)

N203
(FINISH BORE 5/8" BAR 80 X .0156)

#2=606(TOOL & OFFSET #)
#3=6(OFFSET # ONLY)
#4=.001(BORE DIFFERENCE)
#5=-.001(OPPOSITE VALUE OF #4)


T#2
G50S1400
G54
G96S650M3

X8.5
*program cut 1st bore*

G0Z.02

G10P#3U#4(ADJUST OFFSET)

T#2(RECALL TOOL $ OFFSET)
(AND NEW OFFSET)

X1.499(move to cut 1.499 bore)

*program cut 2nd bore*

G0Z10.M9

G10P#3U#5(ADJUST OFFSET)
(BACK TO ORIGINAL VALUE)

M1
 
Seems really confusing and error prone.

Why not just use 2 offsets directly?

T0606
G50S1400
G54
G96S650M3

X8.5
*program cut 1st bore*

G0Z.02

T0616

X1.499(move to cut 1.499 bore)

*program cut 2nd bore*

G0Z10.M9



M1
 
That is the way I have been doing it. I'm afraid that the program will get saves with the new T0616 in the middle of the tool path. Then the next time it is run that tool will be put in a different turret position and not modified. But you have given me the idea to put macro statement at the top of the tool heading and it could prevent this. I'm going to try to work on that.

Thanks
 
You already have a set of instructions at the beginning of the tool. Just change it.

(T0606 - Bore 8.5)
(T0616 - Bore 1.499)
 
you could put your delta into a variable like you are doing, and use that directly. And only use one offset
X[#101+1.499]
 
If you decide to go the "one tool, two offsets" route maybe put some conditional bracing safeguard in to alarm you if, say, the difference between the two offsets is greater than some amount....maybe .010" Just in case you set offset 6 while loading in tool 6 and forget to update offset 16 from whatever the hell was using it last and risk a crash. Good luck!
 








 
Back
Top