Basic Principles of Serial Data Transmission
2.7 Parameterization Data
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
83
Examples of correct conversion statements
Below are some examples of correct conversion statements.
Example 1: .....31.10.1996
Format string = %15.4A
Variable 1 = D#1996–10–31
A width of 15 with a precision of 4 (width of the year) and right-justified formatting were
selected.
Example 2: 12345.
Format string = %–6I
Variable 1 = 12,345 DEC
The selected width was one character greater than the variable value to be output; left-
justified formatting.
Example 3: 12d_0h_0m_23s_348ms
Format string = %T
Variable 1 = T#12D23S348MS
The IEC time is in the standard format; unspecified time units are inserted with zeros.
Example 4: 1.234560E+02
Format string = %12.6R
Variable 1 = 123.456
A width of 12 is available to display the whole variable, with the precision (number of decimal
positions) taking up 6 characters.
Example 5: TEST..
Format string = %–6C
Variable 1 = TEST
Left-justified formatting of the text variables