Communication via Function Blocks
6.4 Using the Function Blocks with the RK 512 Computer Connection
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
Manual, 09/2008, A5E02191071-01
153
Assignment in the data area
The FB P_RCV_RK works together with an I_RCV_RK instance DB. The DB number is
passed on with the call. The instance data block is 60 bytes long. Access to the data in the
instance DB is not allowed.
Note
Exception: If the error STATUS == W#16#1E0E occurred, you can consult the SFCERR
variable for additional details. This error variable can only be loaded via symbolic access to
the instance DB.
FB P_RCV_RK parameters
The table below lists the parameters of the FB 7 P_RCV_RK for the "Provide data" request.
Table 6- 7
FB 7 P_RCV_RK parameters for "Provide data" request
Name
Sort
Data type
Comment
Permitted values, remark
EN_R
INPUT
BOOL
Enables data provision
R
INPUT
BOOL
Cancels request
Cancels the request in progress. Disables
providing. Default: 0
LADDR
INPUT
INT
CP 341 start address
The start address is taken from STEP 7.
DB_NO
INPUT
INT
irrelevant
DBB_NO
INPUT
INT
irrelevant
L_TYP
1
OUTPUT
CHAR
Type of area on local CPU
(source)
'D': Data block 'M': Memory bit 'I': Inputs 'Q':
Outputs 'C': Counters 'T': Timers
L_NO
1
OUTPUT
INT
Data block number on local CPU
(source)
0 ≤ L_NO ≤ 255 (only relevant, if L_TYP =
D)
L_OFFSET
1
OUTPUT
INT
Data block number on local CPU
(source)
0 ≤ L_OFFSET ≤ 510 (dependent on the
area type)
L_CF_BYT
1
OUTPUT
INT
Interprocessor communication
flag byte on local CPU
0 ≤ CF_BYTE ≤ 255
255 means: without interprocessor
communication flag
L_CF_BIT
1
OUTPUT
INT
Interprocessor communication
flag bit on local CPU
0 ≤ CF_BIT ≤ 7
NDR
1
OUTPUT
BOOL
Request completed without
errors, data accepted
STATUS parameter == 16#00;
ERROR
1
OUTPUT
BOOL
Request completed with errors
Error information is written to the STATUS
parameter.
LEN
1
OUTPUT
INT
Length of the message frame
received
0 ≤ LEN ≤ 4096,
specified in number of bytes
STATUS
1
OUTPUT
WORD
Specification of error
If ERROR == 1, the STATUS parameter
will contain error information
1
The parameter is available until the next time the FB is called.
长沙工控帮教育科技有限公司
www.gkbpx.com