MPI 04.00 Reference >> mpiMotor
mpiMotorLimitConfigSet
Declaration
mpiMotorLimitConfiSet(MPIMotor motor, MPIMotorLimitType limitType, MPIMotorLimitConfig *limitConfig);
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
mpiMotorLimitConfigSet writes the motor limit configuration for the specified limit type, to the controller.
The controller’s motor limits are safety features to protect the machine when exceeding specifiable limits for position error, torque, position range, hardware limit switches, feedback faults, amplifier faults, and warnings.
motor |
A handle to a motor object. |
---|---|
limitType |
A enumerated value representing one of the dedicated motor limits. |
*limitConfig |
A pointer to a structure containing the configurations for the specified limitType. |
Return Values |
---|
MPIMessageOK |
MPIMessageARG_INVALID |
MPICaptureMessageMOTOR_INVALID |
Sample Code
Example - Configure the feedback fault conditions. MPIMotorLimitConfig motorLimitConfig; /* Get the current limit configuration */ mpiMotorLimitConfigGet(motor, MPIMotorLimitTypeFEEDBACK_FAULT, &motorLimitConfig); /* Configure motor to perform ABORT upon limit */ motorLimitConfig.action = MPIActionABORT; /* Trigger fault from Primary feedback only */ motorLimitConfig.trigger.feedback = MPIMotorFeedbackFaultPRIMARY; /* Set the new limit configuration */ mpiMotorLimitConfigSet(motor, MPIMotorLimitTypeFEEDBACK_FAULT, &motorLimitConfig);
See Also
mpiMotorLimitConfigGet | mpiMotorConfigGet | mpiMotorConfigSet