EasyManuals Logo

Siemens MCP 398C Commissioning Manual

Siemens MCP 398C
1734 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1173 background imageLoading...
Page #1173 background image
FORMAT function: Insert values or string with formatting identifier
Syntax: FORMAT
(Text with formatting identifier [, Value1] ... [, Value28] )
Description: Through the use of formatting identifiers, the FORMAT function enables up to
28 values or strings to be inserted at specified positions in a specific text.
Formatting identifi‐
ers:
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
Example
DEF VAR1
DEF VAR2
LOAD
VAR1 = 123
VAR2 = FORMAT("Hello %08b %.2f %s!", VAR1 + 1, 987.654321, "world")
; Result = "Hello 01111100 987.65 world!"
END_LOAD
See also
Use of strings (Page 106)
Programming commands
6.3 Functions
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1 187

Table of Contents

Other manuals for Siemens MCP 398C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens MCP 398C and is the answer not in the manual?

Siemens MCP 398C Specifications

General IconGeneral
BrandSiemens
ModelMCP 398C
CategoryControl Systems
LanguageEnglish

Related product manuals