.

MEIEventStatusInfo

Definition

 
typedef struct MEIEventStatusInfo {
    union {
        MPIHandle  handle;  /* generic */
        MPIAxis    axis;    /* MEIEventTypeAXIS_FIRST ... 
                               MEIEventTypeAXIS_LAST - 1 */
        long       node;    /* MEIEventTypeCAN_FIRST... 
                               MEIEventTypeCAN_LAST - 1  */
        long       number;  /* MPIEventTypeMOTION 
MPIEventTypeMOTOR_FIRST... MPIEventTypeMOTOR_LAST - 1 MEIEventTypeMOTOR_FIRST ... MEIEventTypeMOTOR_LAST - 1 */
long value; /* MPIEventTypeEXTERNAL */ } type; MEIXmpSignalID signalID; /* Contents of addresses specified by MEIEventNotifyData{} */ union { long sampleCounter; struct { long sampleCounter; } motion; struct { long sampleCounter; long positionError; MEIInt64 actualPosition; MEIInt64 commandPosition; } axis; struct { /* Data associated with the CAN event. */ long data[4]; } can; struct { long sampleCounter; long dedicatedIn; MEIInt64 encoderPosition; } motor; long word[MEIXmpSignalUserData]; } data; } MEIEventStatusInfo;
  Change History: Modified in the 03.04.00.

Description

MEIEventStatusInfo is an information structure that tells the XMP what the data in MPIEventStatus.info holds. The information that is returned by this structure is only valid if the default configurations for the recorder are used.

 
type A union that specifies the object handle, motion number, or external ID value that generated the event
type.handle A generic object handle. Used by MPIRecorder and MPIMotor events
type.axis An axis object handle. Used by MPIAxis events
type.node The CAN Node number of the MEICan object that generated the event.
type.number The motion number of the MPIMotion object that generated the event
type.value An ID value used to identify what external source or MPISequence event was generated
signalID Specifies what type of object actually generated the event
data A union that contains extra data about the event that was generated
data.sampleCounter The value of the sampleCounter when the event was generated
data.motion A union that contains extra data about the motion event that was generated
data.motion.sampleCounter The value of the sampleCounter when the motion event was generated
data.axis A union that contains extra data about the axis event that was generated
data.axis.sampleCounter The value of the sampleCounter when the axis.event was generated
data.axis.positionError The value of the axis' position error when the axis event was generated. Data is represented as a float.
data.axis.actualPosition The value of the axis' actual position when the event was generated
data.axis.commandPosition The value of the axis' command position when the axis event was generated
data.can.data A union that contains extra data about the CAN event that was generated.
data.motor A union that contains extra data about the motor event that was generated
data.motor.sampleCounter The value of the sampleCounter when the motor event was generated
data.motor.dedicatedIn The value of the motor’s dedicatedIn word when the motor event was generated
data.motor.encoderPosition The value of the motor's ecoder position when the event was generated
data.word[] The extra data about the event that was generated formatted as an array of long values

Sample Code


        MPINotify      notify
        MPIEventStatus eventStatus;

        . . .

        /* Wait for event */
        returnValue =
            mpiNotifyEventWait(notify,
                                         &eventStatus,
                                          MPIWaitFOREVER);
        msgCHECK(returnValue);

        if (eventStatus.type == MPIEventTypeMOTION_DONE) {
            MEIEventStatusInfo *info;

            info = (MEIEventStatusInfo *)eventStatus.info;

            . . .
        }

See Also

MPIEventStatus | MPIAxis

 

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