Communication using function blocks
6.3 Using the function blocks for connecting to a communications processor
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
107
Assignment in the data area
The P_SEND function block works together with an Instance DB for I_SEND. The DB
number is specified in the call. The instance data block is 40 bytes long. Access to the data
in the instance DB is not permitted.
Note
Exception: If the error STATUS == W#16#1E0F occurs, you can consult the SFCERR or
SFCSTATUS variables for additional details (see the chapter titled "Diagnostics Messages of
the Function Blocks P_SEND, P_RCV and P_PRINT (Page 134)"). For detailed information
refer to "Calling variable SFCERR or SFCSTATUS".
P_SEND (FB 3) parameters
The table below lists the parameters of P_SEND (FB 3).
Table 6- 2
P_SEND (FB 3) parameters
Name
Type
Data type
Comment
Permitted values, comment
REQ
INPUT
BOOL
Initiates request at positive
edge
R
INPUT
BOOL
Cancels request
Current request is aborted. Sending 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
Send DB no.: CPU-specific
(zero not permitted)
DBB_NO
INPUT
INT
Data byte number
0 ≤ DBB_NO ≤ 8190 Transmitted data
as of data byte
LEN
INPUT
INT
Data length
1 ≤ LEN ≤ 1024, specified in number
of bytes
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 ...