Communication via Function Blocks
6.3 Using the Function Blocks with the 3964(R) Procedure
CP 341 Point-to-Point Communication, Installation and Parameter Assignment
132
Manual, 09/2008, A5E02191071-01
6.3.1
S7 Sends Data to a Communication Partner
The FB P_SND_RK transmits data from a data block, specified by the DB_NO, DBB_NO and
LEN parameters, to the CP 341. For purposes of data transmission, the FB P_SND_RK is
called cyclically or, alternatively, statically in a time-driven program (without conditions).
The data transmission is initiated by a positive edge at the REQ input. A data transmission
operation can run over several calls (program cycles), depending on the amount of data
involved.
The FB P_SND_RK function block can be called cyclically when the signal state at the R
parameter input is "1". This cancels the transmission to the CP 341 and places the
FB P_SND_RK in its initial state. Data that has already been received by the CP 341 is still
sent to the communication partner. If the signal state at the R input remains static at "1", this
means that sending is deactivated.
The LADDR parameter specifies the address of the CP 341 to be addressed.
Error display at the FB P_SND_RK
The DONE output shows "request completed without errors". ERROR indicates whether an
error has occurred. If an error has occurred, the corresponding event number is displayed in
STATUS (see section "Diagnostics Messages of the Function Blocks (Page 187)"). If no
error has occurred, STATUS has the value 0. DONE and ERROR/STATUS are also output
at RESET of the FB P_SEND RK (see figure in section "Receiving Data with FB
P_RCV_RK (Passive Request) (Page 147)"). The binary result BR is reset after an error has
occurred. If the block has been completed without errors, the binary result has the status "1".
Note
The P_SND_RK function block does not have a parameter check. If the parameter
assignment is incorrect, the CPU can go to STOP mode. Before the CP 341 can process an
activated request after the CPU has changed from STOP to RUN mode, the CP-CPU startup
mechanism of the FB P_SND_RK must have been completed (see section "Diagnostics
Messages of the Function Blocks (Page 187)"). Any requests initiated in the meantime are
not lost. They are transmitted once the start-up coordination with the CP 341 is finished.
长沙工控帮教育科技有限公司
www.gkbpx.com