Rocketmachinist

Haas TL Lathe Tapping Canned Cycle

26 posts in this topic

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

%

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

%

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

%

Share this post


Link to post
Share on other sites

Closer. Looks like you're missing the depth. Can you paste the code you posted into the ltap section?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

%

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I'm taking a shot in the dark here. Remove the *sgdrlref, out of that line it should kick out the g98

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

pffr is the post block for my feed rate how can I add the 1/#of threads thing thats in the mplmaster??

 

This part:

pitch = 1/n_tap_thds$ # Tap pitch (inches per thread)

I dont have any of the strings variables that are in the mplmaster like thd$ and pitch.

Share this post


Link to post
Share on other sites

Is this a canned tapping cycle for on center with the spindle turning?

 

If it is then what I would do is just do the math and tell it what that value is in your feedrate screen, just like if you were doing single point threading.

 

Or you can try playing around with this line of code but like I said i'm not fully positive.

 

use_pitch : 0 #0 = Use feed for tapping (force Feed/Min), 1 = Use pitch for tapping (force Feed/Rev)

Share this post


Link to post
Share on other sites

Russh, Did you get this problem resolved or are you still tackling it? I've been away from the forum a few days. I can try to lend assistance if you're still at it.

Share this post


Link to post
Share on other sites

Yes I'm still fooling with this..I have been busy and out of the office....

 

Thanks guys....

 

Russh, Did you get this problem resolved or are you still tackling it? I've been away from the forum a few days. I can try to lend assistance if you're still at it.

 

I am using a modified mpfan, not mplmaster. I've had the mplfan post modified a lot so I can't switch now, it would be a huge hassle. i didn't know about mplmaster. I do see that there are some other things in it.

 

I has strings variables and other variables that calculate pitch of a thread to be used as a feed for tapping which my post doesn't have. I dont see any where in my post where it calls the pitch and I don't see the math any where.

 

I do tapping on the caxis. I have ER-20 Tapping collets for rigid tapping.

 

So I'd like to create a variable to call the pitch of a tap. Then create a variable for calculating pitch and insert this as feedrate into the mtap$ section in my post in place of pffr so that it will post out a pitch for feedrate in my caxis tapping ops.

 

I am learning post editing. I'd love to do this on my own. I am begining to understand...

Share this post


Link to post
Share on other sites

Very well. I've farted around with the mpfan before, so I am somewhat familiar with it. I can probably give you a hand if you run into trouble. You can PM me here or email me. sbarner (at) wsu (dot) edu.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us