Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

g98 in lathe drilling cycle


Recommended Posts

Find this:

 

lpeck$		 #Canned peck drill cycle, lathe
 pdrlcommonb
 pcan1, pbld, n$, *sgdrlref, *sgdrillf, pxout, pyout, pfzout, pcout,
 prdrlout, *peck1$, *feed, strcantext, e$
 pcom_movea

 

and delete ' *sgdrlref,' like this:

lpeck$		 #Canned peck drill cycle, lathe
 pdrlcommonb
 pcan1, pbld, n$, *sgdrillf, pxout, pyout, pfzout, pcout,
 prdrlout, *peck1$, *feed, strcantext, e$
 pcom_movea

 

The U0 and W0 calls are on the same line in my copy of this post.

Link to comment
Share on other sites

OK, if you want to put it back, make your post look like this:

ltlchg$		 #Toolchange, lathe
 toolchng = one
 gcode$ = zero
 copy_x = vequ(x$)
 pcc_capture #Capture LCC ends, stop output RLCC
 c_rcc_setup$ #Setup LCC on first 60000
 plcc_lead_begin #Save original in sav_xa and shift copy_x for LCC comp.
 pcom_moveb #Get machine position, set inc. from c1_xh
 c_mmlt$	 #Position multi-tool sub, sets inc. current if G54...
 ptoolcomment
 comment$
 if home_type < two, #Toolchange G50/home/reference position
 [
 sav_xh = vequ(copy_x)
 sav_absinc = absinc$
 absinc$ = zero
 pmap_home #Get home position, xabs
 ps_inc_calc #Set start position, not incremental
 #Toolchange home position
 if home_type = one,
	 pbld, n$, *sgcode, pfxout, pfyout, pfzout, e$
 else,
	 [
	 #Toolchange g50 position
	 pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$ # <----------------------
	 toolno = t$ * 100 + zero
	 if home_type = m_one, pbld, n$, *sgcode, *toolno, e$
	 else, pbld, n$, *sg50, pfxout, pfyout, pfzout, e$
	 ]

 

And this:

pl_retract	 #Retract tool based on next tool gcode, lathe (see ptoolend)
 cc_pos$ = zero
 if home_type = one,
 [
 pmap_home #Get home position, xabs
 ps_inc_calc #Set inc.
 pbld, n$, psccomp, e$
 pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, *toolno, e$
 pbld, n$, pnullstop, strcantext, e$
 ]
 else,
 [
 #Retract to reference return
 pbld, n$, `sgcode, psccomp, e$
 if home_type = m_one, pbld, n$, *toolno, e$
 pcan1, pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", # <----------------------
	 pnullstop, strcantext, e$
 if home_type > m_one, pbld, n$, *toolno, e$
 ]

 

If this is for a mill-turn, there are two more areas involved. Let me know if you need that section of code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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

×
×
  • Create New...