Communication via Function Blocks
6.2 Notes on Program Structure
Point-to-point connection CP 440 Installation and Parameter Assignment
88
Manual, 09/2007, A5E00057742-03
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.
长沙工控帮教育科技有限公司
www.gkbpx.com