MPIMotorEventConfig / MEIMotorEventConfig

MPIMotorEventConfig

 

typedef struct MPIMotorEventConfig {
    MPIAction		  action;
    MPIMotorEventTrigger  trigger;
    long		  direction;
    float		  duration;	/* seconds */
} MPIMotorEventConfig;
Description

MotorEventConfig is a structure used to configure Motor Events.

  direction for Hardware and Software limits, enabling "direction" requires the direction of motion to be in direction of Limit.
  duration time that Limit (e.g. Home, Pos. and Neg. Limits, User Limit) must be asserted before Event is generated. Value in seconds.


MEIMotorEventConfig

 

typedef MEIXmpLimitData	MEIMotorEventConfig;
typedef struct {
    MEIXmpLimitCondition    Condition[MEIXmpLimitConditions];
    MEIXmpStatus            Status;
    MEIXmpLogic             Logic;
    MEIXmpLimitOutput       Output;
    long                    Count;
    long                    State;
} MEIXmpLimitData;
Description
  condition is a structure that configures the conditioanl statements evaluated to generate a Limit Event. Each limit may have up to two conditions (MEIXmpLimitConditions = 2). This structure is described in further detail in App Note 215.
  status an enum that defines what actions the XMP will take when a user limit evaluates TRUE. Always set Status to at least MEIXmpStatusLIMIT to notify the motor object that a limit has occurred. Valid Status values are listed in the "Values of Status" table below.
  logic an enum that sets the logic applied between the two condition block outputs, Condition[0] and Condition[1]. Valid Logic values are listed in the "Values of Status" table below.
  output is a structure that allows specific action to be taken when the Limit Event is generated. In addition to generatign a Motion Action, a Limit can write to any other valid XMP Firmware register defined in the *OutputPtr with value described by AndMask and OrMask. This structure is described in further detail in App Note 215.
  count For internal use only. The MPI method, mpiMotorEventConfigSet(...) will not write these values.
  state For internal use only. The MPI method, mpiMotorEventConfigSet(...) will not write these values.
     
  Value of Status Action to be taken
  MEIXmpStatusLIMIT None
  MEIXmpStatusLIMIT | MEIXmpStatusPAUSE Axes attached to the motor will be Paused
  MEIXmpStatusLIMIT | MEIXmpStatusSTOP Axes attached to the motor will be Stopped
  MEIXmpStatusLIMIT | MEIXmpStatusABORT Axes attached to the motor will be Aborted
  MEIXmpStatusLIMIT | MEIXmpStatusESTOP Axes attached to the motor will be E-Stopped
  MEIXmpStatusLIMIT | MEIXmpStatusESTOP_ABORT Axes attached to the motor will be E-Stopped and Aborted
     
  Value of Logic Evaluates Motor object notified that a limit has occurred if...
  MEIXmpLogicNEVER Nothing No event is generated
  MEIXmpLogicSINGLE Condition[0] Condition[0] = = TRUE
  MEIXmpLogicOR Condition[0], Condition[1] (Condition[0] || Condition[1]) = = TRUE
  MEIXmpLogicAND Condition[0], Condition[1] (Condition[0] && Condition[1]) = = TRUE
  other MEIXmpLogic enums For internal use only.  
       
 
See Also Special Note: MPIMotorEventConfig and Motor Limit Configuration
See App Note 215 for a more in-depth breakdown of this structure.
mpiMotorEventConfigGet | mpiMotorEventConfigSet