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 loopA positioning technique, typically utilizing stepper motors, in which the controller issues a sequence of commands to the motor without an absolute means of detecting if the move has been made. When the load and move velocity and acceleration are appropriately defined, open loop positioning is capable of extended operation without losing steps. 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 loopThe use of feedback devices (encoders, resolvers, interferometers, etc.) to allow a motor to position a user payload accurately., 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