Intelligent PROFINET IO device with S7-300 CP
7.6 Example of configuration and programming
Configuring and commissioning S7 CPs for Industrial Ethernet
134 Configuration Manual, 09/2013, C79000-G8976-C182-13
Transferring the Q addresses to the process outputs (DB11) with PNIO_RECV
For the configured Q addresses, you need to make data areas (for example in a DB)
available on the PROFINET IO devices, in this example in a DB11 that has not only data
areas for the process data but also for the status information IOPS.
Figure 7-5 Data structure for PNIO_RECV on the PROFINET IO device
The PNIO_RECV call interface in the user program
call fc 12 //PNIO_RECV block call
//(read outputs from IO controller)
CPLADDR:= W#16#0100 //Module address from hardware configuration
MODE: = 0 //IO device mode not both modes at same time
LEN := 7 //No. of log. Q addresses to transf. in bytes
IOPS := P#DB11.DBX7.0 BYTE 1 //One status bit in DB11 per receive data byte
NDR := M 74.0 //Address for return parameter NDR
ERROR := M 74.1 //Address for return parameter ERROR
STATUS := MW76 //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