. |
Using mpiMotorConfigSet with Absolute Encoders All absolute encoder configuration through the MPI is made using mpiMotorConfigSet(...) calls. The below sample code demonstrates the correct way to configure the XMP for Yaskawa absolute encoders. When using a motor's User Output:
When using a motor's Transceiver Output:
In the above sample code, the steps for configuration are:
Once configured, the initialization of all axes associated with the motors having absolute encoders is automatic at power up or reset. The SEN line is toggled and the origin and command position are calculated and set from the absolute data sent by the drive. IMPORTANT NOTE: The drive must be powered but should not be enabled. Determining the countPerRev Parameter The magnitude countsPerRev parameter is detemined by the number of encoder counts (after quadrature) for one revolution of the motor. The sign of the countsPerRev is derimined by the direction for positive rotation for the motor. For Yaskawa drives this is determined by the drive parameter P000.0. P000.0 = 0 ("Standard Rotation", factory default setting) will cause the motor to move in a counter-clockwise (CCW) direction for positive increases in encoder counts. For Standard Rotation (Pn000.0 = 0) the countPerRev parameter should be positive. P000.0 = 1 ("Reverse Rotation") will cause the motor to move in a clockwise (CCW) direction for positive increases in encoder counts. For Reverse Rotation the countsPerRev parameter should be negative. For example the following code would be used for a drive congfigured for Standard Rotation where the number of counts for one revolution of the motor shaft is 8,192: If the same drive were configured for Reverse Rotation the code would be: For both Standard and Reverse Rotation the encoderPhase parameter should be TRUE (encoder reversed). Return to mpiMotorConfigSet
|
| | Copyright © 2001-2021 Motion Engineering |