What is the accuracy on the UNITS / REP_DIST?

What is the accuracy on the UNITS / REP_DIST?

Q: What is the accuracy on the UNITS / REP_DIST?

  UNITS = 2^23*3/360 '    Counts/deg
  REP_DIST = 180 '   deg

  REP_OPTION = 0 '            [-REP_DIST..REP_DIST]

As UNITS is approx. 69905.0667 then what will happen when I have run the system for several hours?

Will I loose accuracy over time?

=============================================================================================================
A: The motion operates in counts and all the values are stored as Integers.  (64 bit on the MC4/5/6 ranges)

UNITS is used to present engineering values to the user and to the programs.  Therefore when you set REP_DIST = 180, the value that is stored is INT(180 * UNITS).  When the axis parameters or program reads back REP_DIST it shows the internal repdist / UNITS.

UNITS is a float.  So your UNITS is 2^23 * 3/360 = 69,905.0666667.  The recurring decimal is a sign that you may get errors over a long time, but let’s check the REP_DIST;…

REP_DIST = 180 is stored as 180 * 69,905.0666667 = 12582912.  That is an exact integer.  However there is always a chance that the FP maths could have a small error that could make it 12582911.999999 and the integer would be 12582911

 The safest way is to set the REP_DIST with UNITS 1 using the exact counts.

UNITS = 1
REP_DIST = 12582912
REP_OPTION = 0
UNITS = 2^23*3/360