.

mpiMotorStatus / meiMotorStatus

Declaration: mpiMotorStatus

long mpiMotorStatus(MPIMotor    motor,
                    MPIStatus   *status,
                    void        *external) 
  Required Header: stdmpi.h

Description

mpiMotorStatus writes a Motor's (motor) status into the structure pointed to by status, and also into the implementation-specific structure pointed to by external (if external is not NULL).

The motor's status information in external is in addition to the motor's status information in status, i.e, the status configuration information in status and in external is not the same information. Note that external can be NULL (but status must not be NULL).

Remarks

external either points to a structure of type MEIMotorStatus{...} or is NULL.

 
motor a handle to the Motor object
*status a pointer to the motor status structure returned by the method
*external a pointer to an implementation-specific structure
   
 
Return Values
MPIMessageOK  
MPIMessageARG_INVALID  

 

Declaration: meiMotorStatus

long meiMotorStatus(MPIControl   control,
                    long         motorNumber,
                    MPIStatus    *status,
                    void         *external) 
  Required Header: stdmei.h

Description

meiMotorStatus gets a Motor's status and writes it to the structure pointed to by status, and also writes it into the implementation-specific structure pointed to by external (if external is not NULL).

The motor's status information in external is in addition to the motor's status information in status, i.e, the status configuration information in status and in external is not the same information. Note that external can be NULL (but status must not be NULL).

Remarks

external either points to a structure of type MEIMotorStatus{...} or is NULL.

 
control a handle to the Control object
motorNumber index to the motor
*status a pointer to the motor status structure returned by the method
*external pointer to an implementation-specific structure
   
 
Return Values
MPIMessageOK if MotorStatus successfully gets the status of a Motor object.
MPIMessageARG_INVALID if the status pointer is NULL.

Sample Code

void readDACOutputs(MPIMotor motor)
{
long returnValue;
MPIStatus status;
MEIMotorStatus motorStatus; returnValue = mpiMotorStatus(motor, &status, &motorStatus); msgCHECK(returnValue); printf("Output CMD = %.4f\n", motorStatus.dac.cmd.level); printf("Output AUX = %.4f\n", motorStatus.dac.aux.level); }

See Also

MPIStatus | MEIMotorStatus

 

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