Declaring interrupts

Description

The function block KRC_DeclareInterrupt declares an interrupt to a digital input. There are 8 predefined interrupts available for this.

An interrupt can be used to stop the robot during the motion. Depending on how the Reaction parameter is configured, the robot brakes gently from high velocities (BRAKE) or as quickly as possible (BRAKE F). The remaining program sequence can be determined using a robot input or a PLC function block.

Declaring interrupts 1:

If a BRAKE statement is active, no more statements are processed via the mxA interface. The function block KRC_Abort is also no longer processed. KRC_Abort cannot cancel the program until it has been resumed with KRC_Continue, i.e. the BRAKE statement is no longer active. While the BRAKE statement is active, the program can only be canceled by means of a RESET of the function block KRC_AutomaticExternal.

Declaring interrupts 2:
Function block KRC_DeclareInterrupt

Inputs

Parameter

Type

Description

AxisGroupIdx

INT

Index of axis group

  • 1 … 5

ExecuteCmd

BOOL

The statement is buffered in the case of a rising edge of the signal.

Interrupt

INT

Number of the interrupt

  • 1 … 8

Note: Number 1 is the interrupt with the highest priority.

Input

INT

Number of the digital input to which the interrupt is declared

  • 1 … 2048

Note: It must be ensured that no inputs are used that are already assigned by the system. Example: $IN[1025] is always TRUE.

InputValue

BOOL

TRUE = statement is executed in the case of a rising edge of the signal.

FALSE = statement is executed in the case of a falling edge of the signal.

Reaction

INT

Reaction to the interrupt

  • 0: Brake fast and wait for the EXT_START parameter of the function block KRC_AutomaticExternal
  • 1: Brake normally and wait for the EXT_START parameter of the function block KRC_AutomaticExternal
  • 2: Brake fast and wait for the Input parameter
  • 3: Brake normally and wait for the Input parameter
  • 4: Brake fast and wait for the edge of the function block KRC_Continue
  • 5: Brake normally and wait for the edge of the function block KRC_Continue
  • 6: Brake fast and wait for the edge of the function block KRC_Continue and the Input parameter
  • 7: Brake normally and wait for the edge of the function block KRC_Continue and the Input parameter

BufferMode

INT

Mode in which the statement is executed

  • 1: ABORTING
  • 2: BUFFERED

(>>> BufferMode)

Outputs

Parameter

Type

Description

Busy

BOOL

TRUE = statement is currently being transferred or has already been transferred

Done

BOOL

TRUE = statement has been processed

Note: The statement can no longer be aborted. Exception: Program is deselected or reset.

Aborted

BOOL

TRUE = statement has been aborted

Error

BOOL

TRUE = error in function block

ErrorID

DINT

Error number