Communication via Function Blocks
6.3 Using the Function Blocks
Point-to-point connection CP 440 Installation and Parameter Assignment
Manual, 09/2007, A5E00057742-03
89
6.3
Using the Function Blocks
Introduction
The following sections describe what you must take into account when supplying the function
blocks with parameters.
STATUS Indication at the FB
Please note the following with reference to the STATUS display on the function blocks:
Note
The parameters DONE, NDR, ERROR and STATUS are valid for only one module run. To
display the STATUS, you should therefore copy it to a free data area.
DONE = '1' means that the request was completed without error.
This means:
●
With ASCII driver: The job was sent to the communication partner. This does not
necessarily mean that the data was received by the communication partner.
●
With 3964( R ) procedure: The job was sent to the communication partner and
acknowledged affirmatively by the communication partner. This does not necessarily
mean that the data was forwarded to the partner CPU.
Jobs which can be processed simultaneously
Only one SEND_440 FB, one RECV_440 FB and one RES_RECV FB can be programmed
in the user program for each CP 440 used.
In addition, you can only use the following data blocks because the states required for the
internal execution of the FB are stored in the instance data block:
●
1 instance data block for the SEND_440 FB
●
1 instance data block for the RECV_440 FB
●
1 instance data block for the RES_RECV FB
Data Consistency
Please note the following to ensure consistent data transmission:
●
Sender: Only access the send DB when all data have been completely transferred
(DONE = 1).
●
Receiver: Only access the receive DB when all data are received (NDR = 1). Then you
must inhibit the receive DB (EN_R = 0) until you have processed the data.
长沙工控帮教育科技有限公司
www.gkbpx.com