Programming Example – Standard Blocks
9-12
Point-to-point connection CP 440 Installation and Parameter Assignment
A5E00057742-02
9.6.4
“CP440 MASTER” Program Example
This example describes the communication between a master and several slaves.
You can find the program sections for the individual slaves in the “CP440 SLAVE”
program example.
In OB1 the pattern is set for communication with a partner. The branch table in the
“Select Slave” program section is used for this. Depending on the value in MW 8,
either communication to slave 1 (FC 1 call) or 2 (FC 2 call) is selected. The
program can be adapted to include additional slaves.
In FC 1 a send job (“execute new Send-Job” program section with FC 11 call) and
the associated receive job (“execute Recv-Job” program section with FC 21 call)
are called by the slave for the response. The counter “START_TIMER” for
monitoring the response is started with the send job. If the slave does not respond
within the set monitoring time, the timed period expires and there is a switch to the
next slave.
9.6.5
“CP440 SLAVE” Program Example
In FB 40, RECV is called to query whether a job has been received from the
master. For this purpose, in the receive message frame the slave address is
compared with its own address. As soon as there is a job, the reply is sent to the
master with the SEND call.
The parameters can be adapted for other slaves in OB 1.
Содержание SIMATIC CP 440
Страница 10: ...Contents x Point to point connection CP 440 Installation and Parameter Assignment A5E00057742 02 ...
Страница 134: ...Diagnostics with the CP 440 8 16 Point to point connection CP 440 Installation and Parameter Assignment A5E00057742 02 ...
Страница 164: ...Accessories and Order Numbers D 2 Point to point connection CP 440 Installation and Parameter Assignment A5E00057742 02 ...