Siemens CP 343-1 manual Call interface Pniorecv in the user program, B3L−32

Page 32

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 343-1 Lean for Industrial Ethernet / Manual Part B3L

Release 03/2007

C79000-G8976-C198-04

Image 32
Contents S7-CPs for Industrial Ethernet CP 343-1 LeanAddress label Unique MAC address preset for the CP Product NamesPrinted Product Information Supplied with the Product Compatibility with the Previous VersionContents B3L−33 B3L−44B3L−46 B3L−53Properties / Services ServicesApplication B3L−5Properties / Services Configuration Programming − Using BlocksVersion / NCM IE Functions of the CP B3L−7Requirements for Use General OperationB3L−8 Order NumberB3L−9 CPU 314 IFMB3L−10 Installation and Commissioning Procedure / Steps Step Explanation / MeaningGround/Chassis Ground Concept B3L−13 DC 5 V power supply via the backplane bus green = OK DisplaysAcyclic data exchange, for example Send/Receive Not relevant for Profinet IO dataLEDs for displaying the mode CP Operating ModeSFred BF red GreenLEDs for displaying the CP communication status B3L−16Display Meaning RX/TX green P1 / P2Characteristic Data for S7 Communication Characteristic Explanation / ValuesPerformance Data Number of Possible Connections over EthernetComponent Explanation / Values Characteristics of the SEND/RECEIVE InterfaceExecution Times of the FCs Agsend / Agrecv Execution times of the FCs Pniosend / Pniorecv Characteristic Data for Profinet IOCP as Profinet IO device Configuring and Programming the CP as a Profinet IO Device ConfigurationProgrammingOverview of the Preparatory Steps Intelligent Profinet IO DevicePrinciple of Data Exchange over Profinet IO Configuration Installing the CP and Specifying it as Profinet IO DeviceDownload the configuration data to the Simatic 300 station B3L−23Profinet IO Controller Requirements for Configuration in StepConfiguring the Profinet IO controller Result B3L−25Configuring the properties of the CP as Profinet IO device Properties Dialog of the Device Assigning the Device NameFCs ProgrammingInterface for Programming on the Profinet IO Device Initialization Initialization and ConfigurationData consistency B3L−29 Reasons for reinitializationWatchdog Example of Configuration and Programming Pniorecv PniosendCall interface Pniosend in the user program B3L−31Call interface Pniorecv in the user program B3L−32Web Diagnostics Settings for Access to Diagnostic DataStarting and Working with Web Diagnostics Web diagnostics opens with the StartDiagnostics Pages of the CP Layout of the Diagnostics PagesStart Parameter FunctionGeneral StatusIdentification ParameterIdentification VersionRack Configuration Rack Configuration Rack nameB3L−38 Details no. of the event Diagnostic BufferEvents Industrial Ethernet Parameters TabNetwork attachment IP parametersUDP Connections Tab Statistics TabTCP Connections Tab Profinet IO Configuration Parameters of a Profinet IO DeviceB3L−43 Assigned Pnio controllerReplacing Older Modules / Replacing Faulty Modules Use as a ReplacementCompatibility with Predecessor Products Extended FunctionalityB3L−45 Module ReplacementOriginally configured module Configuration Steps Memory Reset How to Use the FunctionDefaults Further Notes on OperationWorking with Fast Ethernet − automatic switchover Behavior after Memory ResetHow Automatic Switchover of the Network Settings Works AutocrossingAutomatic Setting or Individual Network Settings Further NotesSnmp Agent Supported MIB ObjectsAccess Permissions using Community Name Influence of MPI on Connections via Industrial EthernetReserved Port Numbers Special Features of IP ConfigurationProtocol Port number Service Other information available about the CP Gsdml fileHow to Load New Firmware How to Download New FirmwareLEDs to Indicate the CP Mode RequirementsTechnical Specifications B3L−54B3L−55 B3L−56
Related manuals
Manual 22 pages 56.26 Kb