<name>: Name of the system/user variables
Data type: STRING
<result>: Return of the default value
Data type: VAR REAL
(when reading the default value of variables of the types INT, RE‐
AL, BOOL, AXIS)
VAR STRING
(when reading the default value of variables of the types STRING
and CHAR)
VAR FRAME
(when reading the default value of variables of the type FRAME)
<index_1>: Index for first dimension of the field (optional)
Data type: INT
Not programmed means = 0
<index_2>: Index for 2nd dimension of the field (optional)
Data type: INT
Not programmed means = 0
<index_3>: Index for third dimension of the field (optional)
Data type: INT
Not programmed means = 0
Example:
Program code Comment
DEF INT state=0
DEF REAL resultR=0 ; Variable to accept the default values of
the types INT, REAL, BOOL, AXIS.
DEF FRAME resultF=0 ; Variable to accept the default values of
the type FRAME
IF (GETVARTYP("$MA_MAX_AX_VELO") <> 4) GOTOF error
state=GETVARDFT("$MA_MAX_AX_VELO",resultR, AXTOINT(X)) ; Determine the default value of the "X"
axis.
IF (result < 0) GOTOF error
IF (GETVARTYP("$TC_TP8") <> 3) GOTOF error
state=GETVARDFT("$TC_TP8", resultR)
IF (GETVARTYP("$P_UBFR") <> 7) GOTOF error
state=GETVARDFT("$P_UBFR", resultF )
Read data type
Syntax:
<Result>=GETVARTYP(<name>)
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 431