Difference between revisions of "Endless Axes"

From SoftMC-Wiki
Jump to: navigation, search
Line 10: Line 10:
 
== softMC position variables ==
 
== softMC position variables ==
  
The system automatically extends range position variables (pcmd,pfb,pext) to [mindouble,maxdouble] by counting the number of cycles of 32-bit range. Each time the position feedback (or external) passes 31 bit limit internal ''counter of revolutions'' ('''count_rev''') is increased (decreased). So the position property values: [[Axystems:MC-Basic:axis.POSITIONFEEDBACK|PFB]], [[Axystems:MC-Basic:axis.POSITIONCOMMAND|PCMD]]  
+
The system automatically extends range position variables (pcmd,pfb,pext) to [mindouble,maxdouble] by counting the number of cycles of 32-bit range. Each time the position feedback (or external) passes 31 bit limit internal ''counter of revolutions'' ('''count_rev''') is increased (decreased). So the position property values: [[Axystems:MC-Basic:axis.POSITIONFEEDBACK|PFB]], [[MC-Basic:axis.POSITIONCOMMAND|PCMD]]  
 
, [[Axystems:MC-Basic:axis.POSITIONEXTERNAL|PEXT]] do not exhibit any discontinuities.  
 
, [[Axystems:MC-Basic:axis.POSITIONEXTERNAL|PEXT]] do not exhibit any discontinuities.  
  

Revision as of 08:46, 22 May 2014

Infinite axes

endless axes

Axes that can theoretically move endlessly in ether direction are supported in the softMC system. The limits of such axes are actually the range of the double-floating point format (-1.79769e+308,1.79769e+308) which practically gives endless axes operation.

Drive limitations

However, the drive-controller communication uses much smaller range its position data is transferred using 32-bits data so the limits of internal drive position units are:
[-2 31 ,+2 31 -1]. This is visible on properties: CCFB, CCMD, and CEXT. They are all integer type, 32-bit variables and as such have limited values.

softMC position variables

The system automatically extends range position variables (pcmd,pfb,pext) to [mindouble,maxdouble] by counting the number of cycles of 32-bit range. Each time the position feedback (or external) passes 31 bit limit internal counter of revolutions (count_rev) is increased (decreased). So the position property values: PFB, PCMD , PEXT do not exhibit any discontinuities.


How is it done?

Detecting of 32 bit limit-pass is done by checking the current and the previous value of the feedback position obtained from the drive.
If the XOR operation on the most-significant bits of the current and the previous feedback value is 1
we increase(decrease) the revolution counter by 1 and then compute the pfb according:
pfb = pfac*(cfb + 2 32 *count_rev)

the revolution counter (count_rev) can be reset by:

  • accessing position factor i.e. "pfac = pfac" or any other assignment.
  • calling user function: MOT_RESET_ROLLOVER or MOT_RESET_EXROLLOVER

Axy;Infinite axes.png


See Also