G31 and feed speed

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

G31 and feed speed

Postby jjude » Mon Dec 09, 2024 4:17 pm

Does changing the feed speed (150%) affect the speed of tool measurement (exec.Code("G31 Z" + Zmin + "F" + FeedrateSlow);)?
For some reason the tool hit the sensor.
I didn't notice to check if I had moved Feed Speed...
jjude
 
Posts: 11
Joined: Mon May 06, 2024 2:58 pm

Re: G31 and feed speed

Postby cncdrive » Mon Dec 09, 2024 5:59 pm

Yes, it does.
My idea to overcome this issue is to check the FRO DRO value in your probing macro before probing and remember the set value, then set the DRO to 100% and do the probing and then set the FRO back to the original value.
cncdrive
Site Admin
 
Posts: 4997
Joined: Tue Aug 12, 2014 11:17 pm

Re: G31 and feed speed

Postby Battwell » Tue Dec 24, 2024 4:11 pm

ADD this to the top of your m31 macro.


// m31. Dont probe above 100% feedrate

string foveridevalue = AS3.Getfield(232);
string result =foveridevalue .Remove(foveridevalue .Length-1); //strips % sign from field read
int fvalue = Convert.ToInt32(result);

if (fvalue>100)
{
exec.AddStatusmessage(" PROBING STOPPED FEED RATE WAS SET AT "+result +" %");
MessageBox.Show(exec.mainform,"PROBING STOPPED ! FEED RATE ABOVE 100%");
exec.Callbutton(557); /// resets feedrate to 100%
exec.Stop();
return;
}
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


Return to Macros

Who is online

Users browsing this forum: No registered users and 4 guests