MPIEventMotionData

Declaration

typedef struct MPIEventMotionData {
	    int32_t    moveId;
	    int32_t    elementId;
} MPIEventMotionData;

Required Header: stdmpi.h

Change History: Added in 04.00.

Description

MPIEventMotionData holds information about a motion event generated on the controller.

moveId The ID of the executing motion.
elementId The ID of the motion element a motion supervisor was executing when the event occurred.

Sample Code

MPI_RESULT MPI_DECL2
    myMotionEventCallback(MPIControl control, const MPIEventData* status, void* userData)
{
    /* print event information to the screen. */

    printf("%s event occurred at controller sample %d.\n"
           "  Move ID    = %d\n"
           "  Element ID = %d\n",
        mpiEventTypeName(status->eventType),
        status->data.sampleCounter,
        status->data.motion.moveId,
        status->data.motion.elementId);
}

See Also

MPIEventData