MC_ReadStatus
Description
-
- This function or function block returns cached data. See Programming a Dual Core Controller for more information.
Arguments
For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules
Input
Enable |
Description |
Requests to read and return the axis status |
Data type |
BOOL |
|
Range |
0, 1 |
|
Unit |
n/a |
|
Default |
— |
|
Axis |
Description |
Name of a declared instance of the AXIS_REF library function. For more details,About Axis Name and Number |
Data type |
||
Range |
[1,256] |
|
Unit |
n/a |
|
Default |
— |
Output
Valid |
Description |
Indicates the outputs are valid |
Data type |
BOOL |
|
Busy |
Description |
Indicates this function block is executing |
Data type |
BOOL |
|
Error |
Description |
Indicates an invalid input |
Data type |
BOOL |
|
ErrorID |
Description |
Indicates the error if Error output is set to TRUE
|
Data type |
INT |
|
ErrorStop |
Description |
Indicates Error Stop state – E-stop or C-stop |
Data type |
BOOL |
|
Disabled |
Description |
Indicates Disabled state – open loop and drive is disabled |
Data type |
BOOL |
|
Stopping |
Description |
Indicates Stopping state – MC_Stop command |
Data type |
BOOL |
|
StandStill |
Description |
Indicates Stand Still state – no move, closed loop, drive enabled |
Data type |
BOOL |
|
DiscreteMotion |
Description |
Indicates Discrete Motion state – programmed endpoint move is active |
Data type |
BOOL |
|
ContinuousMotion |
Description |
Indicates Continuous Motion state – unending, single-axis move is active |
Data type |
BOOL |
|
SynchronizedMotion |
Description |
Indicates Synchronized Motion state – slave move is active |
Data type |
BOOL |
|
Description |
Indicates Homing state – a homing cycle is currently executing |
|
Data type |
BOOL |
|
ConstantVelocity |
Description |
Indicates the axis is moving at a constant velocity |
Data type |
BOOL |
|
Accelerating |
Description |
Indicates the axis is accelerating |
Data type |
BOOL |
|
Decelerating |
Description |
Indicates the axis is decelerating |
Data type |
BOOL |
Example
Structured Text
(* MC_ReadStatus ST example *)
Inst_MC_ReadStatus( EnableRead, Axis1 );
//Inst_MC_ReadStatus is an instance of MC_ReadStatus function block
AxisStopping := Inst_MC_ReadStatus.Stopping; // store Stopping output to a user defined variable
AxisAccelerating := Inst_MC_ReadStatus.Accelerating; // store Accelerating output to a user defined variable
Ladder Diagram