Index Determination By Means Of Names (Nametoint) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.10 Kinematic chains
3.10.2

Index determination by means of names (NAMETOINT)

User-specific names are entered in the system variable arrays of type STRING. Based on the
identifier of the system variables and the name, the NAMETOINT() function determines the
index value belonging to the name under which it is stored in the system variable array.
Syntax
<RetVal> = NAMETOINT(<SysVar>,<Name>[,<NoAlarm>])
Meaning
NAMETOINT:
<SysVar>:
<Name>:
<NoAlarm>:
<RetVal>:
Example
Program code
DEF INT INDEX
$NP_PROT_NAME[27]="Cover"
...
INDEX = NAMETOINT("$NP_PROT_NAME","Cover")
724
Determining the system variable index
Name of the system variable array of typeSTRING
Data type:
STRING
Range of val‐
Name of all NC system variable arrays of type STRING
ues:
Character string or name for which the system variable index is to be determined.
Data type:
STRING
Alarm suppression (optional)
Data type:
BOOL
Default value:
FALSE
Value
Meaning
TRUE
In the event of an error, the program processing is not stopped and
no alarm displayed.
Application: User-specific reaction corresponding to the return
value
FALSE
In the event of an error (<RetVal> < 0), program processing is
stopped and an alarm displayed.
System variable index or error message
Data type:
INT
Range of val‐
-1 ≤ x ≤ (max. number of configured components -1)
ues:
Value
Meaning
≥ 0
The sought name has been found under the specified system
variable index.
-1
The sought name has not been found or an error has occurred.
Comment
; INDEX == 27
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents