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
116
Manual, 04/2011, A5E00369892-03
Permissible DB Number
The permissible DB numbers are CPU-specific. If the value 16#00 is specified as the DB
number for "Pointer to variable", this variable is interpreted as not present and the pointer is
set to the next variable or the format string.
If the DB number is equal to the value 16#00 for "Pointer to format string", the print job is
canceled and event number 16#1E43 is indicated at the STATUS parameter output of the
FB P_PRINT.
Permissible DBB Number
The variable or format string begins at the configured DBB number. The variables can have
a maximum length of 32 bytes, and the format string can have a maximum length of 150
bytes.
If the maximum length is exceeded, the print request is aborted and the event number
16#1E41 displayed at the STATUS parameter output of the P_PRINT FB.
Permissible Length
The entry length in the pointer DB is to be set for each display type (data type) independently
from the precision used.
FB 4 P_PRINT Parameters
The table below lists the parameters of the P_PRINT function block (FB 4).
Table 6- 4
FB 4 P_PRINT Parameters
Name
Sort
Data type
Comment
Permitted values, comment
REQ
INPUT
BOOL
Initiates request on positive edge
R
INPUT
BOOL
Cancels request
Current request is aborted. Printing is
locked
LADDR
INPUT
INT
Basic address of CP 340
The start address is taken from
STEP 7.
DB_NO
INPUT
INT
Data block number
Pointer to pointer DB:
CPU-specific (zero not permitted)
(The pointers to variables and format
string are stored in the pointer DB in a
fixed order (see previous figure).)
DBB_NO
INPUT
INT
Data byte number
0 ≤ DBB_NO ≤ 8162 Pointer as of
data byte
DONE
1)
OUTPUT
BOOL
Request completed without errors
STATUS parameter == 16#00;
ERROR
1)
OUTPUT
BOOL
Request completed with errors
Error information is written to the
STATUS parameter.
STATUS
1)
OUTPUT
WORD
Specification of error
If ERROR == 1, the STATUS
parameter contains the error
information.
1)
The parameter is available for a single CPU cycle after the send request has been completed correctly.
Содержание 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 ...