Note
GETVARAP can be used, for example, to implement a checking program that checks the
access rights expected by the application.
Read limit values
Syntax:
<Status>=GETVARLIM(<name>,<limit value>,<result>)
Meaning:
<Status>: Function status
Data type: INT
Range of val‐
ues:
1 OK
-1 No limit value defined
(for variables of type AXIS, STRING, FRAME)
-2 The specified variable name has not been assigned to a
system parameter or a user variable.
-3 Incorrect value for the parameter <limit value>
GETVARLIM: Reading of the lower/upper limit value of a system/user variable
<name>: Name of the system/user variables
Data type: STRING
<limit
value>:
specifies which limit value should be read out
Data type: CHAR
Range of val‐
ues:
"L" Lower limit value
"U"
:
Upper limit value
<result>: Return of the limit value
Data type: VAR REAL
Example:
Program code Comment
DEF INT state=0
DEF REAL result=0
state=GETVARLIM("$MA_MAX_AX_VELO","L",result) ; Determine the lower limit val-
ue for MD32000 $MA_MAX_AX_VELO.
IF (result < 0) GOTOF error
Read dimension value
Syntax:
<Result>=GETVARDIM(<Name>,<Index>)
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 429