mfunc6 probe a tool with saving in the tool library and validation in spindle

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

suntravel
Community Expert
Posts: 3484
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by suntravel »

And I have no time to translate French for helping others in my spare time ;)

It is a matter of respect to adapt your language if asking for help.

Uwe


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

cnckeith wrote: ↑Fri May 16, 2025 9:50 am If i understand correctly, what you want to do can be done with a custom Macro.
a custom Tool Change M6 by definition is CUSTOM.
when using a Custom M6, the Wizard is not involved in the Custom Macro, the Wizard will not create or edit your custom macro.
Resources are the CNC12 Operator manual which covers codes you can use in the custom macro to achieve your goals and the introduction to macro programming guide.
Posting a fresh report.zip goes a long way in helping us help you.
Free support is not provided without it.
here is how to get free support.
viewtopic.php?t=1043
My macro works perfectly with the Z homme mode, but I had to reset CNC12 because the G43 H command was no longer responding. Now, my goal is to make it operational in "Tool Ref" mode so that I can offer both methods of "Tool Touch." I apologize for getting carried away in my words.


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

suntravel wrote: ↑Fri May 16, 2025 2:14 pm And I have no time to translate French for helping others in my spare time ;)

It is a matter of respect to adapt your language if asking for help.

Uwe
Sory


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

πŸ† CNC12 Probing Macro and Explanation - English
πŸ“’ Tested and Working: CNC12 Probing Macro!

Hey everyone,

I’ve tested this CNC12 probing macro, and it works perfectly for me! 🎯πŸ’ͺ It correctly handles tool changes, probing using the P003=6 method, and registers the tool length measured from Z-Home in the CNC12 tool library.

πŸ“Œ Macro details: βœ… Filename: mfunc6.mac βœ… Tool measured from Z-Home and saved in the library βœ… Optimized tool change movements βœ… Validates tool length before saving βœ… Designed specifically for users who mount tools in collets, without an ATC (Automatic Tool Changer) βœ… ⚠ The Tool Touch Off position is fixed and must be configured in the Tool Touch Off section of the CNC12 Wizard before use!

⚠ Important: πŸ”Ή Test cautiously! Double-check your settings before running the macro on your machine. πŸ”Ή Users must also determine their highest point in G53 Z0 to ensure the machine clears properly before any operation. πŸ”Ή Don’t forget to update the position coordinates for tool insertion! πŸ”Ή The tool change position must be set in the macro using: G53 X0 Y-400 (Adjust these values based on your configuration!)

πŸš€ If you use this macro and spot an issue or an area for improvement, feel free to share your feedback! The goal is to make this macro adaptable and reliable for all users πŸš€πŸ”₯

Happy machining! πŸ”₯βš™οΈ

gcode
;------------------------------------------------------------------------------
; Filename: mfunc6.mac
; Description: Tool probing and registration in the tool library with tool validation and spindle length
; Method: Using CNC12 probing method with `P003=6`, tool measured from Z-Home
; Fixed Tool Touch Off position: **Must be configured in the Tool Touch Off section of the CNC12 Wizard before use**
; Notes: Optimized for CNC12 with manual tool insertion
; Requires: CNC12 V5.08
;------------------------------------------------------------------------------

IF #50001 ; Prevent lookahead from parsing past here

N500 ; Tool Touch Off Check Configuration
G65 "C:\cncm\system\tt_check_configuration.cnc"

;-- Tool Change Position --
N600
G53 Z0 ; **This Z clearance point must be determined by the user based on their machine setup**
G53 X0 Y-400 ; **Tool change position to be defined by the user in machine coordinates**
M200 "Insert tool, Press Cycle Start to continue..."
G53 Z0 ; **Safety position before probing**

;-- Tool Touch Off Cycle Block 550 --
N550
IF #9432 == 0 THEN G30 P3 G91 X0 Y0 Z0
IF #9432 == 1 THEN M201 "Move to the probing surface\nPress Cycle Start to continue."

M115 /Z P[#33001] F[#33002] ; **Rapid descent until probe contact**
M116 /Z P-[#33001] F[#33003] ; **Slight retract**
M115 /Z P[#33001] F[#33003] ; **Slow re-probing**

G10 H[#12000] R[#5023] ; **Store tool length in the library**
G43 H[#12000] ; **Apply tool length offset relative to the spindle**

M25 ; **Return to Z-Home**
G90
Attachments
mfunc6.mac
(1.71 KiB) Not downloaded yet
Last edited by Filardo on Sun May 18, 2025 12:47 am, edited 1 time in total.


Ken Rychlik
Posts: 511
Joined: Wed Jan 23, 2019 4:19 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 80F5B5B92C3A-0213236854
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Ken Rychlik »

The thing I do differently is I have a separate macro for tool measure. The M6 tool change macro goes to that macro to measure, and then comes back. This way, if I only want to measure the current tool, I have a button for that.

I'm happy you have it working and if it does what you want, you don't need to change anything. Each person seems to want to do things a little different.
Ken


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

Ken Rychlik wrote: ↑Sat May 17, 2025 6:56 am The thing I do differently is I have a separate macro for tool measure. The M6 tool change macro goes to that macro to measure, and then comes back. This way, if I only want to measure the current tool, I have a button for that.

I'm happy you have it working and if it does what you want, you don't need to change anything. Each person seems to want to do things a little different.
Yes, because I wanted to be able to program the intercom with multiple tools, which is difficult without ATC. I would have liked it to work with Z-reference, but no, it doesn't work with Z-Tool reference, because the value probed is different from the library's automatic measurement. I also find it a shame that this alternative isn't offered in Winzard, as is the case with the ATC setting, which automatically edits a macro. I forgot to mention that I'm using a fixed tool touch-off. I also wish the M200 message would ask me to insert the tool number to be programmed into my program. Thanking you in advance for your help and the time you spend helping me.


Ken Rychlik
Posts: 511
Joined: Wed Jan 23, 2019 4:19 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 80F5B5B92C3A-0213236854
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Ken Rychlik »

It will show you the tool number you need to load on the top of the screen.

I did include my programed tool change telling me which tool and a description at one time, but for me it was more trouble than it was worth. I had it import that from my design program file.

If your tools are always the same description and number, you could have it tell you what to load. You would use variables for each tool number and based on the tool number it would load the variable (description) of your desired tool. If you want to do that, start another thread asking for help with that part and someone will help.

You have to be careful because some of the symbols will mess it up I ran into that. " ( ; I forget which one but with the wrong symbol in a description it would give an error
Ken


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

Ken Rychlik wrote: ↑Sat May 17, 2025 9:20 am It will show you the tool number you need to load on the top of the screen.

I did include my programed tool change telling me which tool and a description at one time, but for me it was more trouble than it was worth. I had it import that from my design program file.

If your tools are always the same description and number, you could have it tell you what to load. You would use variables for each tool number and based on the tool number it would load the variable (description) of your desired tool. If you want to do that, start another thread asking for help with that part and someone will help.

You have to be careful because some of the symbols will mess it up I ran into that. " ( ; I forget which one but with the wrong symbol in a description it would give an error
Ok après c'est pas grave c'est superflus


Filardo
Posts: 253
Joined: Wed Jul 28, 2021 3:54 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: mfunc6 probe a tool with saving in the tool library and validation in spindle

Post by Filardo »

πŸ“’ CNC12 V5.08 Tool Probing & Tool Change Macro Update
πŸ”Ή New version with improved tool change positioning in Z!

We have reviewed and optimized the mfunc6.mac macro, allowing CNC12 V5.08 users to perform manual tool changes while ensuring precise tool measurement and reliable tool management.

πŸ”§ Improvements made:
βœ… Secure tool change positioning in Z β†’ Adapted to all user setups. βœ… Optimized probing cycle β†’ Adjusted for better accuracy and reliability.

πŸ“Œ Why use this macro?
πŸ’‘ Automatic and reliable tool length measurement πŸ’‘ Advanced tool management without an ATC πŸ’‘ Improved safety during tool changes πŸ’‘ Optimized setup and machining time

πŸ“‚ File Name: mfunc6.mac πŸ“‚ Recommended Location: C:\cncm\system\

πŸ’¬ Your feedback is welcome! If you test this new version or have suggestions for improvement, feel free to share them here. πŸš€

πŸ“Œ Here is the explanatory document I am providing along with the downloadable macro.




## **Read Me - CNC12 V5.08 Tool Probing & Tool Change Macro**

### **Description**
This macro is designed for CNC12 V5.08 users performing manual tool changes.
It enables each tool to be measured, automatically saves its length in the CNC12 tool library, and validates the tool in the spindle with its number and H value on the **DRO (Digital Readout)**.
With this method, users can machine parts using multiple tools in the same program without needing an ATC, while ensuring precise tool compensation and reliable tool management.

### **Prerequisites Before Use**
- Disable `"Ref Tool"`
- Define the tool change location (`G53 X0 Y-400`)
- Add a Z clearance move before fast positioning above the probe
- **Use `P003=6`**, which sets `Z Home = Z Ref` and activates the tool height retention option
- Perform a test before production

### **Macro Workflow**
1. Secure clearance before positioning
2. Move to the tool change location
3. Display a message prompting the user to insert the new tool
4. Fast positioning above the probe
5. Probe the tool and record its length
6. Apply tool compensation
7. Secure return in Z

πŸ“‚ **File Name:** `mfunc6.mac`
πŸ“‚ **Recommended Location:** `C:\cncm\system\`

---

### **CNC12 V5.08 Tool Probing & Tool Change Macro**

### **Prerequisites Before Activating in CNC12**
- **Verify Probe Configuration**
The macro checks if the probe is properly configured before starting via a call to the `tt_check_configuration.cnc` function.
The probe position must be fixed and defined in the CNC12 Wizard.

- **Disable the "Ref Tool" Method**
Before activating the macro, `"Ref Tool"` must be disabled if it was active.
Reset the tool reference **in the CNC12 library**, by setting the Z axis at its highest point (`G53 Z[Max Value]`).
Then, perform a new reference take (`Ref Tool`) at this position to ensure an accurate tool length measurement.
After completing this step, `"Ref Tool"` can be disabled in the CNC12 Wizard.
Without this step, if a tool is measured via the CNC12 library using auto-measure, the recorded value may differ.

- **Define Tool Change Position**
Each user must define the **X and Y** position for the tool change (`G53 X0 Y-400`) based on their machine setup.
This location should be accessible and safe for manual handling.

- **Add Z Clearance Before Fast Positioning Above the Tool Probe**
It is recommended to add a `G53 Z[Clearance Value]` before fast positioning above the tool probe.
This ensures a secure clearance and avoids any collision risk before approaching the probe.

- **Use `P003=6`**
`P003=6` sets **`Z Home = Z Ref`** and activates **the tool height retention option**.
Before probing, the machine must move to this position to ensure a correct and secure measurement cycle.
Each user can adjust this position according to their machine’s probe setup.

- **Perform a Test Before Production**
Always test the macro **in a secure area** before integrating it into an actual machining process.

### **Macro Workflow**
1. Macro launch
2. Secure clearance (`G53 Z0`) before positioning at the tool change location
3. Move to the predefined location (`G53 X0 Y-400`)
4. Display message `M200` prompting the user to insert the new tool
5. Secure clearance (`G53 Z0`) before probing
6. Move to the probe position (`G30 P003`)
7. Automatic probing via `M115 /Z` and `M116 /Z`
8. Save tool length via `G10` in the CNC12 library
9. Apply tool compensation using `G43` and validate on the **DRO**
10. Secure return in Z (`G90` then `G53 Z0`) before resuming the program

### **Complete Macro Example in G-code**

```gcode
;------------------------------------------------------------------------------
; File Name: mfunc6.mac
; Description: Tool probing and recording in the tool library with tool validation and length in spindle
; Note: Optimized for CNC12 with manual tool insertion
; Requires: CNC12 V5.08
;------------------------------------------------------------------------------

; **Tool Touch Fix must be properly set in the CNC12 Wizard**
; **Parameter P003=6 sets `Z Home = Z Ref` and activates the tool height retention option**

IF #50001 ; Prevent lookahead buffer execution

N500 ; Check tool probe configuration
G65 "C:\cncm\system\tt_check_configuration.cnc"

;-- Positioning before tool change --
N600
G53 Z0 ; **Initial Z clearance (user-defined)**
G53 X0 Y-400 ; **Tool change position X Y (user-defined)**
G53 Z0 ; **Tool change position in Z (user-defined)**
M200 "Insert tool, press Cycle Start to continue..."
G53 Z0 ; **Safety clearance before probing**

;-- Tool probing cycle, Block 550 --
N550
IF #9432 == 0 THEN G30 P003 G91 X0 Y0 Z0
IF #9432 == 1 THEN M201 "Moving to probe surface\nPress Cycle Start to continue."

M115 /Z P[#33001] F[#33002] ; **Fast descent to contact the probe**
M116 /Z P-[#33001] F[#33003] ; **Slight retraction**
M115 /Z P[#33001] F[#33003] ; **Slow re-probing**

G10 H[#12000] R[#5023] ; **Save tool length in the library**
G43 H[#12000] ; **Apply tool compensation**

G90 ; **Explicit switch to absolute coordinates**
G53 Z0 ; **Return to Z-home**
Attachments
Read Me.txt
(5.48 KiB) Downloaded 3 times
mfunc6.mac
(1.87 KiB) Downloaded 3 times


Post Reply