While/Until Loops - Siemens SINUMERIK 828D Commissioning Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Formatting identifi‐
ers:
Example
DEF VAR1
DEF VAR2
LOAD
VAR1 = 123
VAR2 = FORMAT("Hello %08b %.2f %s!", VAR1 + 1, 987.654321, "world")
END_LOAD
See also
Use of strings (Page 80)
6.3.37

WHILE/UNTIL loops

Description
A loop can be implemented with the DO LOOP commands. Depending on the configuration,
it is run through as long as a condition is satisfied (WHILE) or until a condition occurs (UNTIL).
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3
Syntax
%[Flags] [Width] [.decimal places] type
Flags
Optional character for defining output formatting:
● Right-justified or left-justified ("-") for left-justified
● Add leading zeros ("0")
● default: Fill in with blanks if the value to be output has
fewer positions than specified with [Width].
Width
The argument defines the minimum output width for a non-
negative number. If the value has fewer positions than
specified by the argument, the missing spaces are filled with
blanks.
Decimal places
With floating-point numbers, the optional parameter defines
the number of decimal places.
Type
The type character defines which data formats are transfer‐
red to the print statement.
These characters need to be specified.
● d: Integer value
● f: Floating-point number
● s: String
● o: Octal
● x: Hexadecimal
● b: Binary
; Result = "Hello 01111100 987.65 world!"
Programming commands
6.3 Functions
157

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents