Function BlockMC_ReadStatusPLCopen motion icon

Description

The function block MC_ReadStatus returns the state of the specified axis.

MC_ReadStatus

Figure 7-128: MC_ReadStatus

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

AXIS_REF

 

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

See table in PLCopen Function Block ErrorID Output

 

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

HomingClosedThe Homing procedure allows, based on a position measurement, to set a position offset to the motor in order to ensure it is physically at the home position

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

MC_ReadStatus: LD example

Go back to the top of the page [Top]