Use Of Function Blocks To Output Message Texts To A Printer - Siemens Simatic S7-300 CP 341 User Manual

Point-to-point communication, installation and parameter assignment
Table of Contents

Advertisement

6.6

Use of function blocks to output message texts to a printer

Introduction
The FB 13 P_PRINT_RK function block is available for printing message texts. The FB 13
P_PRINT_RK transmits a process message to the CP 341, for example. The CP 341 logs
the process message on the connected printer.
Outputting message texts
The FB P_PRINT_RK transmits a message text with up to four variables to the CP 341.
Configure the message texts with the CP 341: Point-to-Point Communication, Parameter
Assignment parameter assignment interface. For the purpose of data transmission, the FB
P_PRINT_RK is called cyclically, or alternatively, statically (without conditions) in a time-
controlled program.
The DB_NO and DBB_NO parameters enable the pointers (pointers to data blocks) for the
format string and the four variables to be accessed. The pointers must be stored in a certain
order without gaps in the assigned data block (pointer DB) (see Figure "Pointer DB").
The transmission of the message text is initiated by a positive edge at the REQ input. The
format string of the message text is transmitted first, followed by variables 1 to 4.
A data transmission operation can run over several calls (program cycles), depending on the
amount of data involved.
The FB P_PRINT_RK function block can be called cyclically when the signal state at the R
parameter input is "1". This cancels the transmission to the CP 341 and places the
FB P_PRINT_RK in its initial state. Data that has already been received by the CP 341 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 341 to be addressed.
The DONE output shows "request completed without errors". ERROR indicates whether an
error has occurred. If an event has occurred, the corresponding event number is displayed in
STATUS. If no error has occurred, STATUS has the value 0. DONE and ERROR/STATUS
are also output at RESET of the FB P_PRINT_RK. The binary result BR is reset after an
error has occurred. If the block has been completed without errors, the binary result has the
status "1".
Note
The P_PRINT function block does not have a parameter check. If the parameter assignment
is incorrect, the CPU can go to STOP mode. Before the CP 341 can process an activated
request after the CPU has changed from STOP to RUN mode, the CP-CPU startup
mechanism of the FB P_PRINT_RK must have been completed. Any requests initiated in the
meantime are not lost. They are transmitted once the start-up coordination with the CP 341
is finished.
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
Manual, 09/2008, A5E02191071-01
www.gkbpx.com
6.6 Use of function blocks to output message texts to a printer
该文档是极速PDF编辑器生成,
如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
Communication via Function Blocks
165

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents