Originally Posted by
Faust
Good day, everyone.
I have a question that relates to Fanuc 18i/180i-Tb controllers. But I have to explain what I'm doing first.
I have some Fuji ANW-30/3000/3500 machining centres. They run on Fanuc 18i/180i/0i b-Series controllers.
I have written a custom M-code, M123, to monitor the the spindle load during a second's worth of cutting, and then I compare the value to a threshold value stored in a Data structure. If the value is below the threshold, then I know the cutter is broken/not installed, and I send out a fault message. This rudimentary current-monitoring system uses a lot of new ladder that I put into the system, and I use the WINDR function to read the threshold value from the data blocks, various compares, timers, Difus and other structures to accomplish the task.
The problem is that I can only set a single threshold value. I use it for a grooving operation. However, I would like to use it for two different grooves, which cut through different parts of the part, and have greatly different load values. To this end, I'd like to be able to do the following:
Either a.) Send a threshold value to use with the M-code, like sending an argument in a normal-programming-language function call. I don't know if this is possible, is it? I can't, say, send a command like M123<threshold value> can I?
b.) Find a way to use a different M-Code (Maybe? Maybe something else?) that could pull a different threshold value yet use 95% of the same logic, so I wouldn't have to rewrite or expand everything so much.
c.) Find a way to write different values into the data blocks from the NC, just before I call M123. I've heard that I can't write data blocks like a can with macro values. For example, the data blocks aren't just #xxxx values, so I can't just say "#xxxx=<threshold value>", right? Is there any way, though, to write new values to the data blocks, OR to just pull the threshold data from macro variables?
I know this may sound like a confusing question, but I'm basically trying to assert dynamic input control over what amounts to a hard-coded, ladder logic-based subroutine.
In case you're wondering "Why doesn't he just use a macro program?", the answer is I need this thing running in parallel with the machining itself, so I can't just stop the machining to wait for the cutting monitoring routine to finish; that'd be pointless.
Thanks to anyone that can help!