Hello Guest it is March 29, 2024, 03:23:47 AM

Author Topic: Calculating Counts per Unit for Mach 4 in metric  (Read 3427 times)

0 Members and 1 Guest are viewing this topic.

Calculating Counts per Unit for Mach 4 in metric
« on: November 28, 2017, 04:58:53 AM »
I'm a complete newbie when it comes to CNC control systems. I'm not 100% sure how to calculate and convert the numbers for Counts per Unit.

Some details:
measurements: metric
motors: servos
encoders: AMT102-V quadrature set at 500 counts
output gear (on ballscrew): 60 tooth
input gear (on servo): 20 tooth
ballscrew pitch: 5mm

I'm really unsure if I have done the math correctly and if I multiple my 500 encoder counts by 4 because they are "quadrature encoders"?

The math:
((output_gear / input_gear) * encoder_count) / screw_pitch = counts_per_inch

Plugging in my numbers:
(60 / 20) * (500 * 4) = 6000
6000 / 5 = 1200

Now, I'm unsure if that is giving me a strange mash of metric and imperial. So my second thought is that the screw pitch may need to be divided by an inch (25.4):

6000 / (25.4/5) = 1181.102

I'm unsure which one is correct? I think that the second calculation (1181) seems more logical as it takes into account the metric screw, but yet I'm still not sure  ??? My Mach 4 is set to metric.
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #1 on: November 28, 2017, 09:41:10 AM »
Hi,
close...I follow your calculation to where you get 6000 pulse per leadscrew rev or 6000/5= 1200 pulse per mm.

Why change it to inches? If your leadscrews are metric why bother complicating the issue by changing to inches. The setup units can be either, these are the units
for motor tuning and steps per units etc but that's all you ever see of them. Once you've set them you can have the DROs etc display inches with a G20, if you
are more familiar with inch units.

If you really want to convert then the calculation is:
steps/inch= steps/mm x 25.4

Which in your case is:
steps/inch = 1200 steps/mm x 25.4 =30480

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #2 on: December 02, 2017, 03:59:40 AM »
Thanks Craig. I set it to 1200 and have been tuning since.
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #3 on: December 02, 2017, 08:57:46 PM »
Hi,
I personally find metric units to be less confusing especially when doing calculations. If, as yours are, your ballscrews are metric why would you bother converting
to inches, just one more potential numerical inaccuracy.

The only absolute recommendation is that once you have decided on the native units for your machine then leave them alone. I've seen newbies (and done it myself
when I was the newest newbie) attempt to change native units because they have a Gcode file in inches when they're accustomed to mm or vice versa.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #4 on: December 02, 2017, 11:00:15 PM »
Hi,
I personally find metric units to be less confusing especially when doing calculations. If, as yours are, your ballscrews are metric why would you bother converting to inches, just one more potential numerical inaccuracy.

The only absolute recommendation is that once you have decided on the native units for your machine then leave them alone. I've seen newbies (and done it myself when I was the newest newbie) attempt to change native units because they have a Gcode file in inches when they're accustomed to mm or vice versa.

Craig

I agree on keeping it metric. I have absolutely no desire to ever work in imperial units. My concern was that the units that Mach 4 expects were the same as what I was entering. I was not sure if it was expecting imperial units. I'm so new to Mach that I really had no idea. I read the documentation but it was all about imperial. It also seemed like there was a mistake. It had the drive ratio written one way, then in the example it was the opposite way. It threw me.
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #5 on: December 03, 2017, 04:37:40 PM »
Hi,
on the Configure/Mach/General screen there is the possibility to select the setup units either inch or mm.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Calculating Counts per Unit for Mach 4 in metric
« Reply #6 on: December 03, 2017, 06:38:28 PM »
Mach4 has a "setup units" option for Metric or Imperial. This will allow for
the simplest possible computation of steps per unit.

The actual running of G code is independent of this and you can set
your defaults to run Metric or Imperial G code, and can override this
setting at any time using a G code to select mode.

Steve Stallings
www.PMDX.com