Formatting A String (Sprint) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

Program code
EXTERN UP_VAL(ACHSE)
EXTERN UP_REF(VAR ACHSE)
...
UP_VAL(STRG[6])
...
CHR = STRG[6]
UP_REF(CHR)
3.1.4.9

Formatting a string (SPRINT)

Using the pre-defined SPRINT function, character strings can be formatted and e.g. prepared
for output on external devices (also see "Process DataShare - Output to an external device/file
(EXTOPEN, WRITE, EXTCLOSE): (Page 997)").
Syntax
"<Result_string>"=SPRINT("<Format_string>",<value_1>,<value_2>,...,
<value_n>)
Meaning
SPRINT:
"<Format_String>":
< value_1>,< value_2>,...,< value_n>: Value in the form of a constant or NC variables, which
"<result_string>":
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
3.1 Flexible NC programming
Comment
; Definition of subprogram with "call
by value" parameters
; Definition of subprogram with "call
by reference" parameters
; Parameter transfer "by value"
; Buffer
; Parameter transfer "by reference"
Identifier for a pre-defined function that supplies a val‐
ue, type STRING.
Character string that contains fixed and variable ele‐
ments. The variable elements are defined using the
format control character % and a subsequent format
description.
is inserted at the location where the nth format control
character % is located, corresponding to the format
description in the <format_string>.
Formatted character string (maximum 400 bytes)
Work preparation
455

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents