cancel
Showing results for 
Search instead for 
Did you mean: 

PB proc - repeated $feed from NX in ENGAGE

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Hello,

 

I try to receive feedback syntax of repeated feed in ENGAGE motion mode, but only when there is command M08. I wrote such a procedure here, but ..

==============================

#  This code add repeated F value, when M08 occurs

#  mom_sys_coolant_code(ON) = 8 value
global feed
global mom_sys_coolant_code
set FF $feed
set CC M0$mom_sys_coolant_code(ON)
if {[string match "X" $CC]} {
MOM_output_literal ""
} elseif {[string match "M08" $CC]} {
MOM_output_literal " F$feed "

}

==============================

Custom command is added to a group of linear motion
Trying to disabe variable as unset FF but nothing happened.

It works in a loop - feed occurs at every step line G01 only in ENGAGE mode - as below:

==============================

; Operation: PLANAR_PROFILE
; Toll change ready
; Tool NUM  : 02  
; Diameter   : 20.000
; Lengh       : 75.000
T="MILL20"
M06
; Initial Move
G00 X6.275 Y-2.543 S1592 M03
G00 Z50.
; Approach Move
G00 Z2.
; Engage Move
G01 X8.213 Y-1.145 Z1.979 M08 F400.

F400.
G01 X10.367 Y-.066 Z1.958

F400.
G01 X12.666 Y.656 Z1.937

F400.
......

==============================

Next operation (cavity mill) , if same Feed as begining then I get standard output:

 

; Engage Move
G01 X8.213 Y-1.145 Z1.979 M08 (; without feed F400.)

 

I understand that this is part of a block template.

If it is possible - just I want to output once this repeated Feed after M08

something like this:

 

; Next operation Cavity mill

; Engage Move
G01 X8.213 Y-1.145 Z1.979 M08 F400.

G01 X10.367 Y-.066 Z1.958

G01 X12.666 Y.656 Z1.937

......

; Next operation Streamline

; Engage Move
G01 X8.213 Y-1.145 Z1.979 M08 F400.

G01 X10.367 Y-.066 Z1.958

G01 X12.666 Y.656 Z1.937

......

 

Seemingly simple task - but it does not come out well Smiley Happy

Best regards

 

========================================
Engineering >> NX10.0 Performance in the making
4 REPLIES

Re: PB proc - repeated $feed from NX in ENGAGE

Esteemed Contributor
Esteemed Contributor

1) Find the procs (PB_CMD_...) in tool change or start of path that do "MOM_force once "

Add "F" to the list.

e.g.

"MOM_force once X Y Z F"

 

2) You can write your own custom command.

Add it to linear move event

In it do something like

global mom_motion_type
if {[info exists mom_motion_type] &&
	$mom_motion_type == "ENGAGE"} {
	MOM_force once F
}

 

3) Much harder

another custom command

Try doing a "MOM_do_template name CREATE" or "MOM_do_template name BUFFER"

replace "name" with the block name for your linear move block (possibly "linear_move")

*I think* one of the (CREATE or BUFFER)  will still allow the block to be output, but the returned sting can be parsed for "M8" and (if found) you can then do the "MOM_force once"

 

4) There may be other ways.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: PB proc - repeated $feed from NX in ENGAGE

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Hi Ken,

Thank You for helpful reply - the second option is good, I like custom commands.

 

Force command and templates are known to me and I use it frequently in my procedures.

But I prefer it the hard way, and I use only the scripts procedures.

 

I tried to put F only once in engage series , so after all I made this proc:

 

global mom_motion_type
global mom_last_pos
global mom_pos
global mom_sys_coolant_code

set CC M0$mom_sys_coolant_code(ON)

if {[info exists mom_motion_type]
&& $mom_motion_type == "ENGAGE"
&& $mom_last_pos(0) == $mom_pos(0)
&& [string match "M08" $CC]} {
MOM_force once F
}

 

It works better at now but it hard with $CC command because M08 is a string witch exist as "invisible" output in the rest of block numers of ENGAGE series - thats why I focused on mom_positions variables to disable occuring constant feed.

 

Result of my work by this proc:

 

N18 ; Initial Move

N19 G00 X118. Y-20.755 S1114 M03

N20 G00 Z50.

N21 ; Approach Move

N22 G00 Z1.658

N23 ; Engage Move

N24 G01 X118. Y-20.755 Z-1.342 M08 F400.

N25 G01 X102. Y-20.755 Z-1.342

N26 ; Cutting Move

N27 G01 X88.558 Y-20.755 Z-1.342

N28 G02 X87.87 Y-20.785 Z-1.342 I-.782 J10.038

N29 G01 X12.13 Y-20.785 Z-1.342

N30 G02 X11.442 Y-20.755 Z-1.342 I.094 J10.068

N31 G01 X-2. Y-20.755 Z-1.342

N32 ; Retract Move

N33 G01 X-18. Y-20.755 Z-1.342

N34 G01 X-18. Y-20.755 Z1.658

N35 ; Departure Move

N36 G00 Z50.

N37 G00 X118. Y-23.384

N38 ; Approach Move

N39 G00 Z.14

N40 ; Engage Move

N41 G01 X118. Y-23.384 Z-2.86 F400.

N42 G01 X102. Y-23.384 Z-2.86

..... till next operation

 

F is forced but it apeears only as engage as first block - good enough for me.

 

Best regards

 

 

========================================
Engineering >> NX10.0 Performance in the making

Re: PB proc - repeated $feed from NX in ENGAGE

Esteemed Contributor
Esteemed Contributor

If the issue is you only wantt his once per operation (only on the very first engage move):

 

global mom_motion_type
global cam_explorer_f_already_forced
global mom_operation_name
if {[info exists mom_motion_type] &&
	$mom_motion_type == "ENGAGE"} {
	if {![info exists cam_explorer_f_already_forced($mom_operation_name)]} {
		MOM_force once F
		set  cam_explorer_f_already_forced($mom_operation_name) 1
	}
}
Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: PB proc - repeated $feed from NX in ENGAGE

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Thank You Ken for the tip - perfect custom, it works

========================================
Engineering >> NX10.0 Performance in the making

Learn online





Solution Information