Writing system variables

Description

The function block KRC_WriteSysVar can be used to write system variables.

Writing system variables 1:
Function block KRC_WriteSysVar

Inputs

Parameter

Type

Description

AxisGroupIdx

INT

Index of axis group

  • 1 … 5

ExecuteCmd

BOOL

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

Index

INT

Index of the system variable

  • 1: $ADVANCE

Value1 … Value10

REAL

Value of the system variable

If the system variable is a structure type, up to 10 components of the structure can be written.

bContinue

BOOL

TRUE = write to system variable without advance run stop

Note: Only possible for specific system variables.

BufferMode

INT

Mode in which the statement is executed

  • 0: DIRECT
  • 1: ABORTING
  • 2: BUFFERED

(>>> BufferMode)

Writing system variables 2:

So far, only the system variable $ADVANCE can be written. If required for the customer-specific application, the list of writable system variables can be expanded by KUKA.

Outputs

Parameter

Type

Description

Busy

BOOL

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

Done

BOOL

TRUE = statement has been executed

Aborted

BOOL

TRUE = statement has been aborted

Error

BOOL

TRUE = error in function block

ErrorID

DINT

Error number