MC_ReadStatus

PLCopen motion icon

 Function Block - Returns the state of the specified axis.

Inputs

Input

Data Type

Range

Unit

Default

Description

Enable

BOOL

FALSE, TRUE

N/A

No default

Request to read and return the axis status.

Axis

AXIS_REF

1 to 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Outputs

Output

Data Type

Range

Unit

Description

Valid

BOOL

FALSE, TRUE

N/A

Indicates the outputs are valid.

Busy

BOOL

FALSE, TRUE

N/A

Indicates this function block is executing.

Error

BOOL

FALSE, TRUE

N/A

Indicates an invalid input was specified.

ErrorID

INT

-32768 to +32767

 

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs.

ErrorStop

BOOL

FALSE, TRUE

N/A

Indicates Error Stop state.

Either E-stop or C-stop.

Disabled

BOOL

FALSE, TRUE

N/A

Indicates Disabled state.

Open loop and drive is disabled.

Stopping

BOOL

FALSE, TRUE

N/A

Indicates Stopping state.

MC_Stop command.

StandStill

BOOL

FALSE, TRUE

N/A

Indicates Stand Still state.

No move, closed loop, drive enabled.

DiscreteMotion

BOOL

FALSE, TRUE

N/A

Indicates Discrete Motion state.

Pprogrammed endpoint move is active.

ContinuousMotion

BOOL

FALSE, TRUE

N/A

Indicates Continuous Motion state.

Unending, single-axis move is active.

SynchronizedMotion

BOOL

FALSE, TRUE

N/A

Indicates Synchronized Motion state

Slave move is active.

Homing

BOOL

FALSE, TRUE

N/A

Indicates Homing state.

A homing cycle is currently executing.

ConstantVelocity

BOOL

FALSE, TRUE

N/A

Indicates the axis is moving at a constant velocity.

Accelerating

BOOL

FALSE, TRUE

N/A

Indicates the axis is accelerating.

Decelerating

BOOL

FALSE, TRUE

N/A

Indicates the axis is decelerating.

Remarks

See Function Blocks - General Rules about how inputs and outputs work.

Figure 1: MC_ReadStatus

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

            (* 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