Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Posting error when using a post processor that has been converted from NX10 to NX12

Valued Contributor
Valued Contributor

Hi all, 

 

Before I raise a call with GTAC I thought i'd post this here to see if anybody has had the same issue or similar. 

 

I have created a simple CAM program with a few operations for the purpose of testing NX12. I then opened one of our post processors (created in NX10) in NX12 postbuilder and did a save-as without making any changes. 

 

When posting my simple program in NX12 with the NX12 version of the post processor I then get the following error (its fine when posting using the NX10 post processor)....

Error message.JPG

 

This error looks like this in the log file....

 

***TCL_ERROR***: Event Handler: Z:\Standalone_Test_Parts\NX10_CAM_prog\NX12_postbuilder\PGUEST_nx12.tcl, Event: MOM_initial_move, Error: can't use non-numeric string as operand of "-"
while executing
"expr { abs($s - $t) <= $tol }"
(procedure "EQ_is_equal" line 2)
invoked from within
"EQ_is_equal abs($rshaw_Rots(1)) 360.0"
(procedure "PB_CMD_OUTPUT_rotations" line 28)
invoked from within
"PB_CMD_OUTPUT_rotations"
(procedure "MOM_initial_move" line 12)
invoked from within

 

As far as i can tell the value of 's' or 't' must be non-numeric but i dont know what the values are, how they are populated or why all of a sudden there is an issue after its saved in NX12 PB. 

 

The code causing the error exists in the "ugpost_base_math.tcl" file in MACH > resource > postprocessor. I'm assuming this file is called by all post processors and the specific area within this file seems to be the same in both NX10 and NX12 installs.

 

May well be something obvious but im not hugely experienced with the post processing side of NX. Any help would be greatly appreciated.

 

Thanks,

Adam 

13 REPLIES 13

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

What MR / MPs have you installed?

I.e. is this "base" NX12?

Or NX12.0.1?

or NX12.0.2?

 

If you do

- File -> Help -> Log file

- scroll down a little bit (just after the "********* License Session Information *****" section)

 

You should see a line that looks somewhat like this (depending on version):

NX 12.0.2.9 MP3, 16Oct18.  See Maintenance Pack letter for detailed list of fixes.

 

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: Posting error when using a post processor that has been converted from NX10 to NX12

Valued Contributor
Valued Contributor

Hi @Ken_A , apologies i forgot to say....

 

NX 12.0.2.9 MP3

 

Admittedly I havent gone backwards to test prior MR / MP's as of yet. 

 

Thanks,

Adam 

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

hi,

just show tcl code you made in PB_CMD_OUTPUT_rotations

Problem coudl be in your code.

I have never get such error.

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

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Valued Contributor
Valued Contributor

Hi @Juraj ,

 

My code is as follows... like i said though, this was exactly the same and worked fine in NX10. This isn't my post, I have inherited it so im probably not as familiar with it as I could be.

 

#=============================================================
proc PB_CMD_OUTPUT_rotations { } {
#=============================================================
# TM. Proc designed to check mom var settings and own angle settings

global mom_init_pos
global mom_init_alt_pos
global mom_out_angle_pos
global mom_prev_out_angle_pos
global rs_Rots
global mom_kin_coordinate_system_type

if { $mom_kin_coordinate_system_type == "CSYS" } {
if {[info exists mom_init_pos ] && $mom_init_pos(3) > 0.0 } {

set rs_Rots(0) [expr $mom_init_pos(3) - 360.0]
set rs_Rots(1) [expr $mom_init_pos(4) - 360.0]
if { [EQ_is_equal abs($rs_Rots(1)) 360.0] } {
set rs_Rots(1) 0.0
}
}

} elseif { $mom_kin_coordinate_system_type == "LOCAL" } {

if {[info exists mom_out_angle_pos ] } {

set rs_Rots(0) $mom_out_angle_pos(0)
set rs_Rots(1) $mom_out_angle_pos(1)
if { [EQ_is_equal abs($rs_Rots(1)) 360.0] } {
set rs_Rots(1) 0.0
}
}
}

MOM_force Once G_motion fourth_axis fifth_axis


}

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi

I see this

wrong:

if { [EQ_is_equal abs($rs_Rots(1)) 360.0] } { 

correct:

if { [EQ_is_equal [expr abs($rs_Rots(1))] 360.0] } {

 

forget if it is working in NX10..

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

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Valued Contributor
Valued Contributor

Hi @Juraj

 

Thanks for picking that up, I have tried it but makes no difference.

 

I believe the issue must be related to the value of 's' or 't' when the following procedure is ran in the ugpost_base_math.tcl file.

 

proc EQ_is_equal [list s t [list tol $mom_system_tolerance]] {
expr { abs($s - $t) <= $tol }
}

 

What has changed between NX10 and NX12 post builder to cause this issue though, im not sure. 

 

I'll raise it with GTAC and update here.

 

Thanks for your help.

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Phenom
Phenom
proc  EQ_is_equal {s t} {
         global mom_system_tolerance

         if { [expr abs($s - $t)] <= $mom_system_tolerance } { return 1 } else { return 0 }
}

This is the version in ugpost_base - I see the math one has something different. Not sure which "wins". I would stop depending on this routine and make your own version to not use it.

NX12.02
Windows 10 Pro
ITC Inc.

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Valued Contributor
Valued Contributor

Hi @Study

 

The syntax I have shown above, referenced in the log file exists in the "ugpost_base_math.tcl" file. 

 

I believe the syntax you've shown above is from the "ugpost_base.tcl" file? Mine matches yours in the ugpost_base file. 

 

Thanks

Re: Posting error when using a post processor that has been converted from NX10 to NX12

Phenom
Phenom
The probable cause of the "new" problem is a tcl version change. It will be a problem that will require a hot fix or mp to have a different version of the ugpost_base_math I would think. You can wait for that or eliminate the dependency. It is good to bring it to GTAC attention either way. Also - it may be that the two versions of this proc are considered different by tcl - one has two arguments and the other a list. I should know that but am unsure at the moment. If that is the case something about passing may need a modification to not look like a list.
NX12.02
Windows 10 Pro
ITC Inc.

Learn online





Solution Information