Need to change the post output for tap tools. The tapping cycle itself has control over the spindle using a M109 Snnnn sequence that will be built into that cycle output. The control does not want to see the typical M03 to turn the spindle on during the first moves of the operation under this condition.
If there is a tap type tool loaded for the current operation, do not output the standard spindle 'on' codes of M03 Snnnn Instead, issue just a spindle 'off' code: M05
Solution
In this basic sample, the spindle on options are located in the Initial Move event so they are distinct and easy to find:
Note that there are two options here: one for outputting an M05 and the other for outputting the S M03 words. The process is to build in both output lines and then the output conditions for each determine when that line is active. The post actively chooses between the two on the fly based on the output condition logic. Visual indication that output conditions are set for a given block is the existence of the little orange indicator in the upper left corner of that block:
or if you are in that block directly:
To create an output condition on a block, right click the block and go to Output Condition; New. Define the logic here as with any other tcl custom command.
To see one of the output conditions in use for the M05 block of this sample post, right click the M05 block here and go to Output Condition; Edit. That displays the logic applied for this block in the editor dialog:
For the sample case, the logic is straightforward. We test on the value of mom_tool_type as follows: - If mom_tool_type is "Tap", then return 1 (which means go ahead and output this block). - If mom_tool_type is any other tool type string, then return 0 (which means suppress or do not output this entire block):
So here we check for a tap and if that's the current tool type, we get the M05 output.
A similar, but opposite, condition exists for the M03 output block. Here: - If mom_tool_type is "Tap, return 0 and suppress the M03. - If it is any other string for tool type, return 1 and output the M03 with an S value. This is just the reverse of the logical test in the M05 block:
Using this post on a test setup here returns the desired results in the code output:
N2670 =============================== N2680 ===== DRILLING_14 ===== N2690 =============================== N2700 G91 G28 Z0.0 N2710 T06 M06 N2720 T07 N2730 S1000 M03 <<<< drill tool, so we get S and M03 N2740 G00 G90 X1.4173 Y.9055 N2750 G43 Z2.7559 H06 N2760 G81 X1.4173 Y.9055 Z-.264 R1.2992 F9.8 N2770 G80 N2780 =============================== N2790 ===== TAPPING ===== N2800 =============================== N2810 G91 G28 Z0.0 N2820 T07 M06 N2830 T10 N2840 M05 <<<< tap, so we get M05 and no M03 N2850 G00 G90 X1.4173 Y.9055 S0 M03 N2860 G43 Z2.7559 H07 N2870 G84 X1.4173 Y.9055 Z.1575 R1.2992 F9.8 N2880 G80 N2890 =============================== N2900 ===== HOLE_MILLING ===== N2910 =============================== N2920 G91 G28 Z0.0 N2930 T10 M06 N2940 T12 N2950 S1200 M03 <<<< mill tool so back to the M03 output N2960 G00 G90 X2.7559 Y1.4961
Hardware/Software Configuration
Platform: all OS: n/a OS Version: n/a Product: NX Application: CAM Version: V1919 Function: POSTBUILDER