Siemens SIMATIC CP 340 User Manual page 116

Ptp coupling and configuration
Hide thumbs Also See for SIMATIC CP 340:
Table of Contents

Advertisement

Communication using function blocks
6.4 Using function blocks for the output of message texts to a printer
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
REQ
INPUT
R
INPUT
LADDR
INPUT
DB_NO
INPUT
DBB_NO
INPUT
DONE
OUTPUT
1)
ERROR
OUTPUT
1)
STATUS
OUTPUT
1)
The parameter is available for a single CPU cycle after the send request has been completed correctly.
1)
116
Data type
Comment
BOOL
Initiates request on positive edge
BOOL
Cancels request
INT
Basic address of CP 340
INT
Data block number
INT
Data byte number
BOOL
Request completed without errors
BOOL
Request completed with errors
WORD
Specification of error
Permitted values, comment
Current request is aborted. Printing is
locked
The start address is taken from
STEP 7.
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).)
0 ≤ DBB_NO ≤ 8162 Pointer as of
data byte
STATUS parameter == 16#00;
Error information is written to the
STATUS parameter.
If ERROR == 1, the STATUS
parameter contains the error
information.
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents