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:

Adding safety line at tool change?


Recommended Posts

Hi,

 

We has a Haas and I am using MPmaster post.. I need to add this safety line before every tool change G00 G17 G20 G40 G80 G49 G90.. Where is the safest place to add this in the post?

 

 

(OVERALL MAX - Z1.)

(OVERALL MIN - Z-4.375)

N110 G00 G17 G20 G40 G80 G49 G90 <----------------------------- Need this line posted on very tool change --------------------->

N120 G91 G28 Z0.

N130 (ROUGH MILLS EXTRA MATERIAL WITH 1 1/2 ROUGHING ENDMILL)

N140 (COMPENSATION TYPE - WEAR COMP)

N150 T2 M06 (1 1/2 HSS ROUGHING ENDMILL)

N160 (MAX - Z1.)

N170 (MIN - Z-4.375)

N180 M08

N190 G00 G17 G90 G54 X10.9625 Y2.9855 S800 M03

N200 G43 H2 Z1. T3

N210 Z.25

N220 G94 G01 Z-4.375 F50.

N230 G41 D2 Y2.1105 F15.

N240 Y-2.1105

N250 G40 Y-2.9855

N260 G00 Z1.

N270 X10.4 Y2.9855

N280 Z.25

N290 G01 Z-4.375 F50.

N300 G41 D2 Y2.1105 F15.

N310 Y-2.1105

N320 G40 Y-2.9855

N330 G00 Z1.

N340 M09

N350 M05

N360 G91 G28 Z0.

N370 M01

N380 (FINISH MILLS PART TO 9.610 LENGTH WITH 1 1/4 ENDMILL)

N390 (COMPENSATION TYPE - WEAR COMP)

N391 <------------------------------------------------------------------------------------- need it to post here -------------------------------->

N400 T3 M06 (1 1/4 HSS ENDMILL)

N410 (MAX - Z1.)

N420 (MIN - Z-4.375)

N430 M08

N440 G00 G17 G90 G54 X10.241 Y2.8397 S900 M03

 

 

Thanks

Link to comment
Share on other sites
ptlchg_com	  #Tool change common blocks
  if force_output | sof,
    [
    result = force(ipr_type,ipr_type)
    result = force(absinc$,absinc$)
    result = force(plane$,plane$)
    ]
  pcom_moveb
  pcheckaxis	  #Check for valid rotary axis
  c_mmlt$ #Multiple tool subprogram call
  #ptoolcomment
  if sof & scomm_sav <> snull,
    [
    spaces$ = 0
    n$, pspc, scomm_str, *scomm_sav, scomm_end, e$
    spaces$ = sav_spc
    ]
  if sof = 0, scomm_sav = snull
  comment$
  pcomment3
  pmisccheck
  pcan
  pbld, n$, *sgcode, *sgplane, *smetric, "G40 G80 G49",  *sgabsinc, e$  #<<<<<<<<<<<<<<<<<<<<<<<<<
  if stagetool >= zero,
    [
    if omitseq$ = 1 & tseqno > 0,
	  [
	  if tseqno = 2, n$ = t$
	  pbld, *n$, *t$, "M06", ptoolcomm, e$
	  ]
    else, pbld, n$, *t$, "M06", ptoolcomm, e$
    ]

Link to comment
Share on other sites

ptlchg_com	 #Tool change common blocks
 if force_output | sof,
 [
 result = force(ipr_type,ipr_type)
 result = force(absinc$,absinc$)
 result = force(plane$,plane$)
 ]
 pcom_moveb
 pcheckaxis	 #Check for valid rotary axis
 c_mmlt$ #Multiple tool subprogram call
 #ptoolcomment
 if sof & scomm_sav <> snull,
 [
 spaces$ = 0
 n$, pspc, scomm_str, *scomm_sav, scomm_end, e$
 spaces$ = sav_spc
 ]
 if sof = 0, scomm_sav = snull
 comment$
 pcomment3
 pmisccheck
 pcan
 pbld, n$, *sgcode, *sgplane, *smetric, "G40 G80 G49", *sgabsinc, e$ #<<<<<<<<<<<<<<<<<<<<<<<<<
 if stagetool >= zero,
 [
 if omitseq$ = 1 & tseqno > 0,
	 [
	 if tseqno = 2, n$ = t$
	 pbld, *n$, *t$, "M06", ptoolcomm, e$
	 ]
 else, pbld, n$, *t$, "M06", ptoolcomm, e$
 ]

 

 

 

 

 

Perfect thanks...

 

 

:smoke:

Link to comment
Share on other sites

That line should be posted at the top of the file already.. (looks like I was a bit too slow now that I posted it .. lol someone beat me to it lol)

 

The only difference with this one is if you only output sequence numbers for each tool it will put the sequence number out so you still get the cancel codes when you go to that N number line fopr the tool..

 

The simplest way to do this is you could add it in ptlchg_com,

 

by changing this bit

 

 

 if stagetool >= zero,
 [
 if omitseq$ = 1 & tseqno > 0,
	 [
	 if tseqno = 2, n$ = t$
	 pbld, *n$, *t$, "M06", ptoolcomm, e$
	 ]
 else, pbld, n$, *t$, "M06", ptoolcomm, e$
 ]

 

 

to look like this..

 


if stagetool >= zero,
 [
	 if omitseq$ = 1 & tseqno > 0,
	 [
		 if tseqno = 2,
			[
		 n$ = t$
			 pbld, *n$, *sgplane, *sgmetric, "G40 G80 G49", *sgabsinc, e$
			 pbld, n$, *t$, "M06",ptoolcomm,e$
		 ]
	 ]
		 else,
	 [
	 pbld, n$, *sgplane, *sgmetric, "G40 G80 G49", *sgabsinc, e$
		 pbld, n$, *t$, "M06",ptoolcomm,e$
	 ]
 ]

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