MC_ReadAxisErr

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Returns the error status of the specified axis.

Inputs

Input

Data Type

Range

Unit

Default

Description

Enable

BOOL

0, 1

N/A

No default

Request to read the error status of the axis.

Axis

AXIS_REF

1, 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

 

 

Indicates the AxisErrorID output is valid.

Busy

BOOL

 

 

Indicates this function block is executing.

Error

BOOL

 

 

Indicates an invalid input was specified.

ErrorID

INT

 

 

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs for more information.

AxisErrorID

INT

 

 

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 Output Bits table defines the bits of this output.

Remarks

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

Output Bits

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.
    Example: If a User-set E-stop and an Excess Position Error E-stop are both active, the value is 00000011H (17 decimal).

MC_ReadAxisErr

Figure 6-216: MC_ReadAxisErr

FBD Language Example

Not available.

FFLD Language Example

MC_ReadAxisErr: LD example

IL Language Example

Not available.

ST Language Example

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