The Program Group name in an NX CAM program is entered as a four digit program number followed by the program name. Currently, only the four digit program number is allowed when posting in a Post Configurator post. What can be done to have this program name output along with the program number? Including this program name will cause some NC controllers to display this name when listing all programs making this easier to read.
Start Post Configurator and open the DEF editor. Change the header_program Block Template to a String Format. Append the Expression to include $::txt2
The string range TCL command is used to grab the first four digits of the variable. The remaining digits of the variable are also extracted and saved. The following TCL code can be added to a Layer for this purpose.
LIB_GE_command_buffer_edit_prepend LIB_CTRL_nc_header PROG_NUMBER {
set ::co "$::mom_sys_control_out"
set ::ci "$::mom_sys_control_in"
set ::txt1 "[string range $::lib_nc_header_number 0 3]"
set ::txt2 "$::co[string range $::lib_nc_header_number 5 end]$::ci"
set ::lib_nc_header_number "$::txt1"
} _programsplittext
The NC output will look something like the following when complete. Notice that an O is output before the program number and the program name is enclosed in control characters.