Function BlockMC_ReadAxisErrPLCopen motion icon

Description

The Function BlockClosedA function block groups an algorithm and a set of private data. It has inputs and outputs. MC_ReadAxisErr returns the error status of the specified axis.

MC_ReadAxisErr

Figure 7-132: MC_ReadAxisErr

Arguments

For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules

Input

Enable

Description

requests to read the error status of the axis

 

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 AxisErrorID output is 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

AxisErrorID

Description

Indicates the error status of the axis. Each bit indicates a specific error. Both emergency-stop (E-stop) and controlled-stop (C-stop) errors are indicated. The table below defines the bits of this output.

 

Data type

INT

 

Hexadecimal Decimal Description
0000H 0 No Error
0001H 1 User-set E-stop via MC_EStop, E-stop
0002H 2 Loss of Feedback, E-stop
0004H 4 Drive Fault, E-stop
0008H 8 Drive Communication Failure, E-stop
0400H 1024 Synchronization Error, C-stop
0700H 7192 Drive Overtravel Limit Exceeded, Cstop (see Overtravel Conditions)

  • Multiple errors can be active at the same time. For example, if a User-set E-stop and an Excess Position Error E-stop are both active, the value would be 00000011H (17 decimal).

Example

Structured Text

            (* MC_ReadAxisErr ST example *)
            
Inst_MC_ReadAxisErr( TRUE, Axis1 );
//Inst_MC_ReadAxisErr is an instance of MC_ReadAxisErr function block
AxisErrorBits := Inst_MC_ReadAxisErr.AxisErrorID; //AxisErrorID contains the error bits

Ladder Diagram

MC_ReadAxisErr: LD example

Go back to the top of the page [Top]