Configure an M6 Macro for Tool-Number-Based Z Probing

Jason IP2 min read
Other ManufacturerOther TopicTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Required M6 Decision

Modify the existing M6 macro so it reads the requested tool number before continuing with its normal behavior. Route tool numbers 95 through 98 to the tool setter because these four positions hold drill chucks whose tool height changes when the drill changes. All other requested tool numbers must bypass this added probing branch and continue through the existing M6 sequence.

Requested tool number Required action
95–98, inclusive Visit the tool setter, probe Z, and update the corresponding tool-length offset.
Any other tool number Continue with the existing M6 behavior without running the added probing branch.

Controller-Neutral Macro Structure

The evidence does not identify the CNC controller, macro language, requested-tool variable, probing command, or offset-write command. Therefore, the following is pseudocode only; map each operation to the controller's documented syntax rather than entering it directly.


Keep the call to the remainder of M6 outside the conditional branch so both paths reach the established tool-change logic. Confirm whether the existing macro expects probing before or after the physical tool change; the available evidence does not define that sequence.

Implementation Procedure

  1. Locate the existing M6 macro and identify how it reads the requested tool number.
  2. Add an inclusive range test for tool numbers 95 through 98.
  3. Inside that branch, call the existing motion that positions the tool at the tool setter.
  4. Run the existing Z-probing operation and write the measured result to the tool-length offset associated with the requested tool.
  5. Allow both the probing and non-probing paths to continue into the remainder of the existing M6 code.

Reuse established tool-setter motion, probing, and offset-update routines when they already exist. No controller-specific command names, probe directions, coordinates, feed rates, or offset formulas are provided, so determine those items from the machine's current validated routines and controller documentation.

Verification

Test the branch boundary deliberately: request tools 95 and 98 and verify that each reaches the setter, probes Z, and updates its own tool-length offset. Then request a tool outside the range and verify that the probing branch is skipped while the original M6 behavior still completes. Also confirm that an offset measured for one drill chuck is not written to another tool number.

FAQ

How do I make M6 probe only tools 95 through 98?

Read the requested tool number and use an inclusive test: tool number greater than or equal to 95 and less than or equal to 98. Put the tool-setter move, Z probe, and offset update inside that branch.

What should M6 do for tools outside 95–98?

Skip the added probing branch and continue through the existing M6 code. Keep the normal M6 continuation reachable from both paths.

Which CNC macro commands should I use for the tool-number test?

The controller and macro dialect are not identified, so exact variables and commands cannot be specified. Use the controller's documented requested-tool variable, conditional syntax, Z-probing operation, and tool-length-offset write command.

Back to blog