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:

Safe tool change position on a Haas Mill


Roger
 Share

Recommended Posts

How do you command a safe tool change command in Mastercam 2019 on a Haas mill?  I've tried setting  my home position to X-10.0" as in this screen shot.  The code doesn't post out though.  Do I need to change something in the post?

I've watched the Haas video on alias the M6 code (Haas Tip of the Day 4/16/2016 on YouTube).  I didn't want to do that, because it would effect all programs.  And I would like to be able to do in in Mastercam.  I guess I could always do a manual input, if that's the ONLY WAY.

Untitled.jpg

Link to comment
Share on other sites
13 minutes ago, C^Millman said:

REF POINT? You could use a Point toolpath with force tool change. Are you trying to change tools by hand?

Not by hand.  With the tool changer.  For now, I'm doing a manual entry tool path BEFORE each tool change.  I would still like to know of other ways. 

Untitled.jpg

Link to comment
Share on other sites

You can click the force tool change box and see what the output is.  Probably at least G53Z0 or G28G91Z0 in there.  If not, I would tweak (and I have - all of my posts) my post so that if I hit force tool change it outputs my safe moves, if not if shoots to the next op.  I also have a few posts with my safe moves having macro variables for X and Y so that the guy at the panel can send it where ever he wants simply by inputting it in the proper variable.  If they are unchanged it goes to 0.  However, this is for the people who demonstrate the ability to walk and chew gum simultaneously.

  • Like 2
Link to comment
Share on other sites

This is for sure a Post Edit, but an easy one to make.

What Post are you starting with? (The Generic Haas 4X Mill Post from CNC Software, or MPMaster?)

There are 2 specific blocks where Tool Changes occur:

psof$

ptlchg$

In both of these blocks, look for the output lines. (Any line where the last parameter is 'e$'.)

The variables for the Home Position are: xh$, yh$, and zh$. (Add a "*" if you want to force the output. Example: *xh$, *yh$, *zh$)

The Work Offset is output by the 'pwcs' Post Block.

So a line like this should work:

pbld, n$, "G00 G90 G53 G49 Z0.", e$

pbld, n$, *sgcode, *sgabsinc, pwcs, *xh$, *yh$, e$

  • Like 4
Link to comment
Share on other sites

I do it like this...

Tool call in the program

T23
M98 P66666

 

Then the O66666 program is like this

O66666
G91 G28 Z0 M19 (Move to tool change position, orient spindle)
G90 G00 G17 G40 G49 G80 G98 
G90 G53 X-10.0 Y0 (SAFE TOOL CHANGE POSITION)
M06 (Change tools)
M99 (End of custom macro)

Always editable to change the position

 

Link to comment
Share on other sites

Another way to tackle this, is to modify the post to output positions with Common Variables on the machine. That way the Operator only has to modify these variables once, at the top of the program, to change the safe location.

My first recommendation to you is this:

  • Do not use a Work Offset position for the Safe Tool Change location. Work Offsets are always relative to the location on the machine table where the Operator is setting the XYZ Register Values. The Work Offset (necessarily) moves each time you setup a new job.
  • For that reason, I like to use the Machine Coordinate System (G53 on a Haas).
  • When using G53, all of your positions will be negative! This is because the "home position" of the machine is located with Z retracted all the way "up", and the Centerline of the Spindle in XY is located over the "back / right" corner of the table.
  • In G53, X Negative moves the "table right, and spindle left". Y Negative moves the "table back, spindle forward", and Z negative moves the spindle "down towards the table".

The only way I would use a Work Offset for the Safe Tool Change Location, is if you have "unused Work Offsets", that you can set for a particular job, and never change the values.

  • For example, G110-G129 are the "Extended Work Offsets" on the Haas.
  • You could use G120-G129 for a set of different jobs. I would record the positions of where these "safe locations" are, and then I would "set them" programmatically, with a G10 line, in the Program Header. That way nobody will ever screw up the locations, because the NC Code will simply overwrite any bad settings.

Otherwise, using a set of Common Variables would work really well. Here is some sample code:

#510 = -12.

#511 = -4.

(START,OF,FILE)

G00 G17 G20 G40 G80 G90

G00 G90 G53 X#510 Y#511

T3 M06

G00 G90 G54 X2.2 Y3.3

G43 H3 Z4.4

.

.

.

G91 G28 Z0.

G00 G90 G53 X#510 Y#511

(TOOL COMMENT)

T4 M06

 

If you choose to use the "common variables", you'll just have to modify the Post to output the "G00 G90 G53 X#510 Y#511" String, and use a Manual Entry at the top of the Program, to output the Variables.

If you want to get fancy, you can put something like this:

  • (parse comment, XSAFE_TOOL 510 YSAFE_TOOL 511)
  • #510 = -12.
  • #511=-4.

With the "parse comment", you can actually use the "scan" function to scan the Comment String, looking for a "matching string". If MP detects the "matching string", then it will attempt to capture any "numeric" string values, that immediately follow the "found string". The function then converts this "string" into a "number", and stores it in the "return variable from the function". The reason I mention this, is that it gives you the flexibility to put all of the data into the Mastercam file, and not have to "hard code" the Variable Numbers that are being used. This will let you use different sets of variables, for different machines (if necessary), and just gives you that much more flexibility.

 

 

  • Thanks 1
  • Like 1
Link to comment
Share on other sites

Colin, I gave your last post a LIKE and a THANKS, where I really should have gave it a HUH? reaction...LOL!!  Though I've been using Mastercam for a long time now, I've never really had the time or the brain to figure out the post processer side of Mastercam.  Or using macro variables.  I did however purchase a book on it back in 1997......:lol::D

I'm getting close to retiring, (3 more years maybe??), And this OLD DOGS brain don't work like it use too.

THANKS GOES OUT TO EVERYONE WHO POSTED!!!  It really helps to have this forum, and all this knowledge at one's finger tips!!!

20180719_060720 (002).jpg

  • Like 1
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...