Siemens SINUMERIK 840D sl Programming Manual page 60

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Flexible NC programming
1.1 Variables
Example:
Program code
DEF INT state=0
DEF REAL resultR=0
DEF FRAME resultF=0
IF (GETVARTYP("$MA_MAX_AX_VELO") <> 4) GOTOF error
state=GETVARDFT("$MA_MAX_AX_VELO", resultR, AXTOINT(X))
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>)
Meaning:
<result>
GETVARTYP
<name>
60
:
Data type of the specified system/user variables
Data type:
Range of
values:
:
Reading of the data type of a system/user variable
:
Name of the system/user variables
Data type:
INT
1
= BOOL
2
= CHAR
3
= INT
4
= REAL
5
= STRING
6
= AXIS
7
= FRAME
In case of fault
< 0
The specified
<name>
parameter or a user variable.
STRING
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
Comment
; Variable to accept the default
values of the types INT, REAL,
BOOL, AXIS.
; Variable to accept the default
values of the type FRAME
; Determine the default value of
the "X" axis.
; AXTOINT converts the axis name
"X" to the appropriate access
index.
has not been assigned to a system
Job Planning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents