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:

Change T0101 to T01 D01


Recommended Posts

Hi All,

 

I am modifying a lathe post and I was wondering if someone could point me in the right direction.

 

Most lathes use T0101 or T010101 to call the tool number and nose comp, etc., but this controller wants a separate T and D

 

Any help would be much appreciated.

Link to comment
Share on other sites

Which post?

my okuma post has this in the ltlchg$ section

 

 

toolno = t$ * 100 + tloffno$

 

I'm trying to modify the "Generic Fanuc 4X Lathe" post for our VTL.

 

My post has exactly what your's has.

 

I tried to remove the equation, but it outputs T0001

 

I need T1 D1

Link to comment
Share on other sites

I have that in one of mine...

first create 2 new format statements... for me they are "gtoolno" and "gltlno" (notice the 5 instead of the 7) also it looks like you will want to change the "H" to "D"

fmt 	4  partflip #
fmt  T  7   toolno  	#Tool number
fmt  T  5   gtoolno  	#Tool number                                                         		added for g & l tool number callout 6-28-11 ksg
fmt  H  5   gltlno  	#   

 

Then I have this here right at the top of the ltlchg postblock...

ltlchg$      	#Toolchange, lathe

 	gltlno = tloffno$

 

I also added this a bit further down in the same postblock...

   	gtoolno = t$               		<<<<<<<<<<added this



 	toolno = t$ * 100 + tloffno$                  	<<<<<<<<<<just before this

 

and here is where the output takes place...

  	if not(synch_flg & tool_op$ = 67), 	#Suppress tool output if cutoff during part xfer
   	[
   	if omitseq$ = 1 & tseqno > 0,
     	[
     	if tseqno = 2, n$ = t$
     	#pbld, [if home_type = -1, *sgcode], *toolno, "(", *tcr$, ")", e$   		######### t0101 from here     		######changed for g&l added next line 6-28-11 ksg
     	pbld, [if home_type = -1, *sgcode], *gtoolno, *gltlno, "(", *tcr$, ")", e$
     	pcssg50
     	]
   	else,
     	[
     	pbld, n$, [if home_type = -1, *sgcode], *gtoolno, *gltlno, "(", *tcr$, ")", e$        	#<<<<< also changed it here
     	pcssg50
     	]
   	]

 

 

^^^^^^^^^^^^^The line with the "#" in front of it is the old one (commented out)

 

Just before that section in the same postblock where the "M00" line comes from

  	if home_type < two, #Toolchange G50/home/reference position
   	[
   	sav_xh = vequ(copy_x)
   	sav_absinc = absinc$
   	absinc$ = zero
   	start_xh = vequ(xh$)
   	pmap_home   #Get home position, xabs
   	ps_inc_calc #Set start position, not incremental
   	#Toolchange home position
   	if home_type = one,
   	toolno = toolno - (t$ * 100)

     	pbld, n$, *sgcode, pfxout, pfyout, pfzout, *gltlno, "M00", e$             		#REMOVED SG97 FROM AFTER N$ NOT NEEDED FOR G&L  6-28-11 KSG 	<<<<<<<<<<< HERE IS GLTLNO
   	toolno = toolno + (t$ * 100)
   	else,
     	[
     	#Toolchange g50 position
     	pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$
     	if home_type = zero, pbld, n$, *sg50, pfxout, pfyout, pfzout, e$
     	]
   	pe_inc_calc #Update previous
   	absinc$ = sav_absinc
   	copy_x = vequ(sav_xh)
   	]
 	else,
   	[
   	toolno = toolno - (t$ * 100)
     	pbld, n$, sg97, *sgcode, pfxout, pfyout, pfzout, *gltlno, "M00", e{:content:}nbsp;   #   <<<<<<<<<<<<<<<<<<<<<< AND HERE IT IS TOO

 

 

Might have missed something, but with the post debugger it should be a piece of cake for you after making these changes..

Let me know if you need more stuff.

Link to comment
Share on other sites

Someone needs to tell me why the indentation only works sometimes... here is the part of my ltlchg postblock you need, please don't knock my hackamania!!!

just search it for the two new variables and you will see what you need to change.

 

Here is what my output looks like

N1(           	1    	BEGIN)
N100G00X-10.Z3.H01M00
N102T01H01(TNR = 0.0160)
N104M40C1000.S200.M05
N106X-9.

Link to comment
Share on other sites

Hi All,

 

I am modifying a lathe post and I was wondering if someone could point me in the right direction.

 

Most lathes use T0101 or T010101 to call the tool number and nose comp, etc., but this controller wants a separate T and D

 

Any help would be much appreciated.

 

 

Hello,

Maybe you use the tloffno$ Variable with the right fmt:

And put it to the tool call sections (PSOF,Ptlchg etc.)

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