Looking for an PAID expert at UCCNC macro writing

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

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Tue Nov 12, 2024 1:46 pm

ok RsX. I spent a couple of days trying to understand this and I think I've got it.

I do have another question that I don't understand please pertaining to the "automatic" calculation of feed rate for spindle movement when probing. I get that it's automatic, but automatic to what exactly - how are these FeedrateFast and FeedrateSlow calculated?
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Tue Nov 12, 2024 6:23 pm

Hello twedlake, good to hear that you are trying to understand it.
The calculation of the feedrates is somewhat interesting and at the same time total nonsense.
code_feedrate.png


There are also other formulas that could have been written easier.
For example here, but at the end of the day newY - newY is nothing, so there is nothing to worry about :P
nonsense.png
nonsense.png (10.09 KiB) Viewed 883 times


So back at the feedrate calculation, writing it in a more familiar way and rearranging the terms we end up with a formula (first one) that looks the same as the speed of an object in free fall (last one).
In other words, the macro is calculating the initial speed were the Z axis can come to a stop, with a constant deceleration, in 0.02mm. We are also using that SAME speed for EVERY other axis. :o
formula_feedrate.png

Then it calculates the slow feedrate, but now it uses a stop distance of 0.17/(Z steps per unit). Same for imperial and metric units, I'm not sure why.
StopDistance is 0.02mm, dAccel is the acceleration of Z axis and dSteps is the Z axis steps per unit.
What are your Z acceleration and step/units values?
User avatar
RsX
 
Posts: 30
Joined: Fri Oct 25, 2024 9:22 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby twedlake » Tue Nov 12, 2024 6:53 pm

RsX wrote:Hello twedlake, good to hear that you are trying to understand it.
The calculation of the feedrates is somewhat interesting and at the same time total nonsense.
code_feedrate.png


There are also other formulas that could have been written easier.
For example here, but at the end of the day newY - newY is nothing, so there is nothing to worry about :P
nonsense.png


This is the conclusion I have drawn as well. Seems like it was developed in an very overly-complicated way.


RsX wrote:So back at the feedrate calculation, writing it in a more familiar way and rearranging the terms we end up with a formula (first one) that looks the same as the speed of an object in free fall (last one).
In other words, the macro is calculating the initial speed were the Z axis can come to a stop, with a constant deceleration, in 0.02mm. We are also using that SAME speed for EVERY other axis. :o
formula_feedrate.png

Then it calculates the slow feedrate, but now it uses a stop distance of 0.17/(Z steps per unit). Same for imperial and metric units, I'm not sure why.
StopDistance is 0.02mm, dAccel is the acceleration of Z axis and dSteps is the Z axis steps per unit.
What are your Z acceleration and step/units values?


Z - Steps Per Unit = 4233.3342
Z - Velocity = 150
Z - Acceleration = 25

X - Steps Per Unit = 4233.3342
X - Velocity = 250
X - Acceleration = 25

Y - Steps Per Unit = 4233.3342
Y - Velocity = 250
Y - Acceleration = 25
twedlake
 
Posts: 18
Joined: Mon Mar 28, 2022 2:19 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby RsX » Thu Nov 14, 2024 11:09 am

Ok, I needed a some time to crunch all these numbers in both systems of measurement.
These should be your probing feedrates
fin.png
fin.png (4.97 KiB) Viewed 759 times

These are mine (confirmed by running the macro)
fmm.png
fmm.png (4.9 KiB) Viewed 759 times


It is my understanding that the slow feedrate aims to stop the machine in a sixth of a step (0.17 is about 1/6). Why, still not sure. Maybe a rule of thumb.
This also means that the less steps per unit you have, the faster you are going to probe. :?
Both results seems pretty high for my liking but, if the machine is capable of such performances, theoretically they should work.

Maybe these formulas don't take into account the backlash of the ballscrew.
For example if the ballscrew has 0.05mm of backlash, the screw stops in 0.02mm, but the spindle keeps moving by inertia and stops 0.03mm after.
This probably means that the spindle collides with the puck and transfers parts of its energy to the puck that moves away. Like the Newton's cradle I have on my desk :mrgreen:
nc.png
nc.png (38.07 KiB) Viewed 759 times

This is my best guess.
Have you tried setting slower feedrates? Do they make a difference?
User avatar
RsX
 
Posts: 30
Joined: Fri Oct 25, 2024 9:22 pm

Re: Looking for an PAID expert at UCCNC macro writing

Postby Battwell » Sun Nov 17, 2024 8:45 pm

you can purchase a real probe that has sprung over travel. (normally closed connection that opens on contact )
using a tool and relying on "contact circuit making" is very amateur. and prone to failure.
also depends on cutting edge contact or shank contact first- another error gotcha.

on my machines with a sprung probe first feedrate of 1m/minute is fine.
second probe after a small retract at 50mm/min.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Previous

Return to Macros

Who is online

Users browsing this forum: No registered users and 4 guests