MPI 04.00 Reference >> mpiMotor
MPIMotorConfig
Definition
typedef struct MPIMotorConfig { MPIMotorType type; /* Event configuration, ordered by MPIMotorLimitType */ MPIMotorLimitConfig limit[MPIMotorLimitTypeCOUNT]; double abortDelay; double enableDelay; MPIMotorBrake brake; char userLabel[MPIObjectLabelCharMAX+1]; /* +1 for NULL terminator */ MPIMotorDemandMode demandMode; MPIMotorFeedback feedback[MPIMotorMAX_FEEDBACKS]; MPIMotorStatusOutput statusOutput; MPIMotorIoConfig io[MPIMotorIoConfigIndexCOUNT]; MPIMotorFaultConfig faultConfig; MPIMotorStepper stepper; MPIMotorCommutationBlockConfig commutation; int32_t commutationTheta; MPIAction nodeFailureAction; MPIAction userFaultAction; /* see MPISqNodeConfigUserFault{} structure */ MPIMotorDisableAction disableAction; } MPIMotorConfig;
Required Header: stdmpi.h
Change History: Modified in 04.00.
Description
type | Enumerated value representing the motor type. |
---|---|
limit[MPIMotorLimitTypeCOUNT] | An array of dedicated limit configuration structures. |
abortDelay | Sets time value, in seconds, to delay Abort action after Event has occured. |
enableDelay | Sets time value, in seconds, to delay Enabling of the amplifier after commanded. |
brake | Configures the dedicated brake logic. For more information, see MPIMotorBrake. |
userLabel | This field consists of 16 characters and is used to label the motot object for user identification purposes. The userLabel field is NOT used by the controller. |
demandMode | The demand mode determines the data type(s) transmitted from the controller to the node for servo control. The default value is automatically configured during SynqNet network initialization, based on the particular node model. The demand mode cannot be changed when the motor’s ampEnable is enabled for safety. For more information, see MPIMotorDemandMode. |
feedback | An array of structures containing the configurations for the primary and secondary position feedback devices. |
StatusOutput | A structure to configure a motor's digital outputs to monitor axis status bits. Requires custom firmware. |
io | An array of motor I/O configuration structures. |
faultConfig | A structure to configure a motor's fault bits. Support for motor fault bits is node/drive specific. |
stepper | Structure to configure Motor Stepper parameters. For more information, see MPIMotorStepper description. |
commutation | A structure to configure controller sinusoidal commutation. This structure is controller specific. For more information, see Sinusoidal Commutation. |
commutationTheta | Place Holder Text |
nodeFailureAction | Action applied to the motor when a Node failure occurs. |
userFaultAction | Action applied to the motor when a User Fault occurs. |
disableAction | Used to configure the controller to set the command position equal to the actual position while the motor is disabled. |
Sample Code
/* A is the scaling numerator, B is the scaling denominator */ int32_t encoderRatio(MPIMotor motor, int32_t A, int32_t B) { MPIMotorConfig config; int32_t returnValue; returnValue = mpiMotorConfigGet(motor, NULL, &config); config.Encoder[0].ratio.A = A; config.Encoder[0].ratio.B = B; if(returnValue == MPIMessageOK) { returnValue = mpiMotorConfigSet(motor, NULL, &config); } return returnValue; }
See Also
mpiMotorConfigGet | mpiMotorConfigSet