Communication using function blocks
6.4 Using function blocks for the output of message texts to a printer
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
113
6.4
Using function blocks for the output of message texts to a printer
Introduction
The P_PRINT function block (FB 4) is available to you for outputting message texts to a
printer. The P_PRINT function block (FB 4) sends a process message to the CP 340, for
example. The CP 340 logs the process message on the connected printer.
Message texts "outputting"
The P_PRINT FB sends a message text containing up to four variables to the CP 340. You
configure the message texts using CP 340: Point-to-Point Communication, Parameter
Assignment (see sections " Data transmission with the printer driver (Page 56)" and
"Conversion and Control Statements for Printer Output (Page 77)"). For the purpose of data
transmission, the P_PRINT function block is called cyclically, or alternatively, statically
(without conditions) in a time-controlled program.
The pointers (to data blocks) for the format string and the four variables can be reached by
means of the DB_NO and DBB_NO parameters. The pointers must be stored without gaps
and in a specific sequence in the configured data block. This is the pointer DB (see Figure
"Pointer DB").
The transmission of the message text is initiated by a positive edge at the REQ input. The
frame starts with the format string of the message text. This is followed by tags 1 to 4.
Depending on the volume of data involved, a data transmission may run over several calls
(program cycles).
The P_PRINT function block can be called cyclically when the signal state at the R
parameter input is "1". This aborts the transmission to the CP 340 and sets the P_PRINT FB
back to its initial state. Data that has already been received by the CP 340 is still sent to the
communication partner. If the signal state at the R input remains static at "1", this means that
sending of print requests is deactivated.
The LADDR parameter specifies the address of the CP 340 to be addressed.
Содержание 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 ...