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

3ax postprocessor

Creator
Creator

I have a three axis post and would like it to output warnings or kill it when the input file has the tool axis off zm... as of right now i can post my five axis files with the three axis post and get no warnings.  Tried lots of mom commands with the 4th and 5th axis and they all seem to be coming back 0 still.  Any help on which mom commands to use or the approch to get warnings ?

3 REPLIES

Re: 3ax postprocessor

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If there is an illegal rotary, it comes out as a warning.

In addition, the variables are set to bogus positions,

You should probably test mom_tool_axis instead of mom_out_angle_pos (or whatever)

 

Assuming Post Builder (not Post Configurator)

 

To see the warnings, I use code like this:

if { [string match "WARNING: unable to determine valid rotary positions" $mom_warning_info] } {
	global mom_operation_name
	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
	global mom_post_in_simulation
	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
}
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: 3ax postprocessor

Gears Phenom Gears Phenom
Gears Phenom

I agree - in mom warning - there is some string if there is a problem

Also tool axis can checked (- I use this in 3ax pp)

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

Re: 3ax postprocessor

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I usually source in a Tcl script that contains the following to check for multi-axis motions in 3-axis post-processors.

#=============================================================
proc PB_CMD_JH_Check_Tool_Axis { } {
#=============================================================
#
# add this procedure as the last action for rapid move
#
    global mom_tool_axis mom_tool_path_type

    if { [info exists mom_tool_axis(2)] } {
        set jh_tool_axis_Z [expr abs($mom_tool_axis(2))]
    } else {
        set jh_tool_axis_Z 1
    }

    if { [info exist mom_tool_path_type] && $mom_tool_path_type == "variable_axis"} {
        set jh_tool_axis_Z 0.5
    }

    if { ! [ EQ_is_equal $jh_tool_axis_Z 1 ] } {
        MOM_log_message "Tool axis Z ... $jh_tool_axis_Z"

        PB_CMD_abort_and_close_files "Multiaxis Program detected! Exiting ..."
    }
}

#=============================================================
proc PB_CMD_abort_and_close_files { {arg} } {
#=============================================================

global mom_sys_control_in mom_sys_control_out ptp_file_name
global jh_output_file_directory mom_output_file_directory mom_path_name
global mom_output_file_basename mom_sys_output_file_suffix

  if {![info exist jh_output_file_directory]} { set jh_output_file_directory $mom_output_file_directory}

  set ptp_file_name ${jh_output_file_directory}${mom_path_name}.${mom_sys_output_file_suffix}
  if {[file exists $ptp_file_name]} {
     MOM_close_output_file $ptp_file_name
     MOM_remove_file $ptp_file_name
  }
  set ptp_file_name ${mom_output_file_directory}${mom_output_file_basename}.${mom_sys_output_file_suffix}
  if {[file exists $ptp_file_name]} {
     MOM_close_output_file $ptp_file_name
     MOM_remove_file $ptp_file_name
  }
  set ptp_file_name ${jh_output_file_directory}${mom_output_file_basename}.${mom_sys_output_file_suffix}
  if {[file exists $ptp_file_name]} {
     MOM_close_output_file $ptp_file_name
     MOM_remove_file $ptp_file_name
  }

    MOM_open_output_file $ptp_file_name
    MOM_output_literal "$mom_sys_control_out ERROR $mom_sys_control_in"
    MOM_output_literal "$mom_sys_control_out ERROR -- $arg $mom_sys_control_in"
    MOM_output_literal "$mom_sys_control_out ERROR $mom_sys_control_in"
    MOM_close_output_file $ptp_file_name

    MOM_abort "ERROR $arg"

}

Hope this helps.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide
Highlighted

3ax postprocessor

Creator
Creator

I have a three axis post and would like it to output warnings or kill it when the input file has the tool axis off zm... as of right now i can post my five axis files with the three axis post and get no warnings.  Tried lots of mom commands with the 4th and 5th axis and they all seem to be coming back 0 still.  Any help on which mom commands to use or the approch to get warnings ?

NX CAM Postprocessor Group
NX CAM Postprocessor Group

Members (123)