MPIMotorConfig / MEIMotorConfig

Definition: MPIMotorConfig

typedef struct MPIMotorConfig {
    MPIMotorType     type;

    /* Event configuration, ordered by MPIEventType */
    MPIMotorEventConfig    event[MPIEventTypeMOTOR_LAST];

    float           abortDelay;
    float           enableDelay;
    MPIMotorBrake   brake;

    MPIObjectMap    filterMap;

} MPIMotorConfig;


event Structure to configure various Motor Events. See MPIMotorEventConfig description.
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. See MPIMotorBrake.
filterMap Get/Set a map of Filter Objects to which the Motor is mapped. Default mapping is Filter 0 to Motor 0, Filter 1 to Motor 1, etc. See also MPIObjectMap description in Object section.


Definition: MEIMotorConfig

typedef struct MEIMotorConfig {
    char                    userLabel[MEIObjectLabelCharMAX+1]; 
                              /* +1 for NULL terminator */
    MEIMotorDemandMode      demandMode;
    MEIMotorEncoder         Encoder[MEIXmpMotorEncoders];
    MEIMotorStatusOutput    StatusOutput;

    MEIMotorIoConfig        Io[MEIMotorIoConfigIndexLAST];
    MEIMotorFaultConfig     faultConfig;

    MEIMotorStepper         Stepper;
    MEIMotorDacConfig       Dac;

    MEIXmpCommutationBlock  Commutation; 
/* read-only from field Theta to end */ MEIXmpLimitData Limit[MEIXmpLimitLAST]; MPIAction nodeFailureAction; MPIAction userFaultAction;
/* see MEISqNodeConfigUserFault{} structure */ MEIMotorDisableAction disableAction; } MEIMotorConfig;

Required Header: stdmei.h
Change History: Modified in the 03.04.00. Modified in the 03.03.00.


MEIMotorConfig contains configurations for the motor.

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. 

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.

See MEIMotorDemandMode description.

Encoder Structure to configure Motor Encoder type and parameters.
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. See MEIMotorStepper description.
Dac Structure that includes Command and Auxiliary DAC configuration for each motor. See MEIMotorDacConfig description.

A structure to configure controller sinusoidal commutation. This structure is controller specific. Please see Sinusoidal Commutation for more details.


Structure used to configure custom motor limits and events. See User Limits for more information.


Action applied to the motor when a Node failure occurs.


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 */
long encoderRatio(MPIMotor motor, long A, long B)
    MEIMotorConfig  config;
    long            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


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