.

MPICommandType

Definition

 
typedef enum {
    MPICommandTypeASSIGN,
    MPICommandTypeASSIGN_FLOAT,

    MPICommandTypeBRANCH,
    MPICommandTypeBRANCH_REF,
    MPICommandTypeBRANCH_FLOAT,
    MPICommandTypeBRANCH_FLOAT_REF,
    MPICommandTypeBRANCH_EVENT,
    MPICommandTypeBRANCH_IO,

    MPICommandTypeCOMPUTE,
    MPICommandTypeCOMPUTE_REF,
    MPICommandTypeCOMPUTE_FLOAT,
    MPICommandTypeCOMPUTE_FLOAT_REF,
    MPICommandTypeCOMPUTE_IO,

    MPICommandTypeCOPY,
    MPICommandTypeDELAY,
    MPICommandTypeEVENT,
    MPICommandTypeMOTION,
 
    MPICommandTypeWAIT,
    MPICommandTypeWAIT_REF,
    MPICommandTypeWAIT_FLOAT,
    MPICommandTypeWAIT_FLOAT_REF,
    MPICommandTypeWAIT_EVENT,
    MPICommandTypeWAIT_IO,

} 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
MPICommandTypeMOTION 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

 

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