Showing results for 
Search instead for 
Do you mean 
Reply

check for the rotary axis limit - post builder

hi

 

I Questions. check for the rotary axis limit.

 

A-axis limit is +110 ~ -19.5.

 

Axis Limit Violation Handling is Warning.

 

If you violate the axis limit, the value of the A-axis will be output at "0".

 

If violated, I want to display a message.

 

How do you to set?

 

 

14 REPLIES

Re: check for the rotary axis limit - post builder

[ Edited ]

configure fourth axis limit violation to User Defined Action

Define a custom command and use MOM_output_to_listing_device or MOM_display_message (only NX9-NX10) to display your warning.

ciao

Luciano

 

Re: check for the rotary axis limit - post builder

thank

 

but It has not been resolved.

 

After output, what phenomenon has not been found.

 

Can I get a sample file?

 

Re: check for the rotary axis limit - post builder

Note I am in NX7.5, so the following may change for later versions (in particular, the warning text I search for)

I have found if there is NO valid rotary position (as opposed to "the current position exceeds the machine limits, butt he alternate position is valid") NX sets the rotary axes to arbitrary values and "outputs" a warning (that I never see, as apparently I don't have something turned on or I don't look in the right place).

 

Try adding this code to your post, *everywhere* a rotary axis *might* be moved(initial/first move, rapid/linear moves, cycles, etc.):

#=============================================================
# If unable to determine ANY valid rotary axis position, post does NOT output a "real" warning -
#	It just sets 4th axis = 5th axis = 0 and doesn't output much of anything...
# 	Warning message = "WARNING: unable to determine valid rotary positions"
# 	(as opposed to reaching a rotary axis limit & having to reposition...)
proc Moog_Check_Warnings { } {
#=============================================================
	global mom_operation_name
	global mom_warning_info
	global mom_post_in_simulation
	

	if {[info exists mom_warning_info] &&
		[string length $mom_warning_info]} {
		if {[string first "WARNING: unable to determine valid rotary positions" $mom_warning_info] > -1} {
			set message "\n\n\n\n---------------------------------------------------------------------------------------------------------"
			set message "$message\n$mom_operation_name - ERROR -unable to determine any valid rotary axis position - post aborting"
			set message "$message\n---------------------------------------------------------------------------------------------------------\n\n\n\n"
			# Don't do abort if in simulation mode
			if {[info exists mom_post_in_simulation] &&
				$mom_post_in_simulation != 0} {
				MOM_output_to_listing_device "$mom_operation_name - ERROR -unable to determine any valid rotary axis position"
				# TODO: Sync manager - is this 1st pass (opening sync manager) or 2nd (posting from sync manager)
				if {$mom_post_in_simulation != "SYN"} { return }
			}
			MOM_abort $message
		}
		# MOM_output_to_listing_device "mom_warning_info = $mom_warning_info"
		unset mom_warning_info
	}
}

Again, the warning message string may change for different versions of NX (or possibly different languages) 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: check for the rotary axis limit - post builder

Ken,

When I try using a variable with MOM_abort, it doesn't get expanded.

My custom command code:

#  In initial and first move events
global mom_fixture_offset_value message
if {[expr $mom_fixture_offset_value < 1] || [expr $mom_fixture_offset_value > 48] } {
    global mom_operation_name mom_tool_name mom_group_name mom_next_oper_geom
    MOM_output_to_listing_device "*** Error occurred while postprocessing! ***"
    MOM_output_to_listing_device "Wrong Offset Number =  G54 P$mom_fixture_offset_value"
    MOM_output_to_listing_device "Number range should be from P1 to P48"
    MOM_output_to_listing_device "Wrongly set in Fixture Offset for Geometry or A Parent of Geometry: ($mom_next_oper_geom)"
    MOM_output_to_listing_device "For Program Group: ($mom_group_name)"
    MOM_output_to_listing_device "For operation: ($mom_operation_name)"
    MOM_output_to_listing_device "*** Postprocessing has been aborted! ***"
    set message "\n\n\n\n---------------------------------------------------------------------------------------------------------"
    set message "$message\n$mom_operation_name - ERROR - Wrong Offset Number =  G54 P$mom_fixture_offset_value Range should be in P1-P48 - post aborting"
    set message "$message\n---------------------------------------------------------------------------------------------------------\n\n\n\n"
    MOM_abort $message
} else {
MOM_output_literal "G54 P$mom_fixture_offset_value (SET OFFSET GROUP)" }

 

MOM_abort-Output.png

 

And the listing window gets the info displayed twice? 

 

 

Information.png

 

 

I am using managed NX. Are these known issues with these versions? See signature.

Dave Smikle
PB 9.0.2
NX 9.0.2.5 Rev. L
Teamcenter 10.1.1.2_a01_10 64-bit
Windows 7

Re: check for the rotary axis limit - post builder

I don't have NX9 available, it could be Siemens broke something (no....say it isn't so ;-)

 

First thing I'd try - add double-quotes around the variable:

MOM_abort "$message"

 

If that doesn't work, try

MOM_abort "THIS IS A BOGUS MESSAGE"

 

If that doesn't work, contact GTAC

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: check for the rotary axis limit - post builder

Actually, first thing I'd do is check the syslog (NX log file) for the "real" tcl error

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: check for the rotary axis limit - post builder

If I remember correctly, I have never seen the abort message being displayed to the user, just written to the NX syslog.

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: check for the rotary axis limit - post builder

Stefan and Ken,
Thanks for your feedback.

I can get my string to show in their abort window, but newlines /n/n and any $variables are literals there.

 

 

Ken,

I thought you were adding newlines and such to set the message apart in the abort window as well as the list in the syslog?  Does your expanded text show in the NX10 abort window that you are currently seeing? Maybe it always was literal and string length was limited (see image, there is more to show, but it displays an ellipsis.

Dave Smikle
PB 9.0.2
NX 9.0.2.5 Rev. L
Teamcenter 10.1.1.2_a01_10 64-bit
Windows 7

Re: check for the rotary axis limit - post builder

I don't know what the issue is.

If I add this code to a PB10.0.3 post:

global mom_operation_name
global mom_fixture_offset_value
set message "\n\n\n\n---------------------------------------------------------------------------------------------------------"
set message "$message\n$mom_operation_name - ERROR - Wrong Offset Number =  G54 P$mom_fixture_offset_value Range should be in P1-P48 - post aborting"
set message "$message\n---------------------------------------------------------------------------------------------------------\n\n\n\n"
MOM_abort $message

 

I get this dialog:

abort.png

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Learn online





Solution Information