Siemens Using PNIO_SEND to Transfer Process Inputs in PROFINET IO Device Configuration

Page 31

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

Image 31
Contents CP 343-1 Lean S7-CPs for Industrial EthernetCompatibility with the Previous Version Address label Unique MAC address preset for the CPProduct Names Printed Product Information Supplied with the ProductContents B3L−53 B3L−33B3L−44 B3L−46B3L−5 Properties / ServicesServices ApplicationProperties / Services B3L−7 ConfigurationProgramming − Using Blocks Version / NCM IE Functions of the CPOrder Number Requirements for UseGeneral Operation B3L−8CPU 314 IFM B3L−9B3L−10 Step Explanation / Meaning Installation and Commissioning Procedure / StepsGround/Chassis Ground Concept B3L−13 Not relevant for Profinet IO data DC 5 V power supply via the backplane bus green = OKDisplays Acyclic data exchange, for example Send/ReceiveGreen LEDs for displaying the modeCP Operating Mode SFred BF redP1 / P2 LEDs for displaying the CP communication statusB3L−16 Display Meaning RX/TX greenNumber of Possible Connections over Ethernet Characteristic Data for S7 CommunicationCharacteristic Explanation / Values Performance DataExecution Times of the FCs Agsend / Agrecv Characteristics of the SEND/RECEIVE InterfaceComponent Explanation / Values CP as Profinet IO device Characteristic Data for Profinet IOExecution times of the FCs Pniosend / Pniorecv Intelligent Profinet IO Device Configuring and Programming the CP as a Profinet IO DeviceConfigurationProgramming Overview of the Preparatory StepsPrinciple of Data Exchange over Profinet IO Installing the CP and Specifying it as Profinet IO Device ConfigurationB3L−23 Download the configuration data to the Simatic 300 stationConfiguring the Profinet IO controller Requirements for Configuration in StepProfinet IO Controller B3L−25 ResultProperties Dialog of the Device Assigning the Device Name Configuring the properties of the CP as Profinet IO deviceInterface for Programming on the Profinet IO Device ProgrammingFCs Data consistency Initialization and ConfigurationInitialization Watchdog Reasons for reinitializationB3L−29 Pniorecv Pniosend Example of Configuration and ProgrammingB3L−31 Call interface Pniosend in the user programB3L−32 Call interface Pniorecv in the user programWeb diagnostics opens with the Start Web DiagnosticsSettings for Access to Diagnostic Data Starting and Working with Web DiagnosticsLayout of the Diagnostics Pages Diagnostics Pages of the CPStatus StartParameter Function GeneralVersion IdentificationParameter IdentificationRack Configuration Rack name Rack ConfigurationB3L−38 Events Diagnostic BufferDetails no. of the event IP parameters Industrial EthernetParameters Tab Network attachmentTCP Connections Tab Statistics TabUDP Connections Tab Parameters of a Profinet IO Device Profinet IO ConfigurationAssigned Pnio controller B3L−43Extended Functionality Replacing Older Modules / Replacing Faulty ModulesUse as a Replacement Compatibility with Predecessor ProductsOriginally configured module Configuration Steps Module ReplacementB3L−45 Further Notes on Operation Memory ResetHow to Use the Function DefaultsAutocrossing Working with Fast Ethernet − automatic switchoverBehavior after Memory Reset How Automatic Switchover of the Network Settings WorksFurther Notes Automatic Setting or Individual Network SettingsSupported MIB Objects Snmp AgentInfluence of MPI on Connections via Industrial Ethernet Access Permissions using Community NameProtocol Port number Service Special Features of IP ConfigurationReserved Port Numbers Gsdml file Other information available about the CPRequirements How to Load New FirmwareHow to Download New Firmware LEDs to Indicate the CP ModeB3L−54 Technical SpecificationsB3L−55 B3L−56
Related manuals
Manual 22 pages 56.26 Kb