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
157
Assignment in the data area
The FB P_SND_RK works together with an I_SND_RK instance DB. The DB number is
passed on with the call. The instance data block is 62 bytes long. Access to the data in the
instance DB is not allowed.
FB P_SND_RK parameters
The table below lists the parameters of the FB 8 P_SND_RK for the "Fetch data" request.
Table 6- 8
FB 8 P_SND_RK parameters for "Fetch data" request
Name
Sort
Data type Comment
Permitted values, remark
SF
INPUT
CHAR
Selection for Send data or Fetch
data
SF = 'F' (Fetch)default value: 'S' (Send)
REQ
INPUT
BOOL
Initiates request on positive edge
R
INPUT
BOOL
Cancels request
Cancels the request in progress. Fetching is
disabled. Default: 0
LADDR
INPUT
INT
CP 341 start address
The start address is taken from STEP 7.
DB_NO
INPUT
INT
Data block number of destination
Send DB no.: CPU-specific, zero is not
allowed
DBB_NO
INPUT
INT
Data block number of destination
0 ≤ DBB_NO ≤ 8190 Send data starting from
data byte
LEN
INPUT
INT
Data length of the message frame
to be fetched
1 ≤ LEN ≤ 4096, specified in number of
bytes
1
R_CPU_NO
INPUT
INT
CPU number of the partner CPU
0 ≤ R_CPU_NO ≤ 4, only with multiprocessor
mode; default value: 1
R_TYP
INPUT
CHAR
Address type on the partner CPU 'D': Data block
'X': Expanded data block
'M': Memory bit
'I': Inputs
'Q': Outputs
'C': Counters
'T': Timers
R_NO
INPUT
INT
Data block number on the partner
CPU
0 ≤ R_NO ≤ 255
R_OFFSET
INPUT
INT
Data byte number on the partner
CPU
R_CF_BYT
INPUT
INT
Interprocessor communication flag
byte on partner CPU
0 ≤ CF_BYTE ≤ 255
Default value: 255 (means: without
interprocessor communication flag)
R_CF_BIT
INPUT
INT
Interprocessor communication flag
bit on the partner CPU
0 ≤ CF_BIT ≤ 7
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 will
contain error information.
1
The parameter is available until the next time the FB is called.
长沙工控帮教育科技有限公司
www.gkbpx.com