NigelInWindsor Posted May 8, 2017 Share Posted May 8, 2017 The current position of an Ethercat drive is a 4 byte (32 bit register $6064:0). When a spindle rolls over the maximum value (2^32 - 1) I assume there is a register somewhere that increments so that values greater than 2^32 can be computed. My problem is how do you reset this register? I Home zero the Ethercat drive by writing direct to the Ethercat registers cout12:0 sdo=ecatsdo(0,5,$6098,0,35,0) // Home current Position sdo=ecatsdo(0,5,$6060,0,6,0) // Set Drive in Homing Mode sdo=ecatsdo(0,5,$6040,0,31,0) // Start homing sdo=ecatsdo(0,5,$6040,0,15,0) //control word back to normal sdo=ecatsdo(0,5,$6060,0,8,0) //Back to CycSyncPos Mode This works fine and sets the $6064:0 to zero however it obviously doesn't clear the PPMAC registers bits 33 and above Now I could just set Motor[x].HomePos = 0x1,0000,0000 but I'd prefer to actually clear the register Link to comment Share on other sites More sharing options...
steve.milici Posted May 9, 2017 Share Posted May 9, 2017 You can use the "hmz" command to set the current motor position to zero. Link to comment Share on other sites More sharing options...
Recommended Posts