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:

FANUC macro - high speed look ahead


Recommended Posts

So on one of our production machine cells (couple of MX330's) we have had an operator fat finger an offset while adjusting a tool. (he cleared the offset on a differnt tool while adjusting one, needless to say when you have a zero instead of 5.000 things go wrong fast)

I can up with a simple macro to check the tool length offset against a nominal value to prevent this.

	O9019 (TOOL LENGTH CHECK)
(#101 = NOMINAL TOOL LENGTH)
(CHANGE PARAMETER 6059 TO 43)
	M98 P7999 (CAPTURE NOMINAL TOOL LENGTH)
	#100 = #[#518+10000] + #[#518+11000]
(CAPTURE CURRENT OFFSET)
	(COMPARE LENGTHS)
IF[[#101-#100]GT .1]GOTO500
IF[[#101-#100]LT -.1]GOTO550
	GOTO1000
	N500
#3000=99(TOOL LENGTH TOO SHORT)
	N550
#3000=99(TOOL LENGTH TOO LONG)
	N1000
G43 H#518 Z#26
M99
	

So every time a G43 is read in the program it verifies the length offset is within +-.100.

Program O7999 is this: (Note that I used 7999 instead of putting things all in one program to make adjusting values easier should the need arise)

	O7999(NOMINAL TOOL LENGTHS)
(#101 = NOMINAL TOOL LENGTH)
	GOTO#518
	N1
#101 = 3.66
GOTO2000
	N2
#101 = 4.21
GOTO2000
	N3
#101 = 4.75
GOTO2000
	N4
#101 = 4.61
GOTO2000
	(ect up to 60, plus sister tools)
	N2000
	M99
	

 

I have tested it & it works as expected. My concern is running this with high speed look ahead (G131 for matsurra or G5.1 Q1)

Does the look ahead have the potential to mess things up eventually? It worked OK in testing but I want some input before I let this go lights out.

  • Like 1
Link to comment
Share on other sites
16 hours ago, cncappsjames said:

In cases where I need to check the length offset value, I'll write a custom G or M code and call it immediately after the toolchange but before the G131,  or put the check in the tool change MACRO. That way look-ahead doesn't become a problem. 

 

JM2CFWIW 

I wanted to do this route...but trying to cover all the bases. Like if an operator fat fingered an offset during the middle of a cycle...machine retracts, repositions, calls G43 (it happened)

This will check every time a G43 is read. It has worked in testing, but the look ahead concern has kept me from doing it lights out.

Link to comment
Share on other sites

Good error proofing there.  I used to do this with our routers.  I didn't use a program though to store the nominal tool lengths.  I just compared the tool length to my Mastercam assembly length in the main program immediately following the tool change.  Purely just a verification as to what the tool was programmed and verified to do.  That way you never have to go and edit the length file.  If something needs to be different, it will catch it by default.  I mostly used standard library tools, but sometimes I had to pull tools out a smidgen further, the 1mm + tolerance was pretty much perfect.  I also used center comp with ball endmills, and had a check in the post that would make sure I had used center comp on the tool-path, as well as output into the code to check if a -radius value had put in the wear as we still set tools to the tip, I could do it both ways (tip or center) and the post and code would make sure I had set things up to match. 

Great work.  As far as look-a-head.  Just make sure it is the first thing after the tool change and it shouldn't be a problem.  If it is, just throw a G4 in there.

Link to comment
Share on other sites
On 8/17/2020 at 5:58 AM, MIL-TFP-41 said:

I wanted to do this route...but trying to cover all the bases. Like if an operator fat fingered an offset during the middle of a cycle...machine retracts, repositions, calls G43 (it happened)

This will check every time a G43 is read. It has worked in testing, but the look ahead concern has kept me from doing it lights out.

Yeah... that's a valid concern. The more we fail-safe stuff, the bigger failure possibilities they throw at us eh?

:rofl:

Link to comment
Share on other sites

I made a clear offset maco for after a job clearing tool offsets. It puts 40 inches for z in the event a tool hasn't been touched off.. I would be interested in yours once you get it figured out.

 

The renishaw probe settings program turns the look ahead off also I believe

Link to comment
Share on other sites
15 hours ago, Leon82 said:

It puts 40 inches for z in the event a tool hasn't been touched off..

I have found on production machines that frequently run prototypes programs or variations to have all unused tool and work offsets to have "safe" default values in them.  By safe, I mean values that will force the machine into a safe over-travel condition.

It's saved my butt many times.

  • Like 2
Link to comment
Share on other sites
On 8/18/2020 at 5:41 PM, Leon82 said:

I made a clear offset maco for after a job clearing tool offsets. It puts 40 inches for z in the event a tool hasn't been touched off.. I would be interested in yours once you get it figured out.

 

The renishaw probe settings program turns the look ahead off also I believe

I do the same thing with exception of the length. 88.8888"

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