Siemens Sinumerik 840D sl Programming Manual page 91

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

Advertisement

%<m>.<n>S:
%X:
Note
A property of the NC language, where a distinction is not made between upper case and
lower case letters for identifiers and keywords, also applies to the format descriptions. As a
consequence, you can program using either lower case or upper case 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 55]").
BOOL
CHAR
%B
+
%C
-
%D
+
%F
-
%E
-
%G
-
%S
-
%X
+
%P
-
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
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.
NC data types
INT
REAL
+
+
+
-
+
+
-
+
-
+
-
+
+
-
+
+
-
+
STRING
AXIS
+
+
-
+
+
-
+
-
+
-
+
-
-
+
-
-
+
-
Flexible NC programming
1.9 String operations
FRAME
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
91

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents