MPIUserLimitConditionType

Declaration

typedef enum MPIUserLimitConditionType {
    MPIUserLimitConditionTypeINVALID = -1,

    MPIUserLimitConditionTypeNONE,

	MPIUserLimitConditionTypeGATE,
	MPIUserLimitConditionTypeMOTOR_DEDICATED_IN,
	MPIUserLimitConditionTypeMOTOR_DEDICATED_OUT,
	MPIUserLimitConditionTypeMOTOR_GENERAL_IN,
	MPIUserLimitConditionTypeMOTOR_GENERAL_OUT,
	MPIUserLimitConditionTypeAXIS_COMMAND_POSITION,
	MPIUserLimitConditionTypeAXIS_COMMAND_VELOCITY,
	MPIUserLimitConditionTypeAXIS_ACTUAL_POSITION,
	MPIUserLimitConditionTypeAXIS_ACTUAL_VELOCITY,
	MPIUserLimitConditionTypeAXIS_POSITION_ERROR,
	MPIUserLimitConditionTypeCONTROL_DIGITAL_IN,
	MPIUserLimitConditionTypeCONTROL_DIGITAL_OUT,
	MPIUserLimitConditionTypeDRIVE_MONITOR,
	MPIUserLimitConditionTypeSQNODE_DIGITAL_IN,
	MPIUserLimitConditionTypeSQNODE_DIGITAL_OUT,
	MPIUserLimitConditionTypeSQNODE_ANALOG_IN,
	MPIUserLimitConditionTypeSQNODE_ANALOG_OUT,
	MPIUserLimitConditionTypeUSER_BUFFER,
	MPIUserLimitConditionTypeUSER_LIMIT,
	MPIUserLimitConditionTypeFILTER_OUTPUT,
	MPIUserLimitConditionTypeCAPTURE_STATE,
	MPIUserLimitConditionTypeCUSTOM,
	MPIUserLimitConditionTypeMOTION_STATUS,
	MPIUserLimitConditionTypeAXIS_STATUS,
	MPIUserLimitConditionTypeAXIS_MOVEID,

	MPIUserLimitConditionTypeEND,
	MPIUserLimitConditionTypeFIRST = MPIUserLimitConditionTypeINVALID + 1,
	MPIUserLimitConditionTypeCOUNT = MPIUserLimitConditionTypeEND - MPIUserLimitConditionTypeFIRST
} MPIUserLimitConditionType;

 

Required Header: stdmpi.h

Change History: Added in 04.00.

Description

MPIUserLimitConditionType represents a user limit’s condition type.

Member (MPIUserLimitConditionType...)
Condition Triggers Off Of...
none The default condition. The condition will not evaluate true.
gate Controller gates.
dedicatedIn Motor dedicated digital inputs.
dedicatedOut Motor dedicated digital outputs.
gerneralIn Motor general-purpose digital inputs.
generalOut Motor general-purpose digital outputs.
commandPosition An axis’ command position.
commandVelocity An axis’ command velocity.
actualPosition An axis’ actual position.
actualVelocity An axis’ command velocity.
positionError An axis’ position error.
controlDigitalIn A user buffer value.
controlDigitalOut A motor limit’s state.
driveMonitor A SynqNet drive monitor.
sqNodeDigitalIn A SynqNet node’s digital inputs.
sqNodeDigitalOut A SynqNet node’s digital outputs.
sqNodeAnalogIn A SynqNet node’s analog inputs
sqNodeAnalogOut A SynqNet node’s analog outputs
userLimit A user limit’s state.
filterOutput The filter object’s output (Usually requested torque).
captureState A capture object’s state.
custom A custom limit.
motionStatus A motion supervisor's status.
axisStatus An axis' status.
axisMoveID An axis' moveID.

Sample Code

MPI_RESULT         returnValue; 
MPIUserLimit       userLimit;
MPIUserLimitConfig userEventConfig;

    /* ... */

returnValue = mpiUserLimitConfigDefault(&userEventConfig);

msgCHECK(returnValue);

/* 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;
userEventConfig.output.data.sqNodeAnalogOut.nodeNumber   = 3;
userEventConfig.output.data.sqNodeAnalogOut.channel      = 7;
userEventConfig.output.data.sqNodeAnalogOut.newValue.i16 = 1234;

returnValue = mpiUserLimitConfigSet(userLimit, &userEventConfig); 

msgCHECK(returnValue);

See Also

MPIUserLimitTrigger | MPIUserLimitConditionData