Basic Principles of Serial Data Transmission
2.6 Data transmission with the printer driver
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
57
Variables
Up to 4 variables (3 + a message text number) can be displayed in a message text. The
values of variables can be transmitted from the CPU to the CP 340. The following can be
displayed as variables: Calculated values of the user program, such as: levels), date and
time, strings (string variables), or other message texts.
A conversion statement must be specified in the configured message text or in the format
string for each variable, and the meaning and output format of the variable value must be
encoded in this statement.
Format string
The format string allows you to define the display type and composition of a message text.
The format string can consist of:
●
Text (all printable characters, for example: The level ... l was reached at ... hours.)
●
Conversion statements for variables (e.g., %N = pointer to message text number x, where
x is the value of a variable (see example 2 below)).
There must be one (and only one) conversion statement for each variable in the format
string or configured message text. The conversion statements are applied to the variables
in the sequence in which they occur.
●
Control statements with control characters for bold, condensed, expanded, italic, and
underlining (e.g., \B = bold type on) or with additional control characters you have defined
You can use other control characters if you enter them in the control character table in the
CP 340: Point-to-Point Communication, Parameter Assignment user interface and reset the
CP 340 parameters.
Additional information is available in the section "Conversion and Control Statements for
Additional functions
In addition to outputting message texts, you can use the following functions for printout. To
execute one of these functions, simply specify it in the format string in the same way.
●
Set page number (format string = %P)
●
Begin new page (format string = \F)
●
Print with/without line break (\x at the end of the format string)
Please note that a line feed is carried out by default after each output.
Содержание SIMATIC CP 340
Страница 6: ...Preface PtP coupling and configuration of CP 340 6 Manual 04 2011 A5E00369892 03 ...
Страница 10: ...Table of contents PtP coupling and configuration of CP 340 10 Manual 04 2011 A5E00369892 03 ...
Страница 186: ...Accessories and Order Numbers PtP coupling and configuration of CP 340 186 Manual 04 2011 A5E00369892 03 ...
Страница 190: ...Literature on SIMATIC S7 PtP coupling and configuration of CP 340 190 Manual 04 2011 A5E00369892 03 ...
Страница 200: ...Index PtP coupling and configuration of CP 340 200 Manual 04 2011 A5E00369892 03 ...