Jump to content

Welcome to eMastercam.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Haas TL Lathe Tapping Canned Cycle


25 replies to this topic

#1
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
So I just found on Mastercam X6 a lathe Definition called Generic Haas TL 2x lathe. I'm trying to get this post to work but where the section for a simple g84 tapping canned cycle I get a G32 canned cycle. How do I change this G32 canned cycle over to a G84.

%
O0000
(PROGRAM NAME - TDATE=DD-MM-YY - 05-03-12 TIME=HH:MM - 11:24)
N100 G20
(TOOL - 111 OFFSET - 111)
(LATHE TOOL 78)
N110 T11211
N120 G97 S200 M03
N130 G0 G54 X10. Z.2
N140 X0.
N150 Z.1
N160 G32 Z-.3681 E.03125 M05
N170 G32 Z.1 M04
N180 M05
N190 M03
N200 G0 Z.2
N210 X10.
N220 G28 U0. W0. M05
N230 T11100
N240 M30
%



#2
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
It looks like the canned cycle is setup to call a G32 no matter what. In the post in the "ltap" section:

pbld, n$, *sthdg32, pfzout, pffr, pnullstop, e$

I don't know what your post editing skills are like. T'were it me, I'd probably start by changing the *sthdg32 to a *sg83_f

I realize that the tapping code is G84, but the format table that defines the G codes for the canned cycles is messed up I think. Or you could eliminate the *sthdg32 and put in a "G84" including the quotes. I'm not sure off the top of my head if the Haas will need a retract amount in the canned block, so it may alarm out when doing the cycle. I probably wouldn't run a part after modifying something like this until I was sure that the code works. As always, make a backup of the post before you start monkeying around with it.

#3
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
Actually, now that I read your post more thoroughly, you'll probably have to make a few more edits after that one to stop the M05 and M04 codes from being output. FWIW, I use the MPLmaster post, and it works great.

#4
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Steve are you running a Haas Tool Room lathe. I Tried to use a Generic Haas SL 4X Mt_Lathe and I'm getting a code with a M29 S200 instead of an M03 S200. I Tried to change the line in the post where It says M29 and then suddenly I get nothing for the spindle direction.

%
O40000 (HAAS TL FIRST PART)
(DATE=DD-MM-YY - 05-03-12 TIME=HH:MM - 13:37)
(MCX FILE - C:\USERS\ASMURPHY\DESKTOP\HAAS TL FIRST PART.MCX-6)
(NC FILE - C:\USERS\ASMURPHY\DOCUMENTS\MY MCAMX6\LATHE\NC\HAAS TL FIRST PART.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
(POST DEV - IN-HOUSE SOLUTIONS INC.)
(POST DEV - IN-HOUSE SOLUTIONS INC.)
(TOOL - 19 - LATHE TOOL 78 - OFFSET - 19 - INSERT - 10-32 TAP RH - HOLDER - NONE)
G18 G20 G40 G54 G80 G99
(TOOL - 19 OFFSET - 19)
(LATHE TOOL 78)
N1 T1919
G28 U0.
G28 W0.
G54 G0 Z10.
X10.
G98
G97
G0 X10. Z.2
X0.
M29 S200
G99 G84 Z-.3125 R.2 F.01
G80
X10. Z.2
G28 U0.
G28 W0.
M05
M30
%



#5
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Also on the Mill when you select the canned cycle for tapping the Speeds and feeds values become relative to each other. The lathe doesn't seem to be working in the same fashion. Is there a way to fix this?

#6
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
I'm running an SL-20, but the code should be the same. This is what my tapping section looks like:


ltap$        	#Canned tap cycle, lathe
  	pdrlcommonb

  	if use_pitch = 0, #Feed/Min mode, feed divided by spindle speed is equal to thread lead 
    	[
   	if rigid_tap, pbld, n$, sg9697, sm03, speed, e$   		#Rigid Tapping	Can use G84/G88 with M29 or just G84.2
    	pcan1, pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout, prdrlout, *feed, strcantext, e$
   	]
  	else, #Feed/Rev mode, feed is equal to thread lead 
    	[
    	if rigid_tap, pbld, n$, sg9697, sm03, speed, e$   		#Rigid Tapping	Can use G84/G88 with M29 or just G84.2
    	if met_tool$, pitch = n_tap_thds$  # Tap pitch (mm  per thread)
    	else, pitch = 1/n_tap_thds$   	# Tap pitch (inches per thread)
        	, pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout, prdrlout, *pitch, strcantext, e$
    	]
 	pcom_movea
 	pcanceldcl

The use_pitch thing is a switch in the post to output feed/rev or inches per minute. It doesn't look like the TL post has that switch, so that may be something that we would have to add. That TL tapping section is dog doo. And you can probably disregard the "if rigid_tap" thing as well (you are rigid tapping right? Not using a floating holder?) If so, your code may look like this:

ltap$        	#Canned tap cycle, lathe
  	pdrlcommonb

  	if use_pitch = 0, #Feed/Min mode, feed divided by spindle speed is equal to thread lead 
    	[
    	pbld, n$, sg9697, sm03, speed, e$   		#Rigid Tapping	Can use G84/G88 with M29 or just G84.2
    	pcan1, pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout, prdrlout, *feed, strcantext, e$
   	]
  	else, #Feed/Rev mode, feed is equal to thread lead 
    	[
    	if rigid_tap, pbld, n$, sg9697, sm03, speed, e$   		#Rigid Tapping	Can use G84/G88 with M29 or just G84.2
    	if met_tool$, pitch = n_tap_thds$  # Tap pitch (mm  per thread)
    	else, pitch = 1/n_tap_thds$   	# Tap pitch (inches per thread)
    	pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout, prdrlout, *pitch, strcantext, e$
    	]
 	pcom_movea
 	pcanceldcl

See where that gets you.

#7
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA

Also on the Mill when you select the canned cycle for tapping the Speeds and feeds values become relative to each other. The lathe doesn't seem to be working in the same fashion. Is there a way to fix this?


No.

#8
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Well I took my Tl post and deleted the whole section talking about rigid tapping and replaced it with a section that talks about rigid tapping from the Mplmater and started to get a code that looks a little more up to par.

%
O0000
(PROGRAM NAME - HAAS TL FIRST PARTDATE=DD-MM-YY - 05-03-12 TIME=HH:MM - 15:35)
N100 G20
(TOOL - 19 OFFSET - 19)
(LATHE TOOL 78)
N110 T1919
N120 G97 S100 M03
N130 G0 G54 X10. Z.2
N140 X0.
N150 M03 S100
N160 G84 R.3 F.03125
N170 X10.
N180 G28 U0. W0. M05
N190 T1900
N200 M30
%



#9
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
Closer. Looks like you're missing the depth. Can you paste the code you posted into the ltap section?

#10
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field

ltap$ #Canned tap cycle, lathe
pdrlcommonb
if use_pitch = 0, #Feed/Min mode, feed divided by spindle speed is equal to thread lead
[
pbld, n$, *sm03, *speed, e$ #Rigid Tapping Can use G84/G88 with M29 or just G84.2
pcan1, pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout,
prdrlout, dwell$, pffr, strcantext, e$
]
else, #Feed/Rev mode, feed is equal to thread lead
[
if rigid_tap, pbld, n$, *sm03, *speed, e$ #Rigid Tapping Can use G84/G88 with M29 or just G84.2
if met_tool$, pitch = n_tap_thds$ # Tap pitch (mm per thread)
else, pitch = 1/n_tap_thds$ # Tap pitch (inches per thread)
pcan1, pbld, n$, *sgdrlref, pgdrlout, pxout, pyout, pzout,
prdrlout, dwell$, *pitch, !feed, strcantext, e$
]
pcom_movea
pcanceldcl



#11
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Ok well I think I got the MPLmaster to work. It kept changing the feed rate to ipm instead of ipr. Even though I had a feedrate input that needed ipr it was changing it back to ipm. So I found the line of code that changes that and changed it back. I also added more decimal places to my output feedrate.

%
O0000
(PROGRAM NAME - HAAS TL FIRST PART)
(DATE=DD-MM-YY - 06-03-12 TIME=HH:MM - 07:51)
(MCX FILE - C:\USERS\ASMURPHY\DESKTOP\HAAS TL FIRST PART.MCX-6)
(NC FILE - C:\USERS\ASMURPHY\DOCUMENTS\MY MCAMX6\LATHE\NC\HAAS TL FIRST PART.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
(POST DEV - IN-HOUSE SOLUTIONS INC.)
(TOOL - 19 - LATHE TOOL 78 - OFFSET - 19 - INSERT - 10-32 TAP RH - HOLDER - NONE)
G20
(TOOL - 19 OFFSET - 19)
(LATHE TOOL 78)
G54
N19 T1919
G18 G99
G97
G0 X-10. Z.2
X0.
M03 S100
G84 Z-.3125 R.1 F.03125
G80
X-10. Z.2
G28 U0. W0.
M05
M30
%



#12
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
Good. THAT looks like some good code. That TL post is a turd. Nice work.

#13
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Man even that post is messed up it isn't outputting a peck value I'm going to see if I can fix that also. :no :wallbash:

#14
Steve Barner @ SEL

Steve Barner @ SEL

    Advanced Member

  • Members
  • PipPipPip
  • 339 posts
  • Location:Pullman, WA
Peck tapping on the Haas isn't as simple as simply adding a peck value. You need a line of code for each depth you wanna go. I've eedited my mill post to do it, but haven't done the lathe one yet. There is a considerable amount of post editing that needs to be done.

If you get stuck, you can PM me here or email me at sbarner (at) wsu (dot) edu

I check that more often.

#15
Russh67

Russh67

    Member

  • Members
  • PipPip
  • 78 posts
  • Location:Long Island, New York
Hey Guys.

Hope you don't mind my budding in.....

Granted, I have fanuc Oi not haas lathe.

I tried pasting mplmaster tap section into my post and fooled around a little..

I cant get my tapping right...it's close

I use a copy of mplfan that's been edited a lot already for my caxis. I cannot get my feed to be the thread pitch. I also need to get rid of my m73 (caxis spindle on)

Gcode:

(TOOL - 12 OFFSET - 12)
( NO. 4-40 TAPRH)
(C-AXIS FACE DRILL)
G28U0.W0.
G0T1200
G0T1212
M23
M49
M19
G28H0.
G0X0.Z.1
C0.
G97S1320M73 *******no G97, no M73 ************
G98G184Z-.682R0.F33. *******no g98, Feed to Pitch (.025 for 4-40)*********
G80
T1200
G28U0.W0.H0.M75 **********M75 is spindle off redundant doesn't matter*********
M18
M30

My tap post block looks like this:

ltap$ #Canned tap cycle, lathe
gcode$ = zero
prv_dwell$ = zero
@dwell$
comment$
pcan
pe_inc_calc
xabs = vequ(refht_x)
ps_inc_calc
pcan1, pbld, n$, sgcode, pzout, strcantext, e$
pe_inc_calc
xabs = vequ(depth_x)
ps_inc_calc
opcode$ = 104 #thread address from feedrate
pbld, n$, *sthdg32, pfzout, pffr, pnullstop, e$
if dwell$, pdwell1
pe_inc_calc
xabs = vequ(refht_x)
ps_inc_calc
pswtchspin
pbld, n$, *sthdg32, pfzout, *spindle_l, e$
if dwell$, pdwell1
prv_gcode$ = -1
pbld, n$, pnullstop, e$
pswtchspin
if refht$ <> initht$,
[
gcode$ = zero
pe_inc_calc
xabs = vequ(initht_x)
ps_inc_calc
pbld, n$, sgcode, pfzout, *spindle_l, e$
]
pbld, n$, spindle_l, e$
opcode$ = 81 #Restore opcode
pcom_movea


Any Suggestions would be greatly appreciated.....Thank you in advance..

#16
roland_1

roland_1

    Member

  • Members
  • PipPip
  • 66 posts
  • Location:Cleveland, OH
send me your post and MD, part file, orig code and changed example and I will take a look and try to set it work

#17
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
Also I think they try to throw in the g98 as a canned cycle return plane. But that is how you write for the mill. I was noticing the same things with my post but the Haas Lathes don't recognize that feature because of the whole IPM IPR thing.

#18
Russh67

Russh67

    Member

  • Members
  • PipPip
  • 78 posts
  • Location:Long Island, New York
Thank you for replying to me....

Also I think they try to throw in the g98 as a canned cycle return plane. But that is how you write for the mill. I was noticing the same things with my post but the Haas Lathes don't recognize that feature because of the whole IPM IPR thing.


On our fanuc G98 is per minute feed, usually put in at all caxis milling lines where the feed rate is commanded.I don't need it in tapping lines....I wish we had a HAAS I like the control on the HAAS much better than fanuc......


I ran the post debug and see that the taping stuff is coming from:

mtap$ #Canned tap cycle, mill
pdrlcommonb
pcan1, pbld, n$, sgfeed, *sgdrlref, pgdrlout, pxout, pyout, pzout,
pcout, prdrlout, pffr, strcantext, e$
pcom_movea


I am using c-axis to tap on the face even if it's at the center. We don't have tap chucks to fit in the carousel we do have the er-20 tap collets for our live tools.

I don't see any where a 1/# of threads thing in the post to add the pitch in the feed rate for tapping, any tapping.

#19
Rocketmachinist

Rocketmachinist

    Advanced Member

  • Members
  • PipPipPip
  • 727 posts
  • Location:Moffett Field
I'm taking a shot in the dark here. Remove the *sgdrlref, out of that line it should kick out the g98

#20
Russh67

Russh67

    Member

  • Members
  • PipPip
  • 78 posts
  • Location:Long Island, New York
I took out sgfeed and it removed the g98.

Earlier in post there is this:

#Canned drill cycle reference height
sg198 : "" #G198 #Reference at initht
sg199 : "" #G199 #Reference at refht
sgdrlref : "" #Target string

fstrsel sg198 drillref sgdrlref 2 -1

Looks like reference height or Return to Initial height.


I am trying to learn so bear with me..



Reply to this topic