Siemens SINUMERIK 840D sl Programming Manual page 457

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

Advertisement

%<m>F:
%.<n>F:
%<m>.<n>F:
%E:
%<m>E:
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
Conversion into a string with a decimal number with 6 decimal places and a total
length of at least <m> characters. Where relevant, the decimal places are rounded-off
or filled with 0. Missing characters are filled up to the total length <m> using spaces,
left-justified.
Example:
N10 DEF REAL REAL_VAR=-1.23412345678EX+03
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF REAL_VAR:%15F",REAL_VAR)
Result: The string variable RESULT is written with the character string "CONTENT
OF REAL_VAR: xxx-1234.123457" (where "x" is a placeholder for space).
Conversion into a string with a decimal number with <n> decimal places. Where
relevant, the decimal places are rounded-off or filled with 0.
Example:
N10 DEF REAL REAL_VAR=-1.2345678EX+03
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF REAL_VAR:%.3F",REAL_VAR)
Result: The character string "CONTENT OF REAL_VAR:-1234.568" is written to the
string variable RESULT.
Conversion into a string with a decimal number with <n> decimal places and a total
length of at least <m> characters. Where relevant, the decimal places are rounded-off
or filled with 0. Missing characters are filled up to the total length <m> using spaces,
left-justified.
Example:
N10 DEF REAL REAL_VAR=-1.2341234567890EX+03
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF REAL_VAR:%10.2F",REAL_VAR)
Result: The character string "CONTENT OF REAL_VAR:xx-1234.12" is written to the
string variable RESULT ("x" in the example represents spaces).
Conversion into a string with a decimal number in the exponential representation. The
mantissa is saved, normalized with one pre-decimal place and 6 decimal places.
Where relevant, the decimal places are rounded-off or filled with 0. The exponent
starts with the keyword "EX". It is followed by the sign ("+" or "-") and a two or three-
digit number.
Example:
N10 DEF REAL REAL_VAR=-1234.567890
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF REAL_VAR:%E",REAL_VAR)
Result: The character string "CONTENT OF REAL_VAR:-1.234568EX+03" is written
to the string variable RESULT.
Conversion into a string with a decimal number in the exponential representation and
a total length of at least <m> characters. The missing characters are filled with
spaces, left-justified. The mantissa is saved, normalized with one pre-decimal place
and 6 decimal places. Where relevant, the decimal places are rounded-off or filled
with 0. The exponent starts with the keyword "EX". It is followed by the sign ("+" or "-")
and a two or three-digit number.
Example:
N10 DEF REAL REAL_VAR=-1234.5
N20 DEF STRING[80] RESULT
N30 RESULT=SPRINT("CONTENT OF REAL_VAR:%20E",REAL_VAR)
Result: The character string "CONTENT OF REAL_VAR:xxxxxx-1.234500EX+03" is
written to the string variable RESULT ("x" in the example represents spaces).
Work preparation
3.1 Flexible NC programming
457

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents