cancel
Showing results for 
Search instead for 
Did you mean: 

Switching kinematics issue

Phenom
Phenom

hello,

 

I switch kinematics by reseting kinematics values and MOM_reload_kinematics to AC (A 45 deg head)

- > A and C values are OK but calculated spatial angles are wrong, zeroes. SPA0 SPB0 SPC0

 

Or - when I set axis vector (4th ax vec 101) in general page of Postbuilder, it works , but after setting it manually and reloading kinematics in CMD, in start operation sequence,   it doesnt work.

 ------------------------------------------

 I looked deeper :

Matrix calculation,

I have this variables:

X Z Y (array) , and values are already set.

global rotation_matrix

 

x0 -3.0616169978683826e-016 x1 -1.0 x2 2.0 
y0 -1.0 y1 6.1232339957367648e-017 y2 -1.2246467991473532e-016
y0 -2.4492935982947059e-016 z1 -2.0 z2 1.0

 ok.

after  MTX3_init_x_y_z X Y Z rotation_matrix

just make roation_matrix an array.

 

and I get in rotation_matrix array this:

62 R 1.0 0.0 0.0
63 R 0.0 1.0 0.0
64 R 0.0 0.0 1.0

 wrong. why?

because sometimes I get xyz values to rotation_matrix values correct and calculation of spatial angels is succes.

 

If I use XYZ arrays into spatial angles calculation directly - angles are calculated, but strange/wrong...

rotation_matrix array failed , when I bypass it, spatial angles calculation also failed.

 

Any Idea?

Where can be problem? In switching kinematics or in base of calculations?

Thank you

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #
8 REPLIES

Re: Switching kinematics issue

Phenom
Phenom

As far as NX sending valid positions after a switch of kinematics - I believe it does not happen until the next "MOM_msys" event is sent from NX (at least it used to be the case.) For this reason - "Head" ude's had to be placed on a parent object to an operation. At some point along the way - a lot more MOM_msys's started being issued - maybe at the start of every operation. Timing to changing kinematics had some problems to overcome at one time - maybe they are not an issue lately. Another possibility is that NX does not see a valid solution after the change and is not making that obvious. NX will not put anything reliable in the variables when that happens.

NX10.03
Windows 7 Pro

Re: Switching kinematics issue

Phenom
Phenom

Also - I am not familiar with the Heidenhain (is it) post code OTB - but if it is using MTX3 math functions it may not have any relevance to change kinematics. Either NX is giving you positions or you are calculating them yourself - and if so - may use some of the math funtions (like the MTX3 matrix ones) to do so. Heads with 45 degree may require a machine model to communicate that for NX to make a valid calculation. I remember that at one time a kinematic variable driven solution (mom_kin vars) was only possible with an "Advanced Kinematics" license. If instead vector based programming approach is used - the post doesn't need to know much. I am trying to determine how I will do one now.

NX10.03
Windows 7 Pro

Re: Switching kinematics issue

Phenom
Phenom

Thanky you for reply.

 

this is output after switching kinematics:

38 L  A-180 C+270 FMAX --- OK  
PLANE SPATIAL SPA+0 SP+0 SPC+0 TURN FMAX SEQ- TABLE ROT  __WRONG

 

 this is kinematic set in PB general tab:

38 L  A-180 C+270 FMAX --- OK  
PLANE SPATIAL SPA+0 SPB-90 SPC+90 TURN FMAX SEQ- TABLE ROT OK

 

And I finally get it!!!

The same inputs into spatial angles calculation... ?? ....NO Smiley Happy

 

When you set in PB general tab 4th ax vec like 101 (other),

internaly it is =0.70710678118654746, 0, 0.70710678118654746

But I switched kinematics in CMD this way - set 4th ax vec to 1 0 1 - wrong.

 

Now I switched kinematics with  0.70710678118654746, 0, 0.70710678118654746

and it finally works.  Smiley Very Happy

 

 

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: Switching kinematics issue

Esteemed Contributor
Esteemed Contributor

You need to use the unit vector, vector with length 1 unit, I think there is a MOM function that returns the unit vector.

See "%UGII_BASE_DIR%\MACH\resource\postprocessor\ugpost_base_math.tcl" for a list of available functions.

VEC3_init 1 0 1 myVector
VEC3_unitize myVector unitVector
VEC3_is_equal unitVector mom_...
Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Switching kinematics issue

Phenom
Phenom

yes, I agree,

 set myvector(0)                "1"
set myvector(1)                "0.0"
set myvector(2)                "1"
VEC3_unitize myvector mom_kin_4th_axis_vector

works.

For example I know this functions and where they are because I saw them in use and after years I found them.

But how do people now know that these function exist in NX and where to find them?

 

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: Switching kinematics issue

Esteemed Contributor
Esteemed Contributor

Juraj wrote:

For example I know this functions and where they are because I saw them in use and after years I found them.

But how do people now know that these function exist in NX and where to find them?


 See the NX documentation Smiley Wink

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Switching kinematics issue

Phenom
Phenom

thanks, I was trying "VEC" to search but without succes for CAM and forget to tried *VEC*.

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: Switching kinematics issue

Esteemed Contributor
Esteemed Contributor

I searched for VEC3_, since Solr doesn't need wild-cards Smiley Wink

In generally anyone creating posts should attend a post-processor training, since usually there is a trainer with experience.

In addition one should read the entire documentation about PB and lately of PC too.

A good post-processor development tool should not force one to do a huge amount of fine tuning of the post-processor after its creation.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Learn online





Solution Information