I doubt this will be an issue.  I did an application a while back (years) incrementing a position in hal for a linear drive that was actually a chain loop.  So the servo motor always ran in the same direction.    Rollover of the position counter was brought up then and calculations were made. I think the machine had to run continuously for years (maybe a hundred or more?) before a rollover would occur.    There was a 64 bit int to float conversion someplace in the hal logic as I recall.  Any concern quickly turned into a non-issue even though the machine was running 24x7.    I think the fact that a 64 bit int was being used negated any possible error in the int to float conversion or a float to float comparison.    Anyway, it was not an issue.   This all happened several years ago maybe 2011?   I believe we had the conversation on this list.  Jeff Epler was involved as were others.  I can probably dig out the hal listing for that job if anyone would like to see it.    The machine control was all done in Hal and Classic Ladder.    I don't think the machine ran any Gcode.    I used LinuxCNC as a black box motion controller that was slaved to a external PLC.     The machine ran for years after the installation.

Dave

On 12/13/2017 10:16 AM, andy pugh wrote:
On 13 December 2017 at 15:08, John Kasunich <jmkasun...@fastmail.fm> wrote:
One thing to be aware of:  If your application runs the motors in the same 
direction for long periods of time, absolute position will keep increasing even 
though relative position doesn't change.  If HAL still uses single precision 
(32bit) floats, you eventually might start losing resolution.  If HAL uses 
double precision it will probably take a very long time before that happens.  
But you are still looking at small differences between large (and constantly 
increasing) numbers - never a good thing.
It uses double.  (and the actual position output is calculated from an
internal 64-bit buffer of individual counts)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to