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

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

Advertisement

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

Formatting a string (SPRINT)

Function
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 605)").
Syntax
"<Result_string>"=SPRINT("<Format_string>",<value_1>,<value_2>,...,
<value_n>)
Meaning
SPRINT
"<Format_String>"
< value_1>,< value_2>,...,< value_n>
"<result_string>"
Job Planning
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
:
:
:
Comment
;
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 value, type STRING.
Character string that contains fixed and variable
elements. The variable elements are defined
using the format control character % and a
subsequent format description.
:
Value in the form of a constant or NC variables,
which 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)
Flexible NC programming
1.9 String operations
87

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents