.

mpiMotorPositionFeedbackOffsetSet

Declaration

mpiMotorPositionFeedbackOffsetSet(MPIMotor       motor,
                                  double         offset)
  Required Header: stdmpi.h

Description

mpiMotorPositionFeedbackOffsetSet stores the value contained in offset in the encoder associated with the Motor object motor.

mpiMotorPositionFeedbackOffsetGet only provides long-term storage for the offset value associated with a particular motor. The stored value does not affect either the behavior of the motor or the position calculations on the axis associated with the motor. But, if you do want to affect the position calculations on the axis, see mpiAxisOriginSet(...).

NOTE: If you are using an S200 drive, it requires an FPGA C0FE0036_0400_02_08 or later.

 
Return Values
MPIMessageOK  
MEIMotorMessagePOSITION_FEEDBACK_OFFSET_UNSUPPORTED  
MEIMotorMessagePOSITION_FEEDBACK_OFFSET_SET_FAILED  

Sample Code

This code retrieves an axis’ current absolute position and stores in the motor’s encoder.

/* creation of axis and motor objects assumed */
double offset;
mpiAxisOriginSet(axis, 0.0);
mpiAxisActualPositionGet(axis, &offset);
mpiMotorPositionFeedbackOffsetSet(motor, offset);

See Also

mpiAxisActualPositionGet | mpiMotorPositionFeedbackOffsetGet

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering