Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Postbuilder -end-of-path- events

[ Edited ]

ootb post mill_5axis_actt_Sinumerik_840D_mm.

 

When you have a lot of operations in the same work plane the post cancels and sets the workplane commands (TRANS, CYCLE800 or TRAORI) in the Operation Start Sequence and Operation End Sequence between every operation.

I'm trying to change this so that when the tool axis is the same in the next operation, the cancel and restore is skipped.

In the Operation End Sequence I got a custom command checking the next rotary axis positions:

if { ![string match "$mom_out_angle_pos(0)" $mom_nxt_out_angle_pos(0)] && ![string match "$mom_out_angle_pos(1)" $mom_nxt_out_angle_pos(1)] } { # A and B angle for next move not equal to current

# So retract and cancel CYCLE800 } else { # A and B angle for next move is equal to current

# So no need to retract and cancel CYCLE800 }

 

 

The result is always next is equal to current. even when the next opetation has a different tool axis.

Why doesnt postbuilder find the next angle?

Is there another way of doing this?

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0
10 REPLIES

Re: Postbuilder -end-of-path- events

[ Edited ]

The variable mom_out_angle_pos is a tcl updated variable. The mom_pos(3) and mom_pos(4) are what NX manages. I am not sure what all sets mom_nxt_out_angle_pos - but I have tried using it (too) and not found it to be reliable (in whatever version I was working in at the time.)

 

I assume you did this which is required for NX to load the next variables:

 

set mom_kin_read_ahead_next_motion 1
MOM_reload_kinematics

 

Anyway - I do these things in the motion events - or in PB_CMD_before_motion.

NX10.03
Windows 7 Pro

Re: Postbuilder -end-of-path- events

Why not stay where you are at the end-of-path and go or stay to whatever position you need at the start-of-path? 

 

I would prefer losing time by going to a safe position in between these events, but I'm not in mass production. 

W10 NX11.0.1

Re: Postbuilder -end-of-path- events

@Study. mom_pos()makes no difference. I will look at the before_motion event tommorow and see of i can stuff it in there.
@jds. The retract to home is alright for a few times, but when you have a lot (100+) short operations in the Same plane, it adds up
Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0

Re: Postbuilder -end-of-path- events

Hi Patrick,

 

The variable I would expect to have an early view of the rotary position is mom_nxt_pos(3) and mom_nxt_pos(4) - these should be available if you flip the kin switch. Still they will not match (in correct alternate) the mom_out_angle_pos or (potentially) mom_nxt_out_angle_pos ones that (I think) are tcl managed.

 

Dan

NX10.03
Windows 7 Pro

Re: Postbuilder -end-of-path- events

Don't get it working. Keeps telling me the toolaxis is the same even though its changes in the next goto.
I tried to put it in the before_motion event, but then it goes trough on every move. I just want to check if the next operation has the same tool orientation as the current.
I'm giving up on this because when I'm able to determine this than I would need to skip most of the end-of-path events and most of the start-of-path events on the next operation. No way I'm gonna get this working. Smiley Sad
Thankx for all the tips.
Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.0

Re: Postbuilder -end-of-path- events

[ Edited ]

Hi Patrick,

 

You could do something like this in PB_CMD_before_motion

 

global mom_last_out_angle_pos mom_out_angle_pos

 

if {![info exists mom_last_out_angle_pos(0)] || ![EQ_is_eq $mom_last_out_angle_pos(0) $mom_out_angle_pos(0)]} {

  MOM_output_literal "CYCLE800 ...."

  set  mom_last_out_angle_pos(0) $mom_out_angle_pos(0)

}

 

Or you could compare to mom_prev_rot_ang_4th or mom_prev_out_angle_pos(0) which should be maintained.

 

Dan

 

 

NX10.03
Windows 7 Pro

Re: Postbuilder -end-of-path- events

I have never gotten the mom_nxt_* to work across operations (from one op "end of path" to next op "start of path" or "initial move" or whatever).

They don't even work WITHIN an operation, from "start of path" to "initial move"  (i.e. "start of path" mom_nxt_* is not set to the actual position the initial/first move event moves to)

I don't even think "tool change" event has mom_nxt_* set correctly (although not 100% sure either way).

 

All in all, mom_nxt_* is useless for what I try to use it for.

 

 

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: Postbuilder -end-of-path- events

Having a quick look in the mill_5axis_actt_Sinumerik_840D_mm post,

There is quite a lot of code dependant on udes, csys, operation type etc to automatically set output modes.

It would probably be best to check the status of the cycle800 variables instead of just tool axis.

variable to look at would include:

 

mom_siemens_coord_rotation
mom_siemens_5axis_mode
mom_siemens_5axis_output_mode

coord_ref_x
coord_ref_y
coord_ref_z
coord_ang_1
coord_ang_2
coord_ang_3

Solution
Solution
Accepted by topic author paehv
‎08-26-2015 04:32 AM

Re: Postbuilder -end-of-path- events

I solved this problem this way in the past:

 

Store mom_out_angle_pos at the end of every operation, you can also output spindle stop, coolant stop and so on if needed ( you can use mom_next_oper_has_tool_change  to check if next operation uses a different tool and  mom_current_oper_is_last_oper_in_program to check if the operation is at the end of the program). Do not output CYCLE800() at the end of operation (unless it is the last of program)

 

Check tool axis in initial move / first move event of the next operation (before initial/first move you cannot know if axis has changed)

tip: use  [ EQ_is_equal $mom_out_angle_pos(0) $stored_out_angle_pos(0) ]  to check if mom_out_angle_pos has changed because confronting strings with string match will result false also for  a 0.0000000000001 change. 

if tool axis is different from saved one,  retract and close CYCLE800() and do everything you need before [ tool change if initial move ] and setting new CYCLE800 if needed

 

regards

luciano

Learn online





Solution Information