Cancel
Showing results for 
Search instead for 
Did you mean: 

MOM_convert_point - does anyone know how to use?

PLM World Member Creator PLM World Member Creator
PLM World Member Creator

Trying to use the MOM_convert_point in NX11.  Once I execute the command, I was expecting an array called mom_post_result to be used.  I am not getting it.  Please let me what I am doing wrong or what else to try.  I am not getting any errors when I post.

 

Here is the code I am using for a test.

 

global mom_post_result mom_post_result1
global p_Array v_Array

set p_Array(0) 5.0
set p_Array(1) 5.0
set p_Array(2) 5.0
set v_Array(0) 0.0
set v_Array(1) 1.0
set v_Array(2) 1.0

if { [ array exists p_Array ] } {
   MOM_output_text  "YES. array p_Array exists"
} else {
   MOM_output_text  "NO. array p_Array does not exist"
}
if { [ array exists v_Array ] } {
   MOM_output_text  "YES. array v_Array exists"
} else {
   MOM_output_text  "NO. array v_Array does not exist"
}

# here is the command to convert

MOM_convert_point p_Array v_Array  

# after the command I was expecting the array mom_post_result to be filled

if { [ array exists mom_post_result ] } {
   MOM_output_text  "YES. array mom_post_result exists"
} else {
   MOM_output_text  "NO. array mom_post_result does not exist"
}

 

this is what the posted data looks like....N0090 G91 G28 Z0.0
:0100 T16 M06
N0110 S165 M03
YES. array p_Array exists
YES. array v_Array exists
NO. array mom_post_result does not exist
N0120 G0 G90 X-4.5571 Y0.0 A0.0 B0.0
N0130 G43 Z4. H16 M08
N0140 X-4.8102 B30.
N0150 Z-.7826
N0160 G1 X-4.8103 Z-2.5826 F50.
N0170 G83 X-4.8103 Y0.0 Z-13.6346 R-2.5826 F1.5 Q.3
N0180 G80
N0190 G1 X-4.8102 Z-.7826 F50.
N0200 G0 Z4.
N0210 X-4.5571 B0.0
N0220 M02

 

 

3 REPLIES

Re: MOM_convert_point - does anyone know how to use?

PLM World Member Creator PLM World Member Creator
PLM World Member Creator

I did some more testing using the review tool.  it looks like there are two lists created. 

mom_result and mom_result1. 

 

Documentation on MOM_convert_point does state them as lists instead of array.  just need to get rid of the "post_"

"Converts a point from a tool path position to an MCS position in machine tool coordinates. <point> and <vector> are Tcl arrays of 3. Returns pimary and alternate solutions as Tcl lists of X, Y, Z, 4th, 5th in the variables mom_post_result for the primary and mom_post_result1 for the alternate. "

 

 

Re: MOM_convert_point - does anyone know how to use?

Phenom
Phenom

I used it once - it seemed to work ok.

 

Ex:

 

# set kinematics as desired

set pt(0) $mom_mcs_goto(0)
set pt(1) $mom_mcs_goto(1)
set pt(2) $mom_mcs_goto(2)

MOM_convert_point pt tax

set mom_pos(0) [lrange $mom_result 0 0]
set mom_pos(1) [lrange $mom_result 1 1]
set mom_pos(2) [lrange $mom_result 2 2]
set mom_out_angle_pos(1) [expr 0+[lrange $mom_result 3 3]]
set mom_out_angle_pos(2) [expr 0+[lrange $mom_result 4 4]]
NX12.02
Windows 10 Pro

Re: MOM_convert_point - does anyone know how to use?

Phenom
Phenom
tax was an array for the tool vector
NX12.02
Windows 10 Pro

Learn online





Solution Information