typedef struct MPIUserLimitConditionAxisPosition {
    long              axisNumber;
    double            position;
    MPIUserLimitLogic logic;
} MPIUserLimitConditionAxisPosition;


Required Header: stdmpi.h
Change History: Added in 04.00.


MPIUserLimitConditionAxisPosition represents an axis position condition’s data for a user limit’s trigger.

axisNumber The axis number whose position is used for the trigger condition.
position The position value to which the position will be compared.
logic The logic used to compare the position to the position member.

If logic is MPIUserLimitLogicGT, then the condition will evaluate true when the axis’ position is greater than the position member.

Sample Code

MPI_RESULT         returnValue; 
MPIUserLimit       userLimit;
MPIUserLimitConfig userEventConfig;

/* ... */

returnValue = mpiUserLimitConfigDefault(&userEventConfig);


/* Generate an event */

userEventConfig.generateEvent = TRUE;     

/* Use a single condition */

userEventConfig.trigger.type = MPIUserLimitTriggerTypeSINGLE_CONDITION;

/* Trigger when axis 5's actual position exceeds 300000 */

userEventConfig.trigger.condition[0].type = MPIUserLimitConditionTypeAXIS_ACTUAL_POSITION;
userEventConfig.trigger.condition[0].data.axisActualPosition.axisNumber = 5;
userEventConfig.trigger.condition[0].data.axisActualPosition.position   = 300000;
userEventConfig.trigger.condition[0].data.axisActualPosition.logic      = MPIUserLimitLogicGT;

/* Setup output block:  Set a SynqNet I/O Node's analog output. */

/* Set node 3's analog channel 7 to a value of 1234             */

userEventConfig.output.type = MPIUserLimitOutputTypeSQNODE_ANALOG_OUT;   = 3;      = 7; = 1234;

returnValue = mpiUserLimitConfigSet(userLimit, &userEventConfig); 


See Also

MPIUserLimitConditionData | MPIUserLimitConditionType