What's new
What's new

For the want of an M6 (Fanuc)

13engines

Stainless
Joined
Jun 30, 2015
Location
Saint Paul, MN
Greetings all,

Up front:
Mid/Late 90's Mori Seiki SV-50 w/2 pallets
Fanuc 18MC

Can anyone tell me, if I set up the control to call program say O9003 using an M6, and M6 is contained within O9003, is disaster lurking in that call or not? Maybe just a hung control or a non-stop repetitive tool change? Not really looking for messed up keep relays either.

Let me explain. Unlike other machines I'm familiar with, where an M6 calls up 9001 for a tool change, this Mori has the entire tool change routine I think stored on ROM or EPROM. You can't see it, single block it, feed hold it, change it, or even follow along except for possibly seeing changes to modal G and M values on the MDI screen. Even with 8-9000 programs visible and editable.

Problems - the existing M6 doesn't automatically send the head home. If the head isn't home you get an alarm. What's also funky about this machine is you can't type say T5M6 in one line. They have to be on two or you get another alarm. Maybe it's the fact that in the many years of programming another machine that did everything you could ever want with a plain M6 call, including bringing up the right tool, I'm a little miffed over why oh why should I have to G91G28Z0 before a tool change, AND put the tool and change calls on two lines. Honestly, before the Mori came along, I can't remember once ever programming a G91G28 or separating T_ and M6. (Use G53 to put the machine where I want it for loading.)

Two - I have programmable coolant nozzles that need a DPRINT message sent out with each physical tool change to help the nozzle control follow along. Without access to the M6 programming, I've been stuck using G100 to call program O9010 (Param 6050) which is an all encompassing program including head home, M6 and the DPRINT stuff.

Besides the fact that whenever I transfer old programming off my Fanuc OMC machine, I have to change the tool change line from T5M6 to T5(EOB) next line G100; That's just a small hassle, but it pains me to have to use G100 for a tool change. It's just not right. It would be like calling G something to turn on the coolant. Really? Aurgh! Ha... I know there are bigger problems in the world than this, but some things you deal with everyday can urk a guy.

So what I'd like to do is change M6 to call subroutine O9003 (parameter 6073) In O9003 I'd include everything I want in a tool change, but at some point I'll still need to call M6 from within the M6 called subroutine as if it were a nested sub. From playing around with and assigning extra M codes, and from what I've read in Peter Smids' Macro B book, is that M codes calling these special subroutines (and macros I believe) DO NOT go to the PMC. Which is what gives me the idea that I can get away with this. To me the current Mori hidden tool change is completely within the PMC realm... or is it? (Could be my real question.) I mean, if the control is setup to call O9003 with an M6, is that going to override the controls desire? to bring in the hidden tool change M6? I know calling M6 from WITHIN the subroutine WILL go to the PMC, but... HELP! (Note: I can spot a bunch of M6 related stuff in the ladder, but other then that you can see nothing about it.) The other great thing about this is if it does work, I can see where my example of T5M6 all on one line should be totally fine. Especially if T5 is already waiting, as I normally try to make it so.(Though not 100%)

Thank you to anyone who can help. And no I won't hold anyone responsible if they say go for it and I do and my machine gets messed up. Ultimately it will be me that makes the final call based on available knowledge that I have or have acquired. If it were something other than a tool change I'd probably just go for it, but if you've ever seen one of these SV50's change a tool, you'll know what I'm talking about. Yikes... stand back! It verges on down right scary.

Dave
 
Mori runs the entire M6 command via the PMC ladder program. Yes, you can embed the M6 command inside program O9003 and call it with M6 when parameter 6073 is set to 6. It will work just fine. Actually not an uncommon thing to do.

Needing to pre-tool before the M6 is just a way to get things done faster. You call up the next tool while the current tool is working. When the current tool is done just command M6. Then while the new tool is working call up the next tool. When you are on the last tool call up the first tool and then M6 just before M30. Then your program is ready to start again with the first tool in the spindle.
 
Many thanks Vancbiker. Nice to have at least one person with experience derived knowledge say it's okay. Can't wait to give it a shot.

Not sure if you'll end up back here, but I have one more question about these programmable parameters that I didn't want to add last time, as my original post was a mile long already. Hopefully you also have knowledge about the following.

In the Fanuc 16/18 Model C Parameter Manual, (B-62760EN/01) it lists the following parameters as stated below.

6050 _ G-code that calls the custom macro of program number O9010
6051 _ G-code that calls the custom macro of program number O9011
------
------
6059 _ G-code that calls the custom macro of program number O9019
****************************************************
6071 _ M-Code that calls the subprogram of program number O9001
------
------
6079 _ M-Code that calls the subprogram of program number O9009
*****************************************************
6080 _ M-code that calls the custom macro of program number O9020
------
------
6089 _ M-code that calls the custom macro of program number O9029
*****************************************************

Not sure the wording in the manual is the best way to describe things, but my question is... what is the real difference in these "macros" or "subroutines" as they're described, other than some are called by G and others by M? I mean are there differences in what can be written in them or how they're used depending on who/how/what called them? Plus, I can see how you could call any one of these with an M98Pxxxx or a G65Pxxxx, because they sit in the directory like any other program. Know that I'm just getting started on Macro B, as I've just of late completely probed up the machine.

Any words of wisdom on this?

Thank you again for any help.

Dave
 
Many thanks Vancbiker. Nice to have at least one person with experience derived knowledge say it's okay. Can't wait to give it a shot.


6050 _ G-code that calls the custom macro of program number O9010
6051 _ G-code that calls the custom macro of program number O9011
------
------
6059 _ G-code that calls the custom macro of program number O9019
****************************************************
6071 _ M-Code that calls the subprogram of program number O9001
------
------
6079 _ M-Code that calls the subprogram of program number O9009
*****************************************************
6080 _ M-code that calls the custom macro of program number O9020
------
------
6089 _ M-code that calls the custom macro of program number O9029
*****************************************************

Hello Dave,
When a G or M Code is registered in parameters 6050 to 6059 and 6080 to 6089 respectively, Arguments can be passed to the Macro Program being Called. For example, if the number 6 were to be registered in parameter 6080 (Macro Program Registration parameter) and then the following Command Block executed:

M06 T10

the above Command is the same as G65 P9020 T10, wherein 10 will be passed to Local Variable #20 in the Macro Program O9020.

In the Macro Program O9020, the following Command Block would be included to execute the Tool Change:

T#20 M06

which is the same as writing T10 M06 (10 being passed to Local Variable #20)

If the number 6 were to be registered in parameter 6071(Subprogram Registration parameter) and the then the following Command Block executed:

T10 M6

the above Command is the same as M98 P9001, wherein 10 will NOT passed the Subprogram O9001.

In the Subprogram O9001, the following Command Block may be included to execute the Tool Change:


T#4120 M06

which is the same as writing T10 M06. #4120 is the System Variable for the Last T address executed and in the above example #4120 will hold the value 10.

To expand on Kevin's explanation regarding M codes executed within a Macro Program Called by a G, M, or T Code, all of these addresses will be treated as Normal G, M and T Codes. However, if a G, M, or T Code that has been registered as a Custom Macro Call Code and executed in a Macro Program called with G65, or G66, then from within the Macro, it will Call the Macro Program it was registered to Call.

Regards,

Bill
 
Bill's answer covered it. He knows an order of magnitude more about macro programming (and other things CNC) than me.

The SV50 is a really solid machine IME. The shop I retired from had 4 in the SV50/SV500 series. I never did much work on them as they were so darn reliable that the maintenance department very, very rarely had to do any repairs to them.
 
Hello Bill,

Thank you for what I'm sure is a perfect explanation and answer to my question(s). To be honest, right this minute the whole mess of it is floating right there over my head, which is where most things start that I delve into and then ultimately get a hold of. As I said, Macro stuff is very new to me. I'll print out your replies so I can re-read them until they sink in.

The off the top of my head response to your offering, is I can pass things (variables, what have you) to the two groups of parameters addressing "macros," but not to the 6071-6079 (O9001-O9009) addressing "subroutines." Don't hold this against me if it's wrong. Just my first impression.

Thanks again for the help kind sirs. I thought this was do-able. Now I know.

My limited experience with the SV-50 backs up your thoughts on it Vancbiker. It's also a race horse compared to what I was used to.

Dave
 
The off the top of my head response to your offering, is I can pass things (variables, what have you) to the two groups of parameters addressing "macros," but not to the 6071-6079 (O9001-O9009) addressing "subroutines." Don't hold this against me if it's wrong. Just my first impression.

Dave

Hello Dave,
Your first impressions are correct.

Kevin, AKA Vancbiker, is being humble; he knows a thing or three about all things CNC.

Regards,

Bill
 
Last edited:








 
Back
Top