MPI 04.00 Reference >> mpiMotor
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 | |
MPIMotorMessagePOSITION_FEEDBACK_OFFSET_UNSUPPORTED | |
MPIMotorMessagePOSITION_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); mpiMotorPositionFeedbackOffsetGet(motor, offset);
See Also
mpiAxisActualPositionGet | mpiMotorPositionFeedbackOffsetGet