Changing the tool length in a macro

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

Changing the tool length in a macro

Postby jjude » Thu Dec 05, 2024 8:43 pm

Hi

I measure the tool (M6).
I run the gcode.
I want to set the tool length to be shorter.
How can I set the tool length to something other than what was measured?
I run the same code and get the "deeper groove" I want
jjude
 
Posts: 11
Joined: Mon May 06, 2024 2:58 pm

Re: Changing the tool length in a macro

Postby cncdrive » Thu Dec 05, 2024 9:08 pm

You could write the value in the tool length ofset field using AS3.Setfield and AS3.validatefield.
Please check the UCCNC/Documentation and macro capability document about the syntax of these functions.
You could check the DRO number using the built in screen editor of the UCCNC, just open the screen editor, click that DRO and check the fieldnumber parameter in the screen editor.
Then use that number in the setfield function, you could write any numbers you want into the DRO from your M6 macro.
cncdrive
Site Admin
 
Posts: 4997
Joined: Tue Aug 12, 2014 11:17 pm

Re: Changing the tool length in a macro

Postby Battwell » Fri Dec 06, 2024 10:49 am

if just using one tool, adjust your z height by the difference. (change number in z dro)
to go deeper add the difference
to go shallower - the difference
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 877
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Changing the tool length in a macro

Postby meena » Wed Dec 25, 2024 5:59 am

Hi everyone,

I have a quick question regarding adjusting the tool length during a macro. When I try changing the tool length using the Z DRO value, I'm unsure of how exactly to calculate the "difference" in the Z height for different tools. Could someone explain how I can determine this difference more accurately?

Thanks in advance!
meena
 
Posts: 7
Joined: Mon Dec 23, 2024 2:10 pm
Location: India

Re: Changing the tool length in a macro

Postby Battwell » Thu Dec 26, 2024 11:27 am

meena wrote:Hi everyone,

I have a quick question regarding adjusting the tool length during a macro. When I try changing the tool length using the Z DRO value, I'm unsure of how exactly to calculate the "difference" in the Z height for different tools. Could someone explain how I can determine this difference more accurately?

Thanks in advance!


do you have a tool length probe added to your machine?
if not you would have to jog to a fixed point and subtract the z dro readings

if machine is single tool, just jog new tool down to your zero plane and zero the z axis dro (same reference point as previous tool)
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 877
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Changing the tool length in a macro

Postby meena » Fri Dec 27, 2024 5:31 am

Many Many Thanks.

I don’t have a tool length probe, so I’ll try jogging to a fixed point and subtracting the Z DRO readings. For single tools, I’ll make sure to zero the Z axis DRO at the same reference point.
meena
 
Posts: 7
Joined: Mon Dec 23, 2024 2:10 pm
Location: India


Return to Macros

Who is online

Users browsing this forum: No registered users and 4 guests