6 Configuring and Programming the CP as a PROFINET IO Device

Transfer the process inputs (DB10) to the I addresses with PNIO_SEND

For the configured I addresses, you will need to make data areas available on the PROFINET IO device, for example in a DB (in this example in a DB10) that contains not only the process data but also the data areas for the IOCS status information.

Figure 6-7 Data Structure for PNIO_SEND in the PROFINET IO Device

The call interface PNIO_SEND in the user program

STL

 

 

Explanation

 

 

 

 

 

call fc 11

 

//PNIO_SEND block call

 

 

 

 

//(transfer inputs to IO controller)

CPLADDR:=

W#16#0100

//Module address from hardware

configuration

LEN

:=

20

//No. of log. I addressesto transfer. in bytes

IOCS

:=

P#DB10.DBX20.0 BYTE 3

//Per send data byte, one bit status in DB10

DONE

:=

M 70.0

//Address for return parameter

DONE

ERROR

:=

M 70.1

//Address for return parameter

ERROR

STATUS

:=

MW 72

//Address for return parameter

STATUS

CHECK_IOCS := M 70.2

//Address for return parameter

CHECK_IOCS

SEND

:=

P#DB10.DBX0.0 BYTE 20

//Data area to be transferred from DB10

 

 

 

//(20 bytes)

 

 

 

CP 343-1 Lean for Industrial Ethernet / Manual Part B3L

B3L−31

Release 03/2007

 

 

C79000-G8976-C198-04

Page 31
Image 31
Siemens CP 343-1 manual Call interface Pniosend in the user program, B3L−31