MOTION_INSTRUCTION Structure

Each motion instruction has a MOTION_INSTRUCTION structure that contains status information about the instruction.
instruction
A mnemonic and data address defining an operation to be performed by the controller. A rung in a program consists of a set of input and output instructions. The input instructions are evaluated by the controller as being True or False. In turn, the controller sets the output instructions to True or False.
Motion_InstructionStructure
Mnemonic
Data Type
Description
FLAGS
DINT
Use this DINT to access all the status bits for the instruction in one 32-bit value.
For this status bit
Use this bit number
EN
31
DN
29
 ER
28
 PC
26
IP
27
 AC
23
DECEL
01
ACCEL
00
EN
BOOL
The enable bit indicates that the instruction is enabled (the rung-in and rung-out condition is true).
DN
BOOL
The done bit indicates that all calculations and messaging (if any) are complete.
ER
BOOL
The error bit indicates when the instruction is used illegally.
PC
BOOL
The process complete bit indicates that the operation is complete.
The .DN bit sets after an instruction has completed execution. The .PC bit sets when the initiated process has completed.
IP
BOOL
The in process bit indicates that a process is being executed.
AC
BOOL
The Active Bit lets you know which instruction is controlling the motion when you have instructions queued. It sets when the instruction becomes active. It is reset when the Process Complete bit is set or when the instruction is stopped.
ACCEL
BOOL
The .ACCEL bit indicates that the velocity has increased for the individual instruction that it is tied to, that is, jog, move, gearing
DECEL
BOOL
The .DECEL bit indicates that the velocity has decreased for the individual instruction that it is tied to, that is, jog, move, gearing.
TrackingMaster
BOOL
Indicates that the Slave Coordinate System is tracking the Master Axis (only used in Master Driven Mode).
CalculatedDataAvailable
BOOL
Indicates that the requested data has been returned in the Calculated Data array element and that the
Logix Designer
application has updated the output data in the Calculated Data parameter. Only one status bit is used to indicate all Calculated Data is available.
ERR
INT
The error value contains the error code associated with a motion function.
See Motion Error Codes (.ERR) for Motion Instructions.
STATUS
SINT
The status of any message associated with the motion function.
 Message Status
Description
 0x0
The message was successful.
 0x1
The module is processing another message.
 0x2
The module is waiting for a response to a previous message.
 0x3
The response to a message failed.
 0x4
The module is not ready for messaging.
STATE
SINT
The execution status value keeps track of the execution state of a function. Many motion functions have several steps and this value tracks these steps. The execution status is always set to 0 when the controller sets the EN bit for a motion instruction. Other execution states depend on the motion instruction.
SEGMENT
DINT
A segment is the distance from one point up to but, not including the next point. A SEGMENT gives the relative position by segment number as the Cam is executing.
EXERR
SINT
Extended error code - use it for more information about an error.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.