.

mpiMotorFeedback

Declaration

long mpiMotorFeedback(MPIMotor           motor,
                      MPIMotorFeedback   *feedback)
  Required Header: stdmpi.h

Description

mpiMotorFeedback gets the feedback position of a Motor (motor) and writes it into the location pointed to by feedback.

 
Return Values
MPIMessageOK  

Sample Code


/* Display both primary and secondary feedback value */
void displayMotorFeedback(MPIMotor motor)
{
   MPIMotorFeedback  feedback;
   long              returnValue;

   /* Get motor’s feedback position and write it to feedback */
   returnValue = mpiMotorFeedback(motor, &feedback);
   msgCHECK(returnValue);

   /* Print out primary and secondary feedback */
   printf("Primary feedback value %lf\n", 
           feedback[MPIMotorEncoderPRIMARY]);
   printf("Secondary feedback value %lf\n", 
           feedback[MPIMotorEncoderSECONDARY]);
}

See Also

 

 

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