Activation, Startup Program And Cyclic Program; Cp440 Send Recv" Program Example - Siemens SIMATIC CP 440 Manual

Installation and parameter assignment
Table of Contents

Advertisement

Programming Example – Standard Blocks
9.6

Activation, Startup Program and Cyclic Program

Activation, Startup Program
The startup program is located in the OB 100.
At startup the control bits and the counter are reset.
9.6.1

"CP440 SEND RECV" Program Example

Cyclic Program
The cyclic program is in OB 1.
In the example, the function blocks FB 9 "RECV_440" and FB 10 "SEND_440"
work together with the functions FC 21 and FC 22 as well as with the data blocks
DB 21 and DB 22 as instance DBs and DB 42 and DB 43 as send or receive DBs.
In the example, the function blocks are parameterized partly via constants and
partly via symbolically addressed actual parameters.
Data Transmission
Data transmission takes place from the CP 440 on slot 4 to the CP 440 on slot 5. If
you work with other communication partners, the FC 22 (RECEIVE) is not called.
Description of the FC 21 (SEND)
The "Generate edge P_SEND_REQ" program section:
SEND_440 is run through once at the start with SEND_REQ=0.
SEND_REQ is then set to 1. The SEND_440 job is started when a signal state
change from "0" to "1" is detected at the SEND_REQ control parameter.
When SEND_DONE=1 or SEND_ERROR=1, SEND_REQ is reset to 0.
"SEND_DONE=1" program section:
If the transfer is successful, SEND_DONE is set to "1" at the parameter output of
SEND_440.
To distinguish between consecutive transfers, a send counter
(SEND_COUNTER_OK) is included in data word 0 of the source block DB 42.
9-8
Point-to-point connection CP 440 Installation and Parameter Assignment
A5E00057742-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents