The call interface pnio_send in the user program – Siemens CP 343-1 User Manual

Page 31

Advertising
background image

6 Configuring and Programming the CP as a PROFINET IO Device

B3L−31

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

Release 03/2007
C79000-G8976-C198-04

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

CPLADDR:=

W#16#0100

LEN

:=

20

IOCS

:=

P#DB10.DBX20.0 BYTE 3

DONE

:=

M 70.0

ERROR

:=

M 70.1

STATUS :=

MW 72

CHECK_IOCS := M 70.2
SEND

:=

P#DB10.DBX0.0 BYTE 20

//PNIO_SEND block call
//(transfer inputs to IO controller)
//Module address from hardware configuration
//No. of log. I addressesto transfer. in bytes

//Per send data byte, one bit status in DB10
//Address for return parameter DONE
//Address for return parameter ERROR
//Address for return parameter STATUS
//Address for return parameter CHECK_IOCS
//Data area to be transferred from DB10
//(20 bytes)

Advertising