.

mpiMotorEventConfigGet

Declaration

long mpiMotorEventConfigGet(MPIMotor              motor,
                            MPIEventType          eventType,
                            MPIMotorEventConfig   *src,
                            void                  *external)
  Required Header: stdmpi.h

Description

mpiMotorEventConfigGet gets the Motor's (motor) configuration for the event specified by eventType and writes it into the structure pointed to by eventConfig, and also writes it to the implementation-specific structure pointed to by external (if external is not NULL).

The event configuration information in external is in addition to the event configuration information in eventConfig, i.e, the event configuration information in eventConfig and in external is not the same information.

NOTE: Set eventConfig or external to NULL. One must be NULL, the other must be passed a pointer.

Remarks

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

 
Return Values
MPIMessageOK  

Sample Code


for(index = 0; index < AXIS_COUNT; index++)
  { // turn off error limit and limit switch actions for 
motors 0 to AXIS_COUNT returnValue = mpiMotorEventConfigGet(motor[index], MPIEventTypeLIMIT_ERROR, &eventConfig, NULL); msgCHECK(returnValue); eventConfig.action = MPIActionNONE; returnValue = mpiMotorEventConfigSet(motor[index], MPIEventTypeLIMIT_ERROR, &eventConfig, NULL); msgCHECK(returnValue); returnValue = mpiMotorEventConfigGet(motor[index], MPIEventTypeLIMIT_HW_NEG, &eventConfig, NULL); msgCHECK(returnValue); eventConfig.action = MPIActionNONE; returnValue = mpiMotorEventConfigSet(motor[index], MPIEventTypeLIMIT_HW_NEG, &eventConfig, NULL); msgCHECK(returnValue); returnValue = mpiMotorEventConfigGet(motor[index], MPIEventTypeLIMIT_HW_POS, &eventConfig, NULL); msgCHECK(returnValue); eventConfig.action = MPIActionNONE; returnValue = mpiMotorEventConfigSet(motor[index], MPIEventTypeLIMIT_HW_POS, &eventConfig, NULL); msgCHECK(returnValue); }

See Also

MEIMotorEventConfig | mpiMotorEventConfigSet | Error Limit and Limit Switch Errors

 

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