Examples for SIMATIC IPC Support. Package for VxWorks SIMATIC. Industrial PC Examples for SIMATIC IPC Support Package for VxWorks

Similar documents
Readme SiVArc V14 SP1 Update 6

Creating the program. TIA Portal. SIMATIC Creating the program. Loading the block library 1. Deleting program block Main [OB1]

Team engineering via Inter Project. Engineering. TIA Portal. Team engineering via Inter Project Engineering. Basics of "Inter Project Engineering"

SIMATIC. S7/HMI SIMATIC Automation Tool V3.1 SP1 product information. SIMATIC Automation Tool features 1. Known problems. Product Information

SIMATIC. Process Control System PCS 7 PCS 7 system documentation - Readme V8.0 SP2 (Update 1) Options for Accessing Documentation 1

Getting Started - Startdrive. Startdrive SINAMICS. Introduction 1. Connecting the drive unit to the PC. Creating a project 3

MindSphere. Visual Explorer. Introduction. User roles for "Visual Explorer" Connecting "Visual Explorer" to MindSphere data. Creating Visualizations

COMOS. Platform Class documentation RevisionMaster_dll. Class: RevisionInfo 1. Class: RevisionMaster 2. Programming Manual

SIMATIC. Process Control System PCS 7 VT Readme V8.2 (online) Security information 1. Overview 2. Notes on Installation 3. Notes on usage 4.

Class documentation. COMOSKDictionary COMOS. Platform Class documentation COMOSKDictionary. Trademarks. General. KDictionary. Programming Manual

SIMATIC. STEP 7 PLUS TIA Portal Teamcenter Gateway. Introduction to TIA Portal Teamcenter Gateway 1. System requirements 2

Configuration limits for products of the SIMATIC NET PC Software V8.1 SIMATIC NET

Validity 1. Improvements in STEP 7 2. Improvements in WinCC 3 SIMATIC. Readme. Readme

S7-300 Getting Started - Commissioning a CPU 31xC: Closed-loop control

Performance data abgn SCALANCE W770/W730 SIMATIC NET. Industrial Wireless LAN Performance data abgn SCALANCE W770/W730.

Configuration limits for products of the HARDNET-PB DP-Base 1

First Steps in Commissioning CPU. 31xC: Positioning with digital output SIMATIC

Performance data abgn PCIe Minicard MPCIE-R1-ABGN-U3 SIMATIC NET

Class: DocumentManager 1 COMOS. Platform Class documentation DocumentManager_dll. Programming Manual 03/2017 V10.2.

PD PA AP How To Configure Maxum II TimeServer Access


SIMATIC/SINAMICS. Getting started with SINAMICS V90 PN on S Motion Control. Fundamental safety instructions 1. Introduction

Key Panels Library SIMATIC HMI. Key Panels Library. Preface 1. Installation of Key Panels Library. Working with the Key Panels Library

SIMATIC. WinCC Readme Runtime Professional. Validity 1. Improvements in Update 7 2. Improvements in Update 6 3. Improvements in Update 5 4

party software COMOS Platform Third-party software Trademarks 1 Requirements for the system environment Third-party software releases Operating Manual

SIMOTION. Motion Control Task Trace. Preface 1. Overview 2. Configuring 3. Working with the SIMOTION Task Profiler 4.

ST (6ES7132-6FD00-0BB1)

SIMATIC. Process Control System PCS 7 Trend Micro OfficeScan (V8.0; V8.0 SP1) Configuration. Using virus scanners 1.

SIMATIC. Process Control System PCS 7 Configuration McAfee Endpoint Security Security information 1. Preface 2.

MindSphere. MindConnect IoT Extension Getting Started. Introduction to MindSphere. Prerequisites 2. Preparations 3. MindConnect IoT Extension

SIMATIC NET. S TeleControl MSC300_Library program block library. Block library for TCSB (V3) WDC_S7_300_... (FB92) 2 UDT_WDC_PARAM (UDT91) 3

Primary Setup Tool (PST) SIMATIC NET. Industrial Ethernet / PROFINET Primary Setup Tool (PST) Preface. Description. Software installation 2

DI 8x24VDC ST digital input module SIMATIC. ET 200SP DI 8x24VDC ST digital input module (6ES7131-6BF00-0BA0) Preface. Documentation guide

SIMATIC Ident RFID systems MDS D423 Compact Operating Instructions

ET 200S distributed I/O system 4DO DC24V/2A ST digital electronic module (6ES7132-4BD32-0AA0)

SITOP UPS1600 under STEP 7 V13. SITOP UPS1600 under STEP 7 V13. Introduction. Safety notes. Description. Assigning the IP address

Product Information Mixed. Configuration ET 200SP / ET 200AL SIMATIC. ET 200SP Product Information Mixed Configuration ET 200SP / ET 200AL.

Siemens Drives & PLCs

RF-MANAGER simulator SIMATIC. RFID-Systems RF-MANAGER simulator. Simulating projects. Compact Operating Instructions 06/2010 A5E

SIMATIC. WinCC Readme Runtime Professional. Validity 1. Improvements in Update 2 2. Improvements in Update 1 3

DANGER indicates that death or severe personal injury will result if proper precautions are not taken.

SIMATIC. PCS 7 Licenses and configuration limits (V9.0) Security information 1. Preface 2. Selecting the correct license keys 3

Commissioning PC Stations - Manual. and Quick Start SIMATIC NET. PC software Commissioning PC Stations - Manual and Quick Start.

SIMATIC IPC Wizard for. Widescreen devices with multitouch SIMATIC. Industrial PC SIMATIC IPC Wizard for. Preface.

SIMATIC. Process Control System PCS 7 PCS 7 Documentation (V8.1) Options for Accessing Documentation 1. Documentation for the Planning Phase 2

SIMATIC. ET 200SP Open Controller Product information on CPU 1515SP PC. Preface. Product Information. Technical update. Technical specifications 3

Siemens Industrial SIMATIC. Process Control System PCS 7 Configuration Trend Micro OfficeScan Server XG. Security information 1.

Class: POptions 1 COMOS. Platform Class documentation POptions_dll. Programming Manual 04/2014 A5E AA

SIMOCODE pro. Read me SIMOCODE ES. Introduction 1. Installation notes 2. Installation/License key/ Uninstallation 3.

PROFIsafe SITRANS. Pressure transmitter SITRANS P, DS III PROFIsafe series. Product Information 7MF4*34 04/2008 A5E

SIMATIC. Communications processor CP First Steps in Commissioning. Getting Started 09/2008 A5E

Setting up securityglobal FW Rulesets SIMATIC NET. Industrial Ethernet Security Setting up security. Preface. Firewall in standard mode

Power module PM-E DC24V HF SIMATIC. ET 200S distributed I/O Power module PM-E DC24V HF (6ES7138-4CA60-0AB0) Preface. Properties.

Sample project Filling Station SIMATIC. STEP 7 Professional / WinCC Advanced V11 for Sample project Filling Station. Overview of the Getting.

Cycle and response times SIMATIC. S Cycle and response times. Preface. Documentation guide. Program processing 2. Cyclic program processing 3

PROFIenergy product information SIMATIC. ET 200SP PROFIenergy product information. PROFIenergy 1. Product Information 12/2015 A5E AH

General Information 1. Connection 2. User Interface 3 ATC5300. Menus 4. Automatic Transfer Controller. Remote Control Software Manual A5E

Siemens Automation Products

SIMATIC. Process Control System PCS 7 Configuration Symantec Endpoint Protection V14. Security information 1. Preface 2.

SIMATIC. WinCC Readme Runtime Professional. Validity 1. Improvements in Update 6 2. Improvements in Update 3 3. Improvements in Update 2 4

SIMATIC. Process Control System PCS 7 Licenses and quantity structures (V8.0) Preface 1. Selecting the correct license keys 2

SITOP UPS1600 under STEP 7 V5. SITOP UPS1600 under STEP 7 V5. Introduction. Safety notes. Description 3. Assigning the IP address

SIMATIC. Industrial PC Microsoft Windows 7 (USB stick) Safety instructions 1. Initial startup: Commissioning the operating system

Block Library Motor Starter SIRIUS for SIMATIC PCS 7

SIMATIC. Process Control System PCS 7 CFC Readme V9.0 (online) Security information 1. Overview 2. Notes on Installation 3. Notes on usage 4.

SIMATIC. Process Control System PCS 7 Advanced Process Functions Operator Manual. Preface. Security information 1. Overview 2. Material management 3

Validity 1. Improvements in STEP 7 2. Improvements in WinCC 3 SIMATIC. Improvements in Openness 4. Readme. Readme

SIMATIC. PCS 7 Process Control System SIMATIC Logon Readme V1.6 (Online) Security information 1. Overview 2. Notes on installation 3.

Use with 0 to 70 C ambient. temperature SIMATIC. Process Control System PCS 7 Use with 0 to 70 C ambient temperature. Preface 1. Product combination 2

Industrial Controls. SIMOCODE pro SIMOCODE pro PCS 7 Library. Preface. Security information. Product specific security. information.

Process Historian Administration SIMATIC. Process Historian V8.0 Update 1 Process Historian Administration. Basics 1. Hardware configuration 2

Siemens Spares. Setting up security in STEP 7. Professional SIMATIC NET. Industrial Ethernet Security Setting up security in STEP 7 Professional

SIMATIC NET. Industrial Ethernet / PROFINET Primary Setup Tool (PST) Preface. Functions 1. Software installation 2. Operation. Configuration Manual

SIMATIC. Process Control System PCS 7 Symantec Endpoint Protection 11.0 Configuration. Using virus scanners 1. Configuration 2. Commissioning Manual

Continuous Function Chart Getting. Started SIMATIC. Process Control System PCS 7 Continuous Function Chart Getting Started.

SIMATIC. Industrial PC Microsoft Windows Embedded Standard 7. Safety instructions 1. Initial startup: Commissioning the operating.

Optional package printer driver V1.4

Power module PM-E DC24V/8A RO SIMATIC. ET 200S distributed I/O Power module PM-E DC24V/8A RO (6ES7138-4CA80-0AB0) Preface. Properties.

SIMATIC. Process control system PCS 7 Operator Station (V9.0 SP1) Security information 1. Preface 2

Siemens Drives & PLCs

SIMATIC. Process Control System PCS 7 Product Brief on Software Updates from V5.1/V5.2 to PCS 7 V7.0 SP1. Preface 1

SIMATIC. SIMATIC Energy Manager V1.0 App for ios and Android. Preface. SIMATIC Energy Manager app. Establish connection to SIMATIC Energy Manager PRO

Counting, measurement and position. detection SIMATIC. S7-1500, ET 200MP, ET 200SP Counting, measurement and position detection.

DANGER indicates that death or severe personal injury will result if proper precautions are not taken.

COMOS. Automation Automation interfaces. Note on file-based data exchange 1 SPI 2. Generic Excel import 3. Process visualization via OPC client 4

IO-Link Master (6ES7147-4JD00-0AB0) SIMATIC. ET 200pro IO-Link Master (6ES7147-4JD00-0AB0) Preface. Documentation guide. Product overview.

COMOS. Operations Inspection. Introduction 1. Working with the "Inspection" plugin 2. Working with the "Inspection diagram" plugin 3

Industrial Controls. Motor management and control devices SIMOCODE pro. Introduction 1. Configuring a reversing starter. List of abbreviations

Siemens Spares COMOS. Operations Inspection. Introduction 1. Working with the "Inspection" plugin 2. Working with the "Inspection diagram" plugin 3

SINEMA Remote Connect - Client SIMATIC NET. Industrial Remote Communication SINEMA Remote Connect - Client. Preface. Requirements for operation

SINETPLAN Siemens Network Planner

SIMATIC HMI. WinCC V7.4 SP1 SIMATIC HMI WinCC V7.4 Getting Started. Welcome 1. Icons 2. Creating a project. Configure communication

COMOS. Operations MRO. Introduction 1. Maintenance objects 2. "General maintenance" plugins 3. "Events" plugin 4. "Resources" plugin 5

SIMATIC. ET 200S distributed I/O Power module PM-E DC24..48V (6ES7138-4CA50-0AB0) Preface. Properties 1. Parameters 2. Diagnostics 3.

COMOS. Operations Shutdown. Introduction 1. Milestones 2. "Shutdown management" plugin 3. "Quick edit" plugin 4. User interface reference 5

SIMATIC. Component Based Automation SIMATIC imap STEP 7 AddOn Creating PROFINET components. Preface. Creating PROFINET components in STEP 7

SIMATIC. Industrial PC Microsoft Windows 7. Safety instructions 1. Initial startup: Commissioning the operating. system

SIMATIC. Industrial software WinAC RTX F Introduction 1. Selecting suitable hardware 2. Installing/removing the WinAC RTX F 2009 software

SIMATIC. Process Control System PCS 7 Software update with utilization of new functions. Security information 1. Preface 2.

SIMATIC. Communications processor CP 340 first commissioning steps. Getting Started 04/2005 A5E

Transcription:

Examples for SIMATIC IPC Support Package for VxWorks Importing examples in Wind River Workbench V4 1 Examples for the DMAPI interface 2 SIMATIC Example for function calls of the hardware-dependent functions 3 Industrial PC Examples for SIMATIC IPC Support Package for VxWorks Operating Manual Examples for use of DP- Base calls 4 Examples for PROFINET with CP 16xx driver: 5 Examples for PROFINET with PN driver: 6 08/2015 A5E36411535-AA

Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger. DANGER indicates that death or severe personal injury will result if proper precautions are not taken. WARNING indicates that death or severe personal injury may result if proper precautions are not taken. CAUTION indicates that minor personal injury can result if proper precautions are not taken. NOTICE indicates that property damage can result if proper precautions are not taken. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage. Qualified Personnel The product/system described in this documentation may be operated only by personnel qualified for the specific task in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualified personnel are those who, based on their training and experience, are capable of identifying risks and avoiding potential hazards when working with these products/systems. Proper use of Siemens products Note the following: Trademarks WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems. The permissible ambient conditions must be complied with. The information in the relevant documentation must be observed. All names identified by are registered trademarks of Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG Division Digital Factory Postfach 48 48 90026 NÜRNBERG GERMANY A5E36411535-AA P 08/2015 Subject to change Copyright Siemens AG 2015. All rights reserved

Table of contents 1 Importing examples in Wind River Workbench V4... 5 2 Examples for the DMAPI interface... 9 3 Example for function calls of the hardware-dependent functions... 11 4 Examples for use of DP-Base calls... 13 4.1 rtp_dpmaster... 14 4.2 rtp_dpslave... 14 4.3 Configuring the SIMATIC IPC for PROFIBUS... 15 5 Examples for PROFINET with CP 16xx driver:... 17 5.1 rtp_pniocontroller... 18 5.2 rtp_pniodevice... 19 5.3 rtp_pnioload... 21 5.4 Configuring the SIMATIC IPC for PROFINET... 22 6 Examples for PROFINET with PN driver:... 25 6.1 rtp_pntest... 26 6.2 Configuring the SIMATIC IPC for PROFINET with PN driver... 28 Index... 29 Operating Manual, 08/2015, A5E36411535-AA 3

Table of contents 4 Operating Manual, 08/2015, A5E36411535-AA

Importing examples in Wind River Workbench V4 1 In VxWorks V7 and Workbench V4, Real Time Process Workbench projects are based on a VxWorks image project or a VxWorks Source Build project. For this reason, the supplied example projects cannot be directly recompiled after import to the workspace. A new context must first be created for the Source Build project or image project present in your workspace. The procedure for importing an example is demonstrated below using the PROFINET example rtp_pniocontroller_irt: 1. Select "File > Import > Existing Projects into Workspace" and open the "Import Projects" dialog. Operating Manual, 08/2015, A5E36411535-AA 5

Importing examples in Wind River Workbench V4 2. Select the file location of the examples under "Select root directory". The folder is located in the following directory of your VxWorks 7 installation: "<pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples>". The example "rtp_pniocontroller_irt" is located in subfolder "cp16xx". 3. Select the project to be imported and select the "Copy projects into workspace" option. 4. Click "Finish". 5. Select the project you have just imported and select "Project > Properties". The project properties open. 6 Operating Manual, 08/2015, A5E36411535-AA

Importing examples in Wind River Workbench V4 6. Change to "VxWorks Info" and click "Add Context...". 7. In the "Add Context" dialog window, select an existing image project or source build project. Operating Manual, 08/2015, A5E36411535-AA 7

Importing examples in Wind River Workbench V4 8. Click "Finish". A new context is created. Project-specific settings are not transferred to the new context. If additional settings are required for the examples, the "convert.bat" script file is located in the project directory. If this is not the case, select "Project > Build Project" and compile the project. 9. Right-click the example project and select "Open Wind River VxWorks 7 Development Shell" from the shortcut menu. 10. In the command line run the "convert.bat" script. All project-specific defines and libraries are added to the project settings. Note You can ignore TCF errors displayed during execution of the "convert.bat" script. 11. Select "Project > Build Project" and compile the project. 8 Operating Manual, 08/2015, A5E36411535-AA

Examples for the DMAPI interface 2 A list of the supplied example programs and additional information for the DMAPI interface can be found in the compiled HTML help file in the following folder: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\dmapi" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\dmapi" Operating Manual, 08/2015, A5E36411535-AA 9

Examples for the DMAPI interface 10 Operating Manual, 08/2015, A5E36411535-AA

Example for function calls of the hardwaredependent 3 functions The example application "CPUIPC" illustrates the use of function calls for the hardwaredependent functions. You will find the source code of the example along with the corresponding generation files and the executable program in the following directory on your development computer: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\cpuipc" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\cpuipc" For Wind River Workbench, the example project "rtp_cpuipc" is supplied. This example project demonstrates the hardware-dependent functions of the SIMATIC IPC. The following functions can be called and demonstrated depending on the SIMATIC IPC on which the executable runs: "ReadTemperature()" "StartWatchdog()" "TriggerWatchdog()" "ReadFanStatus()" "ReadBatteryStatus()" Functions for the operating hours counter Setting the user LEDs Read and set the real-time clock Call rtp_cpuipc.vxe Operating Manual, 08/2015, A5E36411535-AA 11

Example for function calls of the hardware-dependent functions 12 Operating Manual, 08/2015, A5E36411535-AA

Examples for use of DP-Base calls 4 You can find a description of the DP-Base calls in the programming manual "SIMATIC NET PROFINET DP-Base Programming Interface for CP 5613/CP 5614" (file "mn_dp-baseapi_0.pdf"). In the examples for the PROFIBUS driver, a SIMATIC IPC is operated as the DP master. Another SIMATIC IPC serves as a DP slave. For PROFIBUS, an example application is supplied as a programming example for the DP master and DP slave: "dptest.c" This example application illustrates the use of the DP-Base calls. You can find it in the following directory: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\cp5622" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\cp5622" The file contains the code for the master and slave functionality. The examples must be compiled with preprocessor switches for master or slave operation. The following preprocessor switches can be used: Preprocessor switches #define MASTER_MODULE #define SLAVE_MODULE Description Applying this preprocessor switch compiles the programming example for master mode. Applying this preprocessor switch compiles the programming example for slave mode. The table below shows the example projects supplied for Wind River Workbench and the preprocessor switches that are activated in each project: Example project Activated preprocessor switches Description rtp_dpmaster #define MASTER_MODULE Master example project rtp_dpslave #define SLAVE_MODULE Slave example project During initialization of the PROFIBUS connection, the firmware fw_5612.bin is loaded from the hard disk. Before the first use, you must therefore copy the firmware to the folder on the target system specified as configuration parameter DP_CP5622_FIRMWARE_PATH. Operating Manual, 08/2015, A5E36411535-AA 13

Examples for use of DP-Base calls 4.1 rtp_dpmaster You can find the firmware file in the following directory: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\profibus\firmware_cp5612" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\profibus\firmware_cp5612" 4.1 rtp_dpmaster This example illustrates access to the master. It demonstrates the possibilities of APIs to obtain information via the connected slaves. After starting, the program begins data exchange. The input data received from the slave is read and returned to the slave as output data. The connection status as well as the input data of the slave are displayed on the console. Requirements Application is largely neutral in respect to the generated PROFIBUS configuration. The firmware file "fw_5612.bin" and the example configuration file "/ata0:1/dp_demo_master.ldb" must be present on the target system. The minimum requirement for the configuration file is a configured master and at least one configured slave. Call rtp_dpmaster.vxe 4.2 rtp_dpslave This example illustrates the communication between the slave and a master. After starting, the program begins data exchange. The input data received from the master is read and returned to the master as output data. The connection status as well as the output data of the master are displayed on the console. Requirements The application is largely neutral with regard to the generated PROFIBUS configuration. The firmware file "fw_5612.bin" and the example configuration file "/ata0:1/dp_demo_slave.ldb" must be present on the target system. The minimum requirement for the configuration file is the configured slave. Call rtp_dpslave.vxe 14 Operating Manual, 08/2015, A5E36411535-AA

Examples for use of DP-Base calls 4.3 Configuring the SIMATIC IPC for PROFIBUS 4.3 Configuring the SIMATIC IPC for PROFIBUS A SIMATIC IPC can be configured for PROFIBUS with the following configuration software: SIMATIC Manager STEP7 V5.5 (Service Pack 3, Hotfix 3) STEP 7 (TIA Portal) V13 or higher This configuration software is not included in the scope of delivery of the SIMATIC IPC Support Package for VxWorks. After installation, the configurations associated with the programming examples can be found on your development system at the following location: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\cp5622" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\cp5622" File Description Example_TIA.zap13 Configuration for use with STEP 7 (TIA Portal) V13 Example_STEP7.zip Configuration for use with STEP 7 V5.5 dp_demo_master.ldb Configuration file for DP master operation dp_demo_slave.ldb Configuration file for DP slave operation Master and slave are configured as follows: Master: Baud rate: 1.5 Mbps Address: 1 Slave: Baud rate: 1.5 Mbps Address: 3 Slot DP identifier Designation I address Q address 0 32DI 4 bytes input 1..4 1 32DO 4 bytes output 1..4 Operating Manual, 08/2015, A5E36411535-AA 15

Examples for use of DP-Base calls 4.3 Configuring the SIMATIC IPC for PROFIBUS Configuring 1. Open the configuration software. 2. Extract the supplied project or create a new project. As an alternative, you can use the supplied precompiled configuration files. In this case, skip the next step. 3. Compile the project. 4. Copy the compiled configuration file (*.ldb) to the hard disk of the SIMATIC IPC. 5. Copy the PROFIBUS firmware file "fw_5612.bin" to the hard disk of the SIMATIC IPC. You can find the firmware in the following directory: for VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\profibus\firmware_cp5612" for VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\profibus\firmware_cp5612" 6. Make certain that parameter "DP_CP5622_FIRMWARE_PATH" in your VxWorks image project points to the directory containing the firmware file. 7. At the start of the program, the "DP_start_cp()" waits for the path of the configuration file as a parameter. If you are using the supplied example programs, the following configuration files are used: rtp_dpmaster /ata0:1/dp_demo_master.ldb rtp_dpslave /ata0:1/dp_demo_slave.ldb Note The onboard Interface for PROFIBUS supports a maximum of 64 DP slaves. Note You can find additional information about configuring a PC station in the following manual from the SIEMENS Industry Online Support: "SIMATIC NET PC Software Commissioning PC Stations - Manual and Quick Start Configuration Manual". 16 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with CP 16xx driver: 5 You can find examples that illustrate the use of access functions in the supplied programming manual "SIMATIC NET PROFINET IO-Base User Programming Interface" (file PGH_IO-Base_0.pdf). The SIMATIC IPC Support Package includes example applications for the CP 16xx driver. A SIMATIC IPC with CP 1616 onboard is operated as the PROFINET IO controller in these examples. Another SIMATIC IPC with CP 1616 onboard serves as a PROFINET IO device. Three example source code files are provided for PROFINET: "pniocontroller.c": Programming example for IO controller "pniodevice.c": Programming example for IO device "pnioload.c": Programming example for CP-specific functions The example source code files are located in the following directory: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\cp16xx" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\cp16xx" The examples of the IO controller and IO device can be compiled via preprocessor switches for a specific mode (RT, IRT). The following preprocessor switches can be used: Preprocessor switches #define CONFIG_RT #define CONFIG_IRT Description Applying this preprocessor switch compiles the respective programming example for the RT mode. Applying this preprocessor switch compiles the respective programming example for the IRT mode. Operating Manual, 08/2015, A5E36411535-AA 17

Examples for PROFINET with CP 16xx driver: 5.1 rtp_pniocontroller The following table shows the example projects supplied for Wind River Workbench and the preprocessor switches that are activated in each project: Example project Activated preprocessor switches Description rtp_pniocontroller_rt #define CONFIG_RT Example project for IO controller using RT mode rtp_pniodevice_rt #define CONFIG_RT Example project for IO device using RT mode rtp_pniocontroller_irt #define CONFIG_IRT Example project for IO controller using IRT mode rtp_pniodevice_irt #define CONFIG_IRT Example project for IO device using IRT mode rtp_pnioload Example project for CP-specific functions. No further preprocessor switches are needed here. 5.1 rtp_pniocontroller Description The example "rtp_pniocontroller" demonstrates the communication possibilities of the PROFINET-IO-API for a PROFINET-controller with a SIMATIC IPC with CP 1616 onboard as PROFINET-device. The following functionalities of the PROFINET-IO-API are contained in the example: Connection establishment and termination Data exchange The following RTP-applications are supplied: File rtp_pniocontroller_rt.vxe rtp_pniocontroller_irt.vxe Description Example for use with PROFINET mode RT. Example for use with PROFINET mode IRT. After starting, the program registers all required callback functions and begins data exchange. As long as the PROFINET controller has not established a PROFINET application relation with the PROFINET device, the input and output data is invalid and the following message is output on the console: [DATA MARKED INVALID] RT In RT mode, the program on the controller sends the controller's own system time (formatted as an ASCII character string) cyclically as output data to the device. As input data, the controller cyclically receives the device's system time from the device as an ASCII character string and outputs it on the console: Dev date: '<transmitted local system time of the PNIO device>' 18 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with CP 16xx driver: 5.2 rtp_pniodevice IRT In IRT mode, the program on the controller increments an internal counter during the callback of the IRT cycle and sends its value cyclically as output data to the device. As input data, the controller cyclically receives a similarly generated count value from the device and outputs it on the console: Dev irt: '<transmitted local IRT counter of the PNIO device>' Pressing the "q" key terminates the PROFINET application relation and ends the program. Requirement To correctly execute the example program, a SIMATIC IPC with CP 1616 onboard and active "rtp_pniodevic" example program is required as the PROFINET device. The PROFINET name "PNIODEVICE1" must be assigned to the device. In IRT mode, the controller and device must be connected directly via PROFINET Port 2. Call RT rtp_pniocontroller_rt.vxe IRT rtp_pniocontroller_irt.vxe 5.2 rtp_pniodevice Description The example "rtp_pniodevice" demonstrates the communication possibilities of the PROFINET IO API for a PROFINET device with a SIMATIC IPC with CP 1616 onboard as PROFINET controller. The following functionalities of the PROFINET IO API are contained in the example: Connection establishment and termination Data exchange The following RTP applications are supplied: File rtp_pniodevice_rt.vxe rtp_pniodevice_irt.vxe Description Example for use with PROFINET mode RT. Example for use with PROFINET mode IRT. Operating Manual, 08/2015, A5E36411535-AA 19

Examples for PROFINET with CP 16xx driver: 5.2 rtp_pniodevice After starting, the program initializes the PROFINET device, registers all required callback-functions, and begins data exchange. As long as the PROFINET controller has not established a PROFINET application relation with the PROFINET device, the input and output data is invalid and the following message is output on the console: [DATA MARKED INVALID] RT In RT mode, the program on the device sends the device's own system time (formatted as an ASCII character string) cyclically to the controller. The device cyclically receives the controller's system time from the controller as an ASCII character string and outputs it on the console: Ctr date: '<transmitted local system time of the controller>' IRT In IRT mode, the program on the device increments an internal counter during the callback of the IRT cycle and sends its value cyclically to the controller. The device cyclically receives a similarly generated count value from the controller and outputs it on the console: Ctr irt: '<transmitted local IRT counter of the controller>' Pressing the "q" key terminates the PROFINET application relation and ends the program. Requirement To correctly execute the example program, a SIMATIC IPC with CP 1616 onboard and active "rtp_pniocontroller" example program is required as the PROFINET controller. In IRT mode, the controller and device must be connected directly via PROFINET Port 2. Call RT rtp_pniodevice_rt.vxe IRT rtp_pniodevice_irt.vxe 20 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with CP 16xx driver: 5.3 rtp_pnioload 5.3 rtp_pnioload Description The example program "rtp_pnioload" demonstrates the possibilities of the CP-specific functions that are offered with the PROFINET IO API. The following functionalities of the PROFINET IO API are contained in the example: Load configuration Firmware update of the PROFINET interface Reset of the PROFINET interface Procedure for loading a configuration To load a configuration, you need a configuration file in XDB format. The corresponding configuration files are also supplied for the PROFINET example programs. After transfer of an XDB file to the target system, you load the configuration with the following call: [vxworks *]# rtp_pnioload.vxe -l<path and file name of the XDB file> Procedure for updating the firmware of the PROFINET interface To update the firmware, you need a firmware file in FWL format. You can find the firmware that is currently released for use with the SIMATIC IPC Support Package for VxWorks in the directory: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\profinet\cp16xx\firmware" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\profinet\cp16xx\firmware" After transfer of an FWL file to the target system, you start the update with the following call: [vxworks *]# rtp_pnioload.vxe -f<path and file name of the firmware file> Procedure for resetting the PROFINET interface You start the reset of the PROFINET interface with the following call: [vxworks *]# rtp_pnioload.vxe -r<resettype> ResetType Description 0 ResetType PNIO_CP_RESET_SAFE is used. 1 ResetType PNIO_CP_RESET_FORCE is used. Requirement To correctly execute the example program, a SIMATIC IPC with a PROFINET onboard interface is required. Operating Manual, 08/2015, A5E36411535-AA 21

Examples for PROFINET with CP 16xx driver: 5.4 Configuring the SIMATIC IPC for PROFINET Call Load configuration rtp_pnioload.vxe -l<path and file name of the XDB file> Firmware update rtp_pnioload.vxe -f<path and file name of the firmware file> Reset rtp_pnioload.vxe -r<resettype> 5.4 Configuring the SIMATIC IPC for PROFINET Configuring the SIMATIC IPC A SIMATIC IPC with the CP1616 onboard can be configured for PROFINET using the following configuration software: NCM PC as of version 5.5 SP3 from DK-16xx PN IO STEP 7 (TIA Portal) as of V13 STEP 7 as of version 5.5 SP3 with HSP 1084 and 1085 (CP 1616 onboard V2.6) IO-Base user programming interface This configuration software not included in the SIMATIC IPC Support Package for VxWorks. After installation, the configurations for the IO controller associated with the programming examples can be found on your development system at the following location: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\cp16xx" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\cp16xx" File Description rt.zip Configuration for use with STEP 7 or NCM PC with RT mode. rt.xdb Configuration for download via the IO-Base user programming interface for the RT mode. rt.zap13 Configuration for use with STEP 7 (TIA Portal) V13 with RT mode. irt.zip Configuration for use with STEP 7 or NCM PC with IRT mode. irt.xdb Configuration for download via the IO-Base user programming interface for the IRT mode. irt.zap13 Configuration for use with STEP 7 (TIA Portal) V13 with IRT mode. The device is configured as follows: 22 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with CP 16xx driver: 5.4 Configuring the SIMATIC IPC for PROFINET IRT: Slot Module I address Q address 1 PNIODEV1 2 20 bytes DI/DO isochronous 0..19 0..19 The controller and device must be connected directly at PROFINET Port 2. RT: Slot Module I address Q address 1 PNIODEV1 2 20 bytes DI/DO 0..19 0..19 Configuring with STEP 7 or NCM PC Procedure as follows: 1. Extract the ZIP file supplied with the configuration software before running an example. 2. Compile the configuration contained within it. 3. Download the configuration to the PROFINET IO controller. Configuring via the IO-Base user programming interface Procedure for downloading via the IO-Base user interface: 1. Transfer the supplied XDB file to the target system before running an example. 2. Download the configuration to the PROFINET IO controller using the IO-Base function SERV_CP_download(). The SERV_CP_download() function is described in the programming manual of the SIMATIC NET IO-Base user programming interface. The pnioload programming example that uses the SERV_CP_download() function is included in the SIMATIC IPC Support Package for VxWorks. The "pnioload" program is already included as a kernel component in the CP 16xx driver and can be called on the console with the pnioload "-l/ata0:1/rt.xdb" command. You can find additional information about configuring a PC station in the following manual from the SIEMENS Industry Online Support: "SIMATIC NET PC Software Commissioning PC Stations - Manual and Quick Start Configuration Manual". Operating Manual, 08/2015, A5E36411535-AA 23

Examples for PROFINET with CP 16xx driver: 5.4 Configuring the SIMATIC IPC for PROFINET 24 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with PN driver: 6 You can find examples that illustrate the use of access functions in the supplied programming manual "SIMATIC NET PROFINET IO-Base User Programming Interface" (file PGH_IO-Base_0.pdf). In the example for the PN driver, a SIMATIC IPC is operated as the PROFINET controller. Another SIMATIC IPC with CP 1616 onboard serves as a PROFINET device. Four example source code files are supplied for PROFINET: "pnd_test.c": Example program for the PN driver "pnd_test_helper.c": Auxiliary functions for the example program "pnd_test_iob_core.cpp": PROFINET access and callback functions for the example program "pnd_test_iodu.c": IODU test functions for the example program The example source code files are located in the following directory: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\pn" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\pn" The preprocessor switch "PNIO_PNDRIVER" must be set when using the PN driver. For Wind River Workbench, the example project "rtp_pntest" is supplied. Another SIMATIC IPC with onboard PROFINET interface is used as a PROFINET device in the example configuration. The PROFINET CP16xx example "rtp_pniodevice_rt" can be used as the application on the device. Since the PN driver example program is independent of the configuration, you can also use other devices as a PROFINET device. In this case, the supplied example configuration must be adapted or a new configuration must be created. Operating Manual, 08/2015, A5E36411535-AA 25

Examples for PROFINET with PN driver: 6.1 rtp_pntest 6.1 rtp_pntest Description The example "rtp_pntest" is interactive and demonstrates all PROFINET calls available for the PN driver. The program is independent of the configuration, which means it can generally be used with any configured PROFINET slave. This description relates to the use of the supplied example configuration. The following RTP application is supplied: rtp_pntest.vxe After the start of the program, the following menu is output: PROFINET PN Driver test program =============================== 1...Help (show menu) =============================== 2...Open Controller 3...Close Controller =============================== 4...Set Mode PNIO_MODE_OFFLINE 5...Set Mode PNIO_MODE_CLEAR 6...Set Mode PNIO_MODE_OPERATE =============================== 7...Device Activate 8...Device Deactivate =============================== 9...I&M Data Read 10...I&M Data Write =============================== 11...IO Data Read/Write =============================== 0... QUIT With the input "2", you select the "Open Controller" menu item and thus initialize the PROFINET controller. After a short wait time, you can switch the controller to data exchange mode with menu item 6 and then read or write data with menu item 11. 26 Operating Manual, 08/2015, A5E36411535-AA

Examples for PROFINET with PN driver: 6.1 rtp_pntest As long as you are not writing output data, this data is marked as invalid. The connected PROFINET device with active example application "rtp_pniodevice_rt " therefore displays the following output: [DATA MARKED INVALID] The output data set in the controller-example program is interpreted and output in the device as an ASCII character string. We therefore recommend that only the value of printable ASCII-characters be entered as output data. The following output is displayed on the PROFINET-device: Ctr date: '<transmitted character string of the PNIO controller>' Since the PROFINET device sets the system time as a character string as input data, you must interpret the input values read in the controller-program as ASCII-characters. Requirement The example program is independent of the configuration. To correctly execute the example program, a SIMATIC IPC with CP 1616 onboard and active "rtp_pniodevice_rt" example program is required as the PROFINET-device. The PROFINET-name "PNIODEVICE1" must be assigned to the device. Call rtp_pntest.vxe Operating Manual, 08/2015, A5E36411535-AA 27

Examples for PROFINET with PN driver: 6.2 Configuring the SIMATIC IPC for PROFINET with PN driver 6.2 Configuring the SIMATIC IPC for PROFINET with PN driver A SIMATIC IPC with the PN driver can be configured for PROFINET using the following configuration software: STEP 7 (TIA Portal) V13 with HSP0074 or higher This configuration software is not included in the scope of delivery of the SIMATIC IPC Support Package for VxWorks. After installation, the configuration for the controller associated with the programming example can be found on your development system at the following location: VxWorks V6.9: "<WIND_BASE>\target\3rdparty\siemens\examples\pn" VxWorks V7: "<WIND_BASE>\pkgs\siemens\simatic_ipc_sp-w.x.y.z\examples\pn" File "pndrv_example.xml": pndrv_example.zap13 Description Configuration file for the PN driver Configuration for use with STEP 7 (TIA Portal) V13 The associated device is configured as follows: Slot Module I address Q address HW identifier 1 CP 1616 onboard V2.6 263 PNIODEV1 259 2 20 bytes DI/DO 0..19 0..19 266 Configuring with STEP 7 (TIA Portal) V13 1. Extract the ZAP13 file supplied with the configuration software before executing the example. 2. Compile the configuration contained within it. 3. Transfer the created configuration to the target system. You can find the configuration file "Station_Controller.PN Driver_1.PNDriverConfiguration.xml" in the project directory under "\AdditionalFiles\PNDriver\". 4. Enter the path and file name of the configuration file as the value of parameter PN_CONFIGURATION_FILE in the kernel configuration of your VxWorks image project. 28 Operating Manual, 08/2015, A5E36411535-AA

Index H Hardware-dependent function, 11 I Installation, 11 P PROFIBUS, 14 Configuring, 14 PROFINET, 17, 25 R ReadBatteryStatus(), 11 ReadFanStatus(), 11 ReadTemperature(), 11 RTP, 14 S StartWatchdog(), 11 T TriggerWatchdog(), 11 U User LED, 11 W Workbench, 18 Operating Manual, 08/2015, A5E36411535-AA 29

Index 30 Operating Manual, 08/2015, A5E36411535-AA