Add-on for the M6 ​​macro?

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Add-on for the M6 ​​macro?

Postby Algone » Fri Apr 04, 2025 8:39 pm

Hello everyone,
I recently purchased a tool probe similar to Renishaw's TS27R probes for much less on ​AE https://urls.fr/8UmxJI.
Do you think it's possible to modify the M6 ​​macro so that it triggers the spindle in CCW with a small rpm and an offset from the axis of half the diameter in order to have accurate probing regardless of the cutter size?
You might be able to understand better with a video :) https://urls.fr/g-WpVS

Thx
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby Algone » Sun Apr 13, 2025 9:46 pm

Hi,
I tried to modify the macro myself, but I couldn't do it. I still lack the knowledge and practice for this.
I asked "Deep Seek" and he gave me the lines to add to the macro. It's between "exec.Callbutton(848); " and "exec.Miston();".
I haven't been able to try it yet, please let me know if you think it makes sense.
Attachments
M6 bis.txt
(5.28 KiB) Downloaded 385 times
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby Algone » Tue Apr 15, 2025 7:54 am

Well, I think I got a bit carried away, I got an error message, I'm going to take the macro again and go step by step, I'll post the progress.
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby Algone » Fri May 02, 2025 8:23 pm

Hello everyone, I've made progress, but I'm struggling with some things.
I started with Dezsoe's macro, which works very well for me.
I added a counterclockwise spindle start. However, since the probing is done in two parts, the spindle stops right after the rapid probing. I haven't figured out how to maintain the rotation.
Second problem: I can't create an X- offset (I'm at the limit of X+ with my probe).
For the test, I have two tools: the first (T1) with a diameter of 6mm, the second (T2) with a diameter of 100mm, which I entered in the tool table.
I integrated a tool diameter reading box into the macro, but the reading does not correspond to the diameter recorded in the tool table, for example it gives me 1mm for T1 and 2mm for T2.
I realized that the tool field was not good, I added a tool field reading and in the UCCNC dialog box I had:
Image
Do "Field 17" and "Field 18" correspond to tools T1 and T2?
If so, why don't they correspond to the respective diameters?
Here is a screenshot of the tool table;
Image

I'm attaching the latest version of the macro, if anyone can help me see more clearly that would be great.
Attachments
M6.txt
(6.34 KiB) Downloaded 354 times
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby ger21 » Sat May 03, 2025 1:02 pm

Tool Diameters are fields 2501-2596.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2806
Joined: Sat Sep 03, 2016 2:17 am

Re: Add-on for the M6 ​​macro?

Postby Algone » Sat May 03, 2025 6:21 pm

I didn't think for a moment that the tool field corresponded to the label number.
Thanks for the info ;) .
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby Algone » Sun May 04, 2025 6:03 pm

Here is the latest version, UCCNC reads the diameter and therefore the radius of the tool and applies the offset in X-, unfortunately there are still some problems, this is how the macro works: the tool moves above the probe, I have a message telling me to insert the T1 tool, I click OK, the tool goes down, shifts from the radius, goes up, recenters and goes back down for probing. I don't understand why it recenters and how to avoid this.
Any help would be much appreciated.
Attachments
M6.txt
(6.64 KiB) Downloaded 367 times
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby Algone » Tue May 06, 2025 12:17 am

Can someone confirm that the "821" button script uses the M31 macro?
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Re: Add-on for the M6 ​​macro?

Postby ger21 » Tue May 06, 2025 1:48 pm

All the probing on the probing screen is done with the probing plugin. I doubt any of it uses the M31 macro.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2806
Joined: Sat Sep 03, 2016 2:17 am

Re: Add-on for the M6 ​​macro?

Postby Algone » Tue May 06, 2025 7:44 pm

Thanks Ger21, I'm not sure, but I think button 821 still called macro M31, which canceled the X- offset.
I deleted button 821 and copied the probing elements from M31 to M6, and it works perfectly.
I cross-referenced the answers from Deep Seek, ChatGPT, and Perplexity. It was extremely long and laborious, but I got it. Here's how it works:
-The tool moves above the probe and asks to insert the correct tool. In UCCNC, the diameter and radius are displayed. I click OK.
-The tool moves down, the spindle starts at M4 S200, shifts in X- by the radius value, and performs a first probe (G31 stops the spindle).
-The spindle restarts and performs the second probe.
-I click "Star Cycle," and the Gcode continues until the next tool change.

*Imperative: You must enter the tool diameter in the tool table.
You can change the direction and axis by editing the macro.

*Some descriptions in the macro are in French, please excuse me.

I hope you enjoy it.
Attachments
M6.txt
(7.29 KiB) Downloaded 339 times
Algone
 
Posts: 31
Joined: Thu Jun 20, 2024 10:23 pm

Next

Return to Macros

Who is online

Users browsing this forum: No registered users and 3 guests