Hello Guest it is February 25, 2021, 03:37:57 AM

Author Topic: mach's rounding of measurements?  (Read 9886 times)

0 Members and 1 Guest are viewing this topic.

Re: mach's rounding of measurements?
« Reply #10 on: April 23, 2010, 10:31:59 PM »
Your math is correct, and your reasoning is also correct,that it doesn't realy matter.
however the answer is not 100% clear

from what i understand.......... mach will go to the nearest step without going over 410.1= 410, 410.2= 410, 410.3=410, 410.4= 410
410.5=410, 410.6=410, 410.7=410, 410.8=410, 410.9=410, 410.912432=410.

so my understanding is correct mach rounds down to the nearest whole decimal???????? without going over?

my machine has an accuracy of .0024375....

i understand that it is not a cumulative problem as all measurements are from home!!!!!!!!!!!!!!!!!!!!!!!

the question is DOES MACH ROUND UP OR DOWN!

I am sorry if i am hashing this over like crazy, but........ I am more interested in the answer, than if it really matters...

Hood, I did the math you posted... it is good.... and probly cant even measure it....... and doesn't matter,  the fact it carries out to 16 digits there is only one choice .0023475 plus or minus when it hits the magical 410.500000000000000000

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: mach's rounding of measurements?
« Reply #11 on: April 24, 2010, 12:18:15 AM »
so my understanding is correct mach rounds down to the nearest whole decimal???????? without going over?

my machine has an accuracy of .0024375....


Not to the nearest decimal, to the nearest step, you say you machine has a resolution of 0.002437 so if you command a move of 0.003 Mach will move to 0.002437. If you command a move back to zero then Mach will move back to zero.
This is not a problem with Mach but rather a problem with your resolution. If you need better accuracy then you need a  better resolution, simple fact is Mach can only move in increments of a whole step.

Hood

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: mach's rounding of measurements?
« Reply #12 on: April 24, 2010, 07:16:27 AM »
Quote
from what i understand.......... mach will go to the nearest step without going over 410.1= 410, 410.2= 410, 410.3=410, 410.4= 410
410.5=410, 410.6=410, 410.7=410, 410.8=410, 410.9=410, 410.912432=410.

so my understanding is correct mach rounds down to the nearest whole decimal?HuhHuh? without going over?

Basically, Yes, without going over. But see below.

Quote
my machine has an accuracy of .0024375....

i understand that it is not a cumulative problem as all measurements are from home!!!!!!!!!!!!!!!!!!!!!!!

the question is DOES MACH ROUND UP OR DOWN!

Mach doesn't think in terms of fractional steps, only integer steps. So there is no rounding. You want to move 1". Mach3 knows that 411 steps will go over, so it moves 410 steps. There's no such thing as 410.2 steps.

What you're calling "rounding down" is not really rounding. So perhaps this whole thread is just an issue with terminology. :)
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: mach's rounding of measurements?
« Reply #13 on: April 24, 2010, 10:56:10 AM »
Quote
So perhaps this whole thread is just an issue with terminology.
Think you got it right Gerry.

410 steps per unit is just the # of steps as they relate to the mechanical movement over a unit of distance.
Resolution is just the inverse (1/410 ) or the mechanical movement for a single step. The calculated resolution is just a
an "ideal" Reference NUMBER.

There is a practical side of interpreting the resolution. Mechanical, software, and electrical ( system ) come into play as all is not perfect and influences
the accuracy. Accuracy defined as to how closely the "system" is to the ideal. The only way to improve resolution is to increase the steps required for the movement. Each of the above three has an effect on the actual accuracy of movement as it relates to the reference number and are related. Thus one would use the calculated resolution and then measure the actual. The user can make improvements but must keep in mind the practical influences of the above and the individual limitations associated with them.

RICH




Re: mach's rounding of measurements?
« Reply #14 on: April 24, 2010, 12:10:07 PM »
Quote from: ger21 on April 24, 2010, 06:16:27 AM
Mach3 knows that 411 steps will go over, so it moves 410 steps. There's no such thing as 410.2 steps.

But if a move called for 352.7 steps, wouldn't Mach move 353 steps, Gerry?  Maybe I'm "mixing metaphors" here, but in displaying a vector line on a computer screen (which has discrete pixels) the rendering engine will always pick the X-Y pixel that is closest to the mathematical line no matter if it is to the right or left of the theoretical line.  Wouldn't Mach's motion engine do the same?  Mach obviously won't know whether a given motion is, for example, an inside or outside contour and thus which direction will be metal-safe, so I'd think that the only reasonable thing to do is rounding rather than truncating...

Randy
« Last Edit: April 24, 2010, 12:13:15 PM by zephyr9900 »

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: mach's rounding of measurements?
« Reply #15 on: April 24, 2010, 12:31:15 PM »
Quote
But if a move called for 352.7 steps, wouldn't Mach move 353 steps, Gerry?

No.
As I said, there are no fractional steps, so a move won't call for 352.7 steps. A move will call for a given distance. Mach3 will send as many steps are needed to reach that distance, without exceeding it, to the nearest full step.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: mach's rounding of measurements?
« Reply #16 on: April 24, 2010, 01:03:52 PM »
thankyou for explanation guys ;D

Stevo.....
Re: mach's rounding of measurements?
« Reply #17 on: April 24, 2010, 10:24:40 PM »
As I said, there are no fractional steps, so a move won't call for 352.7 steps.
Gerry, I worded my question badly.  I meant "if the distance called for scaled to 352.7 steps".  I realize that steps are a quantum measurement. :)

A move will call for a given distance. Mach3 will send as many steps are needed to reach that distance, without exceeding it, to the nearest full step.
OK, I won't dispute that since you say it is fact and fact is fact.  But I wonder why.  In my professional life I have worked with stepper-driven systems for almost 30 years now (many with relatively coarse timing belt drive) and the controlling firmware's criterion has always been "what step is the closest to the destination?" and not "what step is <= the destination?".  It is just a surprise to me that Mach adopts the latter criterion... [insert shrug emoticon here]

Randy

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: mach's rounding of measurements?
« Reply #18 on: April 24, 2010, 10:31:17 PM »
I didn't say it was a fact.

And looking back, I was probably wrong when I said without going over. ;)
As Hood said, it goes to the nearest step. But I'm not really sure now. I know I've read the explanation from Art before, but no longer have a clear memory of it.

Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: mach's rounding of measurements?
« Reply #19 on: April 24, 2010, 10:56:14 PM »
I didn't say it was a fact.
Well, you did use bold and that made me take it as a fact... ;D  I would be interested to learn about the inner workings of Mach's motion engine if the information is available.  Do you have any pointers of how/where I would look?

Randy
« Last Edit: April 24, 2010, 10:57:51 PM by zephyr9900 »