long mpiMotorEventNotifySet(MPIMotor     motor,
                            MPIEventMask eventMask,
                            void         *external) 
  Required Header: stdmpi.h


mpiMotorEventNotifySet requests host notification of the event(s) that are generated by motor and specified by eventMask, and also specified by the implementation-specific location pointed to by external (if external is not NULL).

The event notification information in external is in addition to the event notification information in eventmask, i.e, the event notification information in eventmask and in external is not the same information. Note that eventmask or external can be NULL (but not both NULL).

Event notification is enabled for event types specified in eventMask, a bit mask of MPIEventMask bits associated with the desired MPIEventType values. Event notification is disabled for event types that are not specified in eventMask. The MPIEventMask bits must be set of cleared using the MPIEventMask macros.

The mask of event types generated by a Motor object consists of bits from MPIEventMaskMOTION and MPIEventMaskAXIS.


external either points to a structure of type MEIEventNotifyData{} or is NULL. The MEIEventNotifyData{} structure is an array of firmware addresses, whose contents are placed into the MEIEventStatusInfo{} structure (of all events generated by this object).

enable host notification of all events set eventmask to MPIEventMaskALL
disable host notification of all events set eventmask to MPIEventTypeNONE

Return Values

Sample Code


MPIEventMask eventMask;

mpiEventMaskCLEAR( eventMask );
mpiEventMaskALL( eventMask );
meiEventMaskALL( eventMask );

returnValue = mpiMotorEventNotifySet( motor, eventMask, NULL );
msgCHECK( returnValue );

See Also

MPIEventType | MEIEventNotifyData | MEIEventStatusInfo | mpiMotorEventNotifyGet


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