Notes On Program Structure - Siemens SIMATIC CP 440 Manual

Installation and parameter assignment
Table of Contents

Advertisement

Communication Using Function Blocks
6.3

Notes on Program Structure

In order to use the speed of the CP 440 to optimum effect, you should heed the
following when you create your user program:
In a short cycle (see also "CP 440 1CYC Programming Example" in Chapter 9):
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.
In 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-4
Point-to-point connection CP 440 Installation and Parameter Assignment
A5E00057742-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents