MPICommandType

Definition

typedef enum {
  MPICommandTypeINVALID = -1,

  MPICommandTypeASSIGN,
  MPICommandTypeBRANCH,
  MPICommandTypeBRANCH_EVENT,
  MPICommandTypeBRANCH_IO,
  MPICommandTypeCOMPUTE,
  MPICommandTypeCOMPUTE_IO,
  MPICommandTypeCOPY,
  MPICommandTypeDELAY,
  MPICommandTypeEVENT,
  MPICommandTypeMOVE,
  MPICommandTypeWAIT,
  MPICommandTypeWAIT_EVENT,
  MPICommandTypeWAIT_IO,

  MPICommandTypeLAST,
  MPICommandTypeFIRST               = MPICommandTypeINVALID + 1,

  MPICommandTypeBIT_COUNT = sizeof(int) * 8,	/* sizeof(enum) */

  MPICommandTypeREF                 = 0x1 << (MPICommandTypeBIT_COUNT - 1),
  MPICommandTypeDOUBLE              = 0x1 << (MPICommandTypeBIT_COUNT - 2),

  MPICommandTypeMASK                = ~(MPICommandTypeREF | MPICommandTypeDOUBLE),

  MPICommandTypeASSIGN_DOUBLE       = MPICommandTypeASSIGN | MPICommandTypeDOUBLE,

  MPICommandTypeBRANCH_REF          = MPICommandTypeBRANCH | MPICommandTypeREF,
  MPICommandTypeBRANCH_DOUBLE       = MPICommandTypeBRANCH | MPICommandTypeDOUBLE,
  MPICommandTypeBRANCH_DOUBLE_REF   = MPICommandTypeBRANCH_DOUBLE | MPICommandTypeREF,

  MPICommandTypeCOMPUTE_REF         = MPICommandTypeCOMPUTE | MPICommandTypeREF,
  MPICommandTypeCOMPUTE_DOUBLE      = MPICommandTypeCOMPUTE | MPICommandTypeDOUBLE,
  MPICommandTypeCOMPUTE_DOUBLE_REF  = MPICommandTypeCOMPUTE_DOUBLE | MPICommandTypeREF,

  MPICommandTypeWAIT_REF            = MPICommandTypeWAIT | MPICommandTypeREF,
  MPICommandTypeWAIT_DOUBLE         = MPICommandTypeWAIT | MPICommandTypeDOUBLE,
  MPICommandTypeWAIT_DOUBLE_REF     = MPICommandTypeWAIT_DOUBLE | MPICommandTypeREF
} MPICommandType;

Description

MPICommandType is an enumeration of controller commands that can be used in a program sequence. It specifies a single instruction for the controller to execute. The CommandType also defines the command parameters that must be passed to mpiCommandCreate(...). For each MPICommandType there is a corresponding structure in the MPICommandParams{...} union. For example, when the MPICommandTypeASSIGN is specified, the assign{...} structure in MPICommandParams{...} must be filled in to specify the address and value.

Commands must be created with mpiCommandCreate(...) and then added to a sequence using mpiSequenceCommandAppend(...), mpiSequenceCommandInsert(...), or mpiSequenceCommandListSet(...). Then the command sequence can be loaded into the controller with mpiSequenceLoad(...) and started with mpiSequenceStart(...).

Element Description Associated MPICommandParams structure
MPICommandTypeASSIGN Writes a constant value (long or float) into the controller's memory at the specified address. Assign
MPICommandTypeASSIGN_FLOAT These commands assign a value to a particular controller address. MPICommandTypeASSIGN assigns a long value while MPICommandTypeASSIGN_FLOAT assigns a float value.
MPICommandTypeBRANCH These commands branch to a particular command (similar to a goto statement) if a particular comparison evaluates to TRUE. MPICommandTypeBRANCH compares a controller address to a specified constant long value. MPICommandTypeBRANCH_REF compares a controller address to a long value at a specified controller address. branch
MPICommandTypeBRANCH_REF Branch to a particular command if the comparison evaluates to TRUE. Compares a controller address to a long value at a specified controller address.
MPICommandTypeBRANCH_FLOAT Compares a controller address to a specified constant float value.
MPICommandTypeBRANCH_FLOAT_REF Compares a controller address to a float value at a specified controller address.
MPICommandTypeBRANCH_EVENT Branch to a particular command (similar to a goto statement) if a particular event occurs or has occured.
branchEvent
MPICommandTypeBRANCH_IO Branch to a particular command (similar to a goto statement) if a particular I/O state matches a specified condition.
branchIO
MPICommandTypeCOMPUTE These commands perform some computation and place the result at some controller address. MPICommandTypeCOMPUTE performs a computation of some controller address and a constant long value. compute
MPICommandTypeCOMPUTE_REF
MPICommandTypeCOMPUTE_FLOAT Performs a computation of some controller address and a constant float value.
MPICommandTypeCOMPUTE_FLOAT_REF Performs a computation of some controller address and a float value at a specified controller address.
MPICommandTypeCOMPUTE_IO Performs a computation on a set of I/O bits.
computeIO
MPICommandTypeCOPY Copies controller memory from one place to another.
copy
MPICommandTypeDELAY Delays execution of the next command.
delay
MPICommandTypeEVENT Generate an event.
event
MPICommandTypeMOVE Commands a motion action. See MPICommandMotion.
motion
MPICommandTypeWAIT These delays execution of the next command until a particular comparison evaluates to TRUE. MPICommandTypeWAIT compares a controller address to a specified constant long value. MPICommandTypeWAIT_REF Compares a controller address to a long value at a specified controller address. wait
MPICommandTypeWAIT_REF Compares a controller address to a long value at a specified controller address.
MPICommandTypeWAIT_FLOAT Compares a controller address to a specified constant float value.
MPICommandTypeWAIT_FLOAT_REF Compares a controller address to a float value at a specified controller address.
MPICommandTypeWAIT_EVENT Delays execution of the next command until a particular event occurs.
waitEvent
MPICommandTypeWAIT_IO Delays execution of the next command until a particular I/O state matches a specified condition.
waitIO

See Also

MPICommand | MPICommandMotion | MPICommandParams | mpiCommandCreate | mpiCommandType | mpiSequenceCommandAppend | mpiSequenceCommandInsert | mpiSequenceCommandListSet | mpiSequenceLoad | mpiSequenceStart