cancel
Showing results for 
Search instead for 
Did you mean: 

post builder - output condition - custom for type of linear moves

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

Hello everyone,


I have some question about output condition.
Trying to make some little bit upgrade for my 5 axis postprocess (gantry HH BC type).
Post is very good, working nice but I want to change something for better readability.
For example what Iam trying to do - separate code only with linear moves (G01) in two different types:

If 3 axis move > do move like below (Forced coordinates):

G01 X10. Y5.1 Z0.1
G01 X10. Y5.2 Z0.2
G01 X10. Y5.3 Z0.3
......


If 5 axis move > do move like below (Forced coordinates):

G01 X10. Y5.1 Z0.1 B10.1 C90.
G01 X10. Y5.2 Z0.2 B10.2 C90.
G01 X10. Y5.3 Z0.3 B10.3 C90.
......


I create double template blocks of linear moves (as attachment) - trying to activate one of them with PB_CMD_check_block custom, but I recieved mom error.

 

Trying just to handle with part of syntax:

 

#   1 : Output BLOCK
#   0 : No output

global $mom_out_angle_pos(0)

global $mom_out_angle_pos(1)

if {![string compare $mom_out_angle_pos "MOVE"]}

MOM_do_template Linear_move_5Ax
} else {return 1}
} else {return 0}


Could you have some idea how to write proper custom in easiest way ?

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

And next question - off topic a little..  
Something bad happened with machining creator - I have at now new release: NX10.0.3.5
When Iam trying to edit or add new axis to component in to machine navigator I always recieve Internal error ..
Have somebody get simillar issue on new patch?
In older NX (10.0) there was no such situation like this.

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

Re: post builder - output condition - custom for type of linear moves

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

Ok,

I solve the proble in another way by custom command direct in linear moves - i forget to type $mom_prev_out_angle_pos Smiley Happy

 

I made syntax as belov :

 

global mom_sys_linear_code
global mom_pos
global mom_out_angle_pos mom_prev_out_angle_pos

set x [format {%0.2f} $mom_pos(0)]
set y [format {%0.2f} $mom_pos(1)]
set z [format {%0.2f} $mom_pos(2)]
set b [format {%0.2f} $mom_out_angle_pos(1)]
set c [format {%0.2f} $mom_out_angle_pos(0)]

if {$mom_prev_out_angle_pos(0) == $mom_out_angle_pos(0) & $mom_prev_out_angle_pos(1) == $mom_out_angle_pos(1) } {
MOM_output_literal "G01 X$x Y$y Z$z"
} else {
MOM_output_literal "G01 X$x Y$y Z$z B$b C$c"
}

 

Now I have a code as I wanted (3axis or 5axis) - I will try to connect this to MOM_blocks to get better format of coordinates.

 

=====

About machine creator in NX >> still I can not figure out why after edit AXIS in machine navigator I get internal error.

In NX 9.0 is working as NX 10.0 before...

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

Re: post builder - output condition - custom for type of linear moves

Esteemed Contributor
Esteemed Contributor

Another possible solution (saves you doing the formatting)

global mom_sys_linear_code
global mom_pos
global mom_out_angle_pos mom_prev_out_angle_pos


if {$mom_prev_out_angle_pos(0) == $mom_out_angle_pos(0) & $mom_prev_out_angle_pos(1) == $mom_out_angle_pos(1) } {
MOM_force once X Y Z
} else {
MOM_force once X Y Z fourth_axis fifth_axis
}
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: post builder - output condition - custom for type of linear moves

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

Thx Smiley Happy

I modified this with templates which puts non constant feed rate :

 

global mom_sys_linear_code
global mom_pos
global mom_out_angle_pos mom_prev_out_angle_pos

 

if {$mom_prev_out_angle_pos(0) == $mom_out_angle_pos(0) & $mom_prev_out_angle_pos(1) == $mom_out_angle_pos(1) } {
MOM_force once G_motion X Y Z
MOM_do_template ugs_lin_move_3ax
} else {
MOM_force once G_motion X Y Z fifth_axis fourth_axis
MOM_do_template ugs_lin_move_5ax
}

 

 

Now I must recognize what happened with machine creator in NX10.0...

Still getting intern error when I try to create or edit AXIS... Picture in attachment

Else I will back to work on NX9.0

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

Learn online





Solution Information