Hello,
I am working on a CNC-type machine in which we need to use the Spindle axis in speed mode and positioning mode (S=... vs SP=...). We have a Singleturn Absolute encoder on the spindle motor and there is a 4:1 belt connecting it to the spindle (4 motor turns = 1 spindle turn).
The problem has to do with the spindle loosing its reference when the power is cycled (or a PO reset is performed). It will regain its position but it will be off by 0 degrees, 90 degrees, or 180 degrees.
I performed some tests and found that
when the spindle is left at 100.15 degrees, position after reset is 10.15 degrees.
when the spindle is left at 190.15 degrees, position after reset is 10.15 degrees.
when the spindle is left at 280.15 degrees, position after reset is 10.15 degrees.
when the spindle is left at 10.15 degrees, position after reset is 10.15 degrees.
The behavior (I think) is that on power up, the position is always being set by adding some value (presumably obtained when the spindle axis is referenceed) to the absolute encoder 0 to get the axis 0. This works if the spindle was left within a 90 degree range surrounding zero (in our case 332 degrees to 62 degrees). But if the spindle was left in any of the other three 90 degree ranges, the spindle orientation will be off by 90 or 180.
Isn't the position stored in SRAM and should be able to be found on after a reset (assuming no one moved the spindle more than 90 degrees while power is off)? Is there an parameter I am missing that would correct this behavior?
Any insight on this problem would be greatly appreciated.