ST_AxisStatus
This data type contains extensive status information about an axis. The data structure must be updated in each PLC cycle by calling MC_ReadStatus or by calling the action Axis.ReadStatus() (AXIS_REF).
TYPE ST_AxisStatus :
STRUCT
UpdateTaskIndex : BYTE; (* Task-Index of the task that updated this data set *)
UpdateCycleTime : LREAL; (* task cycle time of the task which calls the status function *)
CycleCounter : UDINT; (* PLC cycle counter when this data set updated *)
NcCycleCounter : UDINT; (* NC cycle counter incremented after NC task updated NcToPlc data structures *)
MotionState : MC_AxisStates; (* motion state in the PLCopen state diagram *)
Error : BOOL; (* axis error state *)
ErrorId : UDINT; (* axis error code *)
(* PLCopen motion control statemachine states: *)
ErrorStop : BOOL;
Disabled : BOOL;
Stopping : BOOL;
StandStill : BOOL;
DiscreteMotion : BOOL;
ContinuousMotion : BOOL; (* StateDWord bit 19 *)
SynchronizedMotion : BOOL;
Homing : BOOL;
(* additional status - (PLCopen definition)*)
ConstantVelocity : BOOL; (* StateDWord bit 12 *)
Accelerating : BOOL;
Decelerating : BOOL;
(* Axis.NcToPlc.StateDWord *)
Operational : BOOL; (* StateDWord bit 0 *)
ControlLoopClosed : BOOL; (* StateDWord bit 20 - operational and position control active *)
HasJob : BOOL; (* StateDWord bit 8 *)
HasBeenStopped : BOOL; (* StateDWord bit 7 *)
NewTargetPosition : BOOL; (* StateDWord bit 17 *-* new target position commanded during move *)
InPositionArea : BOOL; (* StateDWord bit 3 *)
InTargetPosition : BOOL; (* StateDWord bit 4 *)
ProtectedMode : BOOL; (* StateDWord bit 5 *)
Homed : BOOL; (* StateDWord bit 1 *)
HomingBusy : BOOL; (* StateDWord bit 11 *)
MotionCommandsLocked : BOOL; (* StateDWord bit 29 *-* stop 'n hold *)
SoftLimitMinExceeded : BOOL; (* StateDWord bit 26 *-* reverse soft travel limit exceeded *)
SoftLimitMaxExceeded : BOOL; (* StateDWord bit 27 *-* forward soft travel limit exceeded *)
Moving : BOOL; (* StateDWord bit 9 or 10 *)
PositiveDirection : BOOL; (* StateDWord bit 9 *)
NegativeDirection : BOOL; (* StateDWord bit 10 *)
NotMoving : BOOL; (* StateDWord bit 2 *)
Compensating : BOOL; (* StateDWord bit 13 *-* superposition - overlayed motion *)
ExtSetPointGenEnabled : BOOL; (* StateDWord bit 14 *)
PhasingActive : BOOL; (* StateDWord bit 15 *)
ExternalLatchValid : BOOL; (* StateDWord bit 16 *)
CamDataQueued : BOOL; (* StateDWord bit 22 *)
CamTableQueued : BOOL; (* StateDWord bit 21 *)
CamScalingPending : BOOL; (* StateDWord bit 23 *)
CmdBuffered : BOOL; (* StateDWord bit 24 *)
PTPmode : BOOL; (* StateDWord bit 25 *)
DriveDeviceError : BOOL; (* StateDWord bit 28 *)
IoDataInvalid : BOOL; (* StateDWord bit 30 *)
ErrorPropagationDelayed : BOOL; (* StateDWord bit 6 *)
DriveLimitActive : BOOL; (* StateDWord bit 18 *)
(* Axis.NcToPlc.CoupleState *)
Coupled : BOOL;
(* axis operation mode feedback from NcToPlc *)
OpMode : ST_AxisOpModes;
NcApplicationRequest : BOOL; (* OpModeDWord bit 23 *)
END_STRUCT
END_TYPE
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86 or x64) | Tc2_MC2 |