Notes On Program Structure; Using The Function Blocks - Siemens SIMATIC S7-400 Equipment Manual

Hide thumbs Also See for SIMATIC S7-400:
Table of Contents

Advertisement

6.2

Notes on Program Structure

Notes
In order to use the speed of the CP 440 to optimum effect, you should heed the following when
you create your user program:
For a short cycle:
• Only one run of the SEND_440 function block with REQ=0 and one run with REQ=1 is
necessary for data transmission (creating the positive edge at the REQ input). The calls can
be made directly one after the other. This makes it possible to carry out one data transmission
per cycle.
• Program the call of the SEND_440 FB with REQ=1 (this activates the FB) at the end of the
program. This ensures optimum use of the time between two cycles, which can be relatively
long in a short cycle.
For a long cycle:
• Call the SEND_440 and RECV_440 FBs several times throughout the program.
• Call the SEND_440 and RECV_440 FBs in the time OB (disable the interrupts in the lower
priority OBs).
Note when using interrupts (time OBs) that calling the corresponding OB requires quite a lot of
time (you can find exact times in your CPU manual). You should therefore check in each case
whether the FBs could be processed more effectively by modifying your program.
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.
Point-to-point connection CP 440 Installation and Parameter Assignment
Equipment Manual, 03/2022, A5E00057742-AE
Communication via Function Blocks
6.3 Using the Function Blocks
75

Advertisement

Table of Contents
loading

Table of Contents