Basic Principles of Serial Data Transmission
2.8 Configuration data
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
Manual, 09/2008, A5E02191071-01
105
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 = 12345 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.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
places) taking up 6 places.
Example 5: TEST..
Format string = %–6C Variable 1 = TEST
Left-justified formatting of the text variables
长沙工控帮教育科技有限公司
www.gkbpx.com