Siemens SINUMERIK 840D sl Programming Manual page 462

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

Advertisement

Work preparation
3.1 Flexible NC programming
%.<n>S:
%<m>.<n>S:
%X:
Note
A property of the NC language, where a distinction is not made between uppercase and
lowercase letters for identifiers and keywords, also applies to the format descriptions. As a
consequence, you can program using either lowercase or uppercase letters without any
functional difference.
Combination options
The following table provides information as to which NC data types can be combined with which
format description. The rules regarding implicit data type conversion apply (see "Data types
(Page 423)").
%B
%C
%D
%F
%E
%G
%S
%X
%P
462
Inserting <n> characters of a string (starting with the first character).
Example:
N10 DEF STRING[16] STRING_VAR="ABCDEFG"
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF STRING_VAR:%.3S",STRING_VAR)
Result: The character string "CONTENT OF STRING_VAR:ABC" is written to the
string variable RESULT.
Inserting <n> characters of a string (starting with the first character). The total length
of the generated string has at least <m> characters. The missing places are filled with
spaces.
Example:
N10 DEF STRING[16] STRING_VAR="ABCDEFG"
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF STRING_VAR:%10.5S", STRING_VAR)
Result: The character string "CONTENT OF STRING_VAR:xxxxxABCDE" is written
to the string variable RESULT ("x" in the example represents spaces).
Converting an INTEGER value into a string with the hexadecimal notation.
Example:
N10 DEF INT INT_VAR='HA5B8'
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("INTEGER HEXADECIMAL:%X",INT_VAR)
Result: The character string "INTEGER HEXADECIMAL:A5B8" is written to the string
variable RESULT.
BOOL
CHAR
+
+
-
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
NC data types
INT
REAL
STRING
+
+
-
-
+
+
+
+
+
+
+
+
-
-
+
-
+
+
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
AXIS
FRAME
+
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
NC programming
-
-
-
-
-
-
-
-
-

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents