NX Post Builder TCL Custom Command to output extended Work Offsets

2021-10-06T23:27:29Z
NX for Manufacturing

Summary


Details

Some NC controllers have an option to define an extended set of Fixture Offsets. The standard offsets are G54 to G59 and the extended offsets are G54.1 P1 to P48. What TCL code can be used to output all of these offsets? The NC output might look something like the picture seen below.



Solution

Disable the output of any Fixture Offsets in the post. Add a Custom Command in both the Initial Move and the First Move procedure with the TCL code seen below. Be sure that the Custom Command looks like the picture without any word wrapping. In this sample an MCS in NX with a Fixture Offset of 0 to 6 will output the standard offsets of G53 to G59. Offsets of 7 or greater will display the extended output.


global mom_fixture_offset_value
global mom_operation_name

if { $mom_fixture_offset_value >= 0 && $mom_fixture_offset_value <= 6 } {
   MOM_output_literal "G[expr $mom_fixture_offset_value+53]"
} elseif { $mom_fixture_offset_value > 6 && $mom_fixture_offset_value <= 54 } {
   MOM_output_literal "G54.1 P[expr $mom_fixture_offset_value-6]"
} else {
   set resp [MOM_display_message $mom_operation_name "WORK OFFSET MAX 54:" E Stop]
   MOM_abort "*** Invalid Work Offset $mom_fixture_offset_value ***"
}

Notes and References

Please be aware that any code provided by GTAC is intended to be used for sample purposes only. It is the user's responsibility to determine whether the code is suitable for the purpose.

Hardware/Software Configuration

Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: CAM
Version: V1899
Function: POSTBUILDER

Ref: 002-8015835

KB Article ID# PL8015835

Contents

SummaryDetails

Associated Components

Manufacturing Post Builder