NX How to make the post output a date/time stamp in the code

2021-10-06T23:26:28Z
NX for Manufacturing

Summary


Details

What is the procedure for making the post write a date and time stamp in the code file output? 

Solution

This can be done with the mom_date variable in a custom command in the Start of Program event. Create a new custom command with this content:

============================================= 

global mom_date 

global mom_sys_control_out 

global mom_sys_control_in

MOM_output_literal "$mom_sys_control_out $mom_date $mom_sys_control_in"

=============================================

Note the use of the mom_sys_control_out and _in varibles to frame the actual date output. This puts the time stamp inside of the predefined post comment characters, e.g.

( Fri Aug 31 08:43:59 2018 ) <<<<< 

N0010 G40 G17 G90 G70 

N0020 G91 G28 Z0.0 

N0030 T01 M06

Notes

KB Article ID# PL8006024

Contents

SummaryDetails

Associated Components

Post Builder