Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Glenn -

Be careful with what you did.

If a tool is going UP in Z, with no tool change (and rapid moves have "work plane change" set), you could end up with the wrong move.

Say an operation ends at Z5.

If the next operation starts at Z8, you will get "XY then Z" instead of the desired "Z then XY" (as you reset the prior position in Z to 25, the post thinks it is going down, instead of up)...

** EDIT**

NOTE: This is also a bug in new posts created in Post Builder (at least up thru PB10.0.3) - The supplied PB_CMD_fix_RAPID_SET (look for the variable "is_first_move") resets mom_last_pos to the tool change position in a first move event, when it should not.

 

VH - what I omitted in mine, is that *in the case a tool change will happen*, I also reset the prev/last pos in Z (and if desired, X & Y) to "large" values.  To force correct motion out. (as *typically* the tool change position is near the upper limits of the Z axis travel)

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


Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Legend
Legend

@Ken_A

 

To work around that I have my own XY positioning, and then Z. 

 

I check for any rotations and force output a retract move. I never liked the way it would output Z first if the next operation was above the previous. It required a lot of finagling to make sure your clearance was high enough to clear the rotating part. The way I do it now I just make sure the path clears the part and I will get a full retract on any angle change. 

 

 

check angle.PNGxyz in prog.PNG
xy rapid.PNG

z rapid.PNG

Glenn Balon
Production: NX 12.0.2 MP5 Primarily CAM

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Valued Contributor
Valued Contributor

And what works for us is shown below, used at the very end of "Operation End".

Tests so far look good with Auto Clamping, but we have already extensively worked clamping. I agree OOTB not so reliable.   We track with our own variables what the rotary value was at clamp time and then decide to unclamp/clamp accordingly as needed. 

 

MOM_reload_variable is needed.

 

global mom_pos mom_prev_pos mom_out_angle_pos mom_prev_out_angle_pos mom_prev_rot_ang_5th

  set mom_pos(4) 0.0
  set mom_prev_pos(4) 0.0
  set mom_out_angle_pos(1) 0.0
  set mom_prev_out_angle_pos(1) 0.0
  set mom_prev_rot_ang_5th 0.0
  MOM_reload_variable -a mom_pos
  MOM_reload_variable -a mom_prev_pos
  MOM_reload_variable -a mom_out_angle_pos
  MOM_reload_variable -a mom_prev_out_angle_pos

#end of proc PB_CMD_rtn_set_rotary_0

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Legend
Legend

What you need can be done in a very simple way.

 

Just set the mom variable "mom_kin_rotary_axis_method" from PREVIOUS to ZERO

  set mom_kin_rotary_axis_method                "ZERO"

 

It should be defined anywhere in your .tcl File(s)

 

Regards

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Valued Contributor
Valued Contributor

After further testing of the solutions. 

I tested the listed solutions, of the ones that worked I found that there are multiple ways to do this, but they have a common core solution and problem.  Fundamentally the fifth axis previous position is reset to cause the operation start move to output the fifth axis as close to "0" as possible.  At IJK 001 that would be "0"  The problem is Auto Clamp gets confused.   With Auto Clamp enabled, even when there is no rotation change from one operation to the next,  Fifth axis unclamp/clamp is output. 

 

Example B90C90 and the next operation is B90C90,  the fifth axis unclamp/clamp commands are output.

 

By reseting the prev rotary position, Auto Clamp thinks there is a rotational difference and outputs unclamp/clamp commands around the first move of the operation.  

 

However the block generator is smart enough not to repeat the fifth axis value on the first move.  From the above example  when operation 1 moves to B90C90, Operation 2 does not repeat the current B/C on the first move.

 

Repetative unclamp/clamp will not be acceptable in our shop.   Takes time and wears the clamping defice.  Still working the final solution.

 

For future reference I think cloning the function of the Rotate UDE was the easiest way to do this. Either at the Operation End or Operation Start, Start of Path area this snippet could be added. .

# Key parameters set in UDE -
#   mom_rotate_axis_type        :  [ AAXIS | BAXIS   | CAXIS    | HEAD | TABLE | FOURTH_AXIS | FIFTH_AXIS ]
#   mom_rotation_mode           :  [ NONE  | ATANGLE | ABSOLUTE | INCREMENTAL ]
#   mom_rotation_direction      :  [ NONE  | CLW     | CCLW ]
#   mom_rotation_angle          :  Specified angle
#   mom_rotation_reference_mode :  [ ON    | OFF ]

global  mom_rotate_axis_type mom_rotation_mode mom_rotation_direction mom_rotation_angle
global mom_rotation_reference_mode

set mom_rotate_axis_type "FIFTH_AXIS"
set mom_rotation_mode "ABSOLUTE"
set mom_rotation_direction "NONE"
set mom_rotation_angle 0
set mom_rotation_reference_mode "ON"

MOM_rotate

 

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Valued Contributor
Valued Contributor

Final summary of the fix.

1.  The code I posted above is put at the very end of Operation End Sequence in the Postbuilder structure.  For Table Table machines.  This is to allow the Programmer to still be able to use the ROTATE, 5th_AXIS... UDE at operation start if needed.  

2.  5th axis positions at operation start will now be between -180.000 to +179.999.   This changes 5th axis windup.  The programmer can predict what the angle will be at operation start and too much rotary movement can be controlled by how operations are ordered, as always.  A little different order now in some cases.

3.  We added a UDE to enable/disable the code.   When doing rotary axis involved cutting, you may not want to reset 5th axis end location at the end of each operation. 

4.  It can confuse Auto clamping of the 5th axis  Extra unclamp/clamp fifth axis commands are output when there is no rotation change between operations.  In the PB_CMD_clamp_fifth_axis and PB_CMD_unclamp_fifth_axis we added checks to make sure the 5th axis was at a new position compared to the position when last clamped, before outputting the unclamp command and Clamp output only  if in "unclamp" state.  We added tracking variables for this as needed.

 

 This will work until Siemens gives us more control of the 5th axis for IJK 001 at operation start. 

Re: Does anyone know how to:Make 5 axis output at start of operation always be B0, C0 with IJK 001?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

@VH

 

In case you want to go hunting...

One thing I've noticed in the Siemens PB code is that (sometimes) they use mom_pos and mom_prev_pos instead of mom_out_angle_pos and mom_prev_out_angle_pos to see if rotary axes have/are changing.

I have encountered times where they (mom*pos and mom*out_angle_pos) are different (mom_prev_out_angle_pos has the correct value, vs. mom_prev_pos).

 

E.g. in "proc AUTO_CLAMP"

 

 

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


NX CAM Postprocessor Group
NX CAM Postprocessor Group

Members (189)