cancel
Showing results for 
Search instead for 
Did you mean: 

Rotation order CYCLE800 in postbuilder

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

For a new 5-axis machine (840D SL) I need postbuilder to calculate the workplane rotation for CYCLE800 in the order Y,X,Z

 

ootb post: mill_5axis_actt_Sinumerik_840D_mm

Proc PB_CMD_auto_3D_rotation calculates the rotations in order X,Y,Z

Proc PB_CMD_output_coord_rotation outputs CYCLE800 with mode 57

 

What I need is:

Rotation calculated in order Y,X,Z (mode 54 in CYCLE800)

 

The math behind PB_CMD_auto_3D_rotation is above my knowledge.

Can anyone advise...

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1
1 REPLY

Re: Rotation order CYCLE800 in postbuilder

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Anyone...

 

How to change the calculation order XYZ to YXZ

(I noticed that in the new post configurator you can select this order, so the math behind it is availible)

 

 # Calculate euler angles , rotation order is X->Y->Z
    if {[info exists rotation_matrix]} {
    set m0 $rotation_matrix(0)
    set m1 $rotation_matrix(1)
    set m2 $rotation_matrix(2)
    set m3 $rotation_matrix(3)
    set m4 $rotation_matrix(4)
    set m5 $rotation_matrix(5)
    set m6 $rotation_matrix(6)
    set m7 $rotation_matrix(7)
    set m8 $rotation_matrix(8)

    set cos_b_sq [expr $m0*$m0 + $m3*$m3]

    if {[EQ_is_equal $cos_b_sq 0.0]} {

      set cos_b 0.0
      set cos_c 1.0
      set cos_a $m4
      set sin_c 0.0
      set sin_a [expr -1*$m5]

      if {$m6 < 0.0} {
         set sin_b 1.0
      } else {
         set sin_b -1.0
      }

    } else {

      set cos_b [expr sqrt($cos_b_sq)]
      set sin_b [expr -$m6]

      set cos_a [expr $m8/$cos_b]
      set sin_a [expr $m7/$cos_b]

      set cos_c [expr $m0/$cos_b]
      set sin_c [expr $m3/$cos_b]

    }

    set coord_ang_A [expr -atan2($sin_a,$cos_a)*$RAD2DEG]
    set coord_ang_B [expr -atan2($sin_b,$cos_b)*$RAD2DEG]
    set coord_ang_C [expr -atan2($sin_c,$cos_c)*$RAD2DEG]

 }
Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1

Learn online





Solution Information