Cancel
Showing results for 
Search instead for 
Did you mean: 

Look Ahead Function

Genius
Genius

I need to output "look ahead" code at the beginning and end of each milling operation.

At the beginning it has to happen right after the first Z move.  At the end right after last Z move.

What's the easiest way to sort out and eliminate everything but milling ops?  Would checking for Canned cycles only work?  What other operation type could cause issues?

I'm thinking checking for:

 

if { [info exists mom_cycle_type] }  do nothing otherwise output my "look ahead" codes.

but right after first Z move only...?

 

Jerry

NX10.0.3

 

 

 

 

2 REPLIES 2

Re: Look Ahead Function

Siemens Legend Siemens Legend
Siemens Legend

@jerry-m

 

You could consider the code if that is enough to check if you want to perform a kiind of action. 

Make sure that you unset the mom variable at the end of the operation with something like:

global mom_cycle_type
catch {unset mom_cycle_type}

MOM by default does not unset variables that are not used anymore. 

Regards,

Gerrit Koelewijn

Re: Look Ahead Function

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Are you talking about high speed machining parameters (G5 P, etc.?) on the control?

 

I would write a proc to examine mom_operation_type (and if needed to figure out 3 vs 5 axis operations) mom_tool_axis_type and mom_tool_path_type, and set a global variable a more useful/limited set of choices (e.g. "TURN", "DRILL", "2.5AXIS_MILL", "FASC", VASC", "PROBE", or whatever).

 

Create a test part with "every" operation type you use, examine the above variables for each operation, so you can determine logic.

 

Add the proc to "start of path" event (so it is run EVERY operation) then use the results later to output (or not) the codes you need.

Note you might want to add a UDE to specify which codes you want (e.g. on a Mazak, you could specify one or more of G6x, G5, and M82x)

 

Partial example code:

global mom_operation_type
global mom_operation_name

if {![info exists mom_operation_type]} {
	MOM_output_to_listing_device "$mom_operation_name: ERROR - mom_operation_type not yet set?!"
} elseif {[string match "Point to Point" $mom_operation_type] ||
	  [string match "Hole Making" $mom_operation_type]  ||
	  [string match "Drilling" $mom_operation_type]} {
	return "DRILL"
}
...
Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Learn online





Solution Information