When post processing NC code, how can one get the name of the MCS object in use by any given operation? This is of interest when using a hierarchy of MCS parents, such as local work offset origins under a top level main MCS.
Solution
Post builder has two variables for the name of the current MCS:
Note that "mom_mcsname_attach_opr" is an arary variable, and requires the name of an operation as an argument to look up the MCS name. For example:
mom_mcsname_attach_opr(PLANAR_MILL_SIDE)
will return the name of the MCS in use by the operation named PLANAR_MILL_SIDE.
For example, a custom command in the Start of Path event could include tcl to plug the current operation name into the "mom_mcsname_attach_opr" variable and output the resulting information:
============================================
global mom_mcsname_attach_opr
global mom_operation_name
set current_csys $mom_mcsname_attach_opr($mom_operation_name)
MOM_output_literal "---- $current_csys"
============================================
Notes