6 Configuring and Programming the CP as a PROFINET IO Device
Transfer the O addresses to the process outputs (DB11) with PNIO_RECV
For the configured O addresses, you will need to make data areas available on the PROFINET IO device, for example in a DB (in this example in a DB11) that contains not only the process data but also the data areas for the IOPS status information.
Figure 6-8 Data Structure for PNIO_RECV in the PROFINET IO Device
The call interface PNIO_RECV in the user program
STL |
|
| Explanation |
|
|
|
|
|
| ||
call fc 12 |
| //PNIO_RECV block call |
| ||
|
|
| //(read outputs from | IO controller) | |
CPLADDR:= | W#16#0100 | //Module address from hardware | configuration | ||
LEN | := | 7 | //No. of log. O addresses to transfer in bytes | ||
IOPS | := | P#DB11.DBX7.0 BYTE 1 | //Per receive data byte one status bit in DB11 | ||
NDR | := | M 74.0 | //Address for return | parameter | NDR |
ERROR | := | M 74.1 | //Address for return | parameter | ERROR |
STATUS | := | MW 76 | //Address for return | parameter | STATUS |
CHECK_IOPS := M74.2 | //Address for return | parameter | CHECK_IOPS | ||
RECV | := | P#DB11.DBX0.0 BYTE 7 | //Received data in DB11 (7 bytes) | ||
ADD_INFO:= | MW 26 | //Diagnostic information |
| ||
|
|
|
|
|
|
B3L−32 | CP |
Release 03/2007 |