A
Mori Seki milling machine with a
MAPPS III controller will not accept an "
_" (underscore) character in the posted
G-code output even inside of an operator message. Is there an easy way to configure
Post Builder to replace all these characters from the operation or tool name with a "
-" (dash) instead? Notice the underscore characters in the two operator messages below.
%
O1
G90 G80 G40 G17
(PROGRAM_TO_MILL_SIDE)
(END_MILL_.250_DIA)T1 M6
M3 S4580
GO G54 X2.9394 Y-1.927
G43 Z0.5 H12
GO ZO.2
G1 Z0 F9.0
X2.9808 F18.0
G2 X3.1187 Y-1.8646 I0.3702 J-0.635
G3 Y-0.198 I-1.2049 JO.8333
G2 X2.9808 Y-0.1356 I0.2323 J0.6974
Gl X2.9394
Solution
Below is the
TCL code that will parse the "
_" characters from the
mom_operation_name and the
mom_tool_name variables and replace it with a "
-" character.
###
global string_wo_underscores
global mom_operation_name
global mom_tool_name
global mom_sys_control_out mom_sys_control_in
set co "$mom_sys_control_out"
set ci "$mom_sys_control_in"
regsub -all {_} $mom_operation_name "-" string_wo_underscores
MOM_output_literal "$co$string_wo_underscores$ci"
regsub -all {_} $mom_tool_name "-" string_wo_underscores
MOM_output_literal "$co$string_wo_underscores$ci"
###
When output the G-code file will look as follows.
%
O1
G90 G80 G40 G17
(PROGRAM-TO-MILL-SIDE)
(END-MILL-.250-DIA)T1 M6
M3 S4580
Notes and References
Hardware/Software Configuration
Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: CAM
Version: V1855
Function: POSTBUILDER
Ref: 001-7889550