Development Kit - ERTEC 200 PN IO User Guide Copyright © Siemens AG 2008. All rights reserved. Technical data subject to change 1 DK_ERTEC200_PNIO_Description Version 3.0.
Edition (07/2008) Disclaimer of Liability We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly. Necessary corrections are included in subsequent editions. Suggestions for improvement are welcomed. Copyright © Siemens AG 2008.
Preface Purpose of this Manual This user guide describes the software functionality of the ERTEC 200 evaluation board. Introduction Software functions Example for the user Target Audience of this Manual This manual is intended for software developers who want to use the ERTEC 200 for new products.
This manual includes a description of the PROFINET IO stack for the EB 200 evaluation board that is updated as necessary. You can find the current version of the manual on the Internet at http://www.siemens.com/comdec. Guide To help you quickly find the information you need, this manual contains the following aids: o A complete table of contents as well as a list of all figures and tables in the manual are provided at the beginning of the manual.
Contents 1 Introduction ............................................................................................................................7 1.1 1.2 1.3 1.4 2 Scope of Delivery ................................................................................................................................... 7 Content and Target Audience of this User Guide................................................................................... 7 Additional Information...................................
List of Figures Figure 1: PROFINET IO Device with EB 200 in a Minimum Configuration ............................................................ 10 Figure 2: EB 200 Evaluation Board Imported in hardware catalog of SIMATIC Manager...................................... 11 Figure 3: EB 200 Evaluation Board Imported in hardware catalog of NCM PC ..................................................... 11 Figure 4: Configuring a PROFINET Device with EB 200 in HW CONFIG ..............................................
1 Introduction PROFINET IO is an automation concept within PROFINET for implementation of modular, distributed applications. With PROFINET IO, you create automation solutions using the same familiar methods as with PROFIBUS. PROFINET IO is implemented with both the PROFINET standard for automation devices and the STEP 7 engineering tool. This means that you have virtually the same application view in STEP 7 – regardless of whether you are configuring PROFINET or PROFIBUS devices.
1.4 Procedure when Using ERTEC 200 to Develop Your Own PROFINET IO Device The DK-ERTEC200 PN IO development kit contains several CDs. A reference to these CDs is provided in subsequent sections. Procedure How to Develop Your Own PROFINET IO Device Software Quickly and Easily Step 1 2 3 4 5 6 7 8 Procedure Install the Tornado 2.2.1 development tools (Note1) on your PC (Section 2.8.1). Install the NCM-PC configuration tool (Note2) or STEP 7 (Note3) on your PC (Section 2.4).
2 2.1 Commissioning the User Example with VxWorks Operating System Requirements The PNIO Development Kit provides a complete user example for a PROFINET IO device. It can be executed on the Siemens AG ERTEC 200 evaluation board. This section explains how to commission a PROFINET IO system, consisting of a PN-IO controller and a PN-IO device, on this platform. The following components are necessary: • DK-ERTEC 200 PN-IO • Windriver compiler/linker (Tornado) V 2.2.1 • Windriver VxWorks V 5.5.
(1) Connect PC(COM1) to RS232 of EB200 (2) Connect TornadoShell/FTP server to EB200 via Ethernet (3) Connect CPU319 to device Figure 1: PROFINET IO Device with EB 200 in a Minimum Configuration The following cables are connected for downloading: • Zero modem cable from the RS232 interface of the EB 200 to the COM1 interface of the PC (1). • Crossed Ethernet cable from the Ethernet debug interface of the EB 200 to the FTP interface of the PC (2).
When configuring a PROFINET IO network, you have the same look & feel as with PROFIBUS. You can use a drag-and-drop operation to add a device to the configuration and also to place modules. SIMATIC Manager: The ERTEC 200 evaluation board contains various example modules in the GSDML file that represent digital input and output modules. However, these are only "virtual" modules that are not physically present.
2.5 Creating a PROFINET IO Configuration with STEP 7 The Simatic_Step7 directory on the DK-ERTEC 200 PN IO CD contains a finished STEP 7 project suitable for the device application. It includes the following: • Bus configuration with CPU319 IO controller and PNIO device • Configuration of the inputs and outputs of the PNIO device • STEP 7 program with alarm OBs for process alarm, diagnostic alarm (OB 82), and return of submodule alarm.
The following settings were made in the example configuration: IP address of the IO controller: IP address of the IO device: 192.168.20.101 192.168.20.102 If changes (such as I-addresses, O-addresses, or IP addresses) are made in HW Config, they should be activated with the orange Save and compile button. Once the compile operation has been completed without errors, the red Download to module button can be used to download the PROFINET IO bus configuration to the IO controller.
(2) Browse (3) Assign IP address and subnet mask (4) Assign IP configuration Figure 6: Entering the Configured IP Address and Subnet Mask and Assigning PNIO Controllers (3) Specify the IP address set in the bus configuration, the subnet mask, and possibly the router address. In the user example, these values are: IP = 192.168.20.101, Subnet = 255.255.255.0, no router. (4) Press the Assign IP Configuration button to download the parameters to the PN-IO controller. 2.5.
• • When a return of submodule alarm occurs, a counter in DB 10 is incremented in the associated alarm (OB83). This counter indicates the number of return of submodule alarms that have occurred. Because no additional data are provided by the IO device for this alarm, SFC54 is not called in this case. Cyclic OB1 is empty. Access to the I/O data of the devices takes place directly by the download or transfer commands to the process image and is not discussed further here.
When it receives the bus configuration, the S7 CPU makes cyclic attempts to establish a connection to the IO device. However, because the device is not yet active, an error status is displayed on the CPU by means of the red LEDs (SF, BF2). If the device starts up at a later time, the CPU detects this automatically, the IO data exchange is recorded, and the error LEDs are extinguished. However, the firmware for the IO device must first be compiled, downloaded to the device, and started. 2.
2.7 Installing the CP1616 Controller The documents for installing the CP1616, the Linux driver for CP1616, and the user application are included on the supplied DK-CP16xx PN IO V2.1.3 CD. Before performing the installation, read the installation guide carefully. The CP1616_Controller_Application directory on the DK-ERTEC 200 PN IO V3.0 CD contains an application for the CP1616 Controller.
Note: The evaluation version of PID 2.0 is provided exclusively for trial use of the development tools and the SW of the development kit. Further use of the evaluation version is not supported by WindRiver, and it is not approved for development of products. 2.8.2 Transferring the EB 200 BSP to the Tornado Directory For PROFINET IO, a special BSP for the evaluation board for VxWorks is included with the development kit. This BSP must be copied to the Tornado BSP directory.
2.8.4 Transferring Example Sources, Project Files, and Compiled PNIO Objects The DK-ERTEC 200 PN IO V3.0 CD contains a Tornado workspace with project settings and prelinks. The project is located in folder DevKit200. Copy the complete folder to your work directory (e.g. to the Tornado installation directory: Tornado2.2\target\proj). Following directories are available to the user: • eb200_devkit ERTEC 200 project settings • eb200_application.
2.8.5 Compiling a PROFINET IO Device Example Application 1. Start Tornado and open the Tornado Workspace devkit_eb200.wsp 2. Select the Tornado Project devkit_eb200.
2.8.6 Preparing to Commission the Complete System Before the system can be commissioned, an FTP server and a terminal program must be set up and configured. To download the PROFINET IO device application to the development board, an FTP server that provides access to the file with the compiled complete system must be installed. The development board includes a standard boot loader in the Flash that downloads the complete system to the onboard RAM via the FTP following a board reset.
General Security Specify the following setting: Host Security Specify the following setting: Figure 11: Configuring the FTP Server 2.8.6.2 Configuring the Terminal Program for Message Displays Our example uses the Teraterm terminal program, which can be downloaded as freeware from the Internet.
2.8.7 Downloading User Software to the Evaluation Board The following connections must be made: ¾ Connect power supply to evaluation board ¾ Connect hyperterminal to the message display interface and start it (2). ¾ Connect the Ethernet interface of the PC with installed FTP server and the compiled software to the debug Ethernet port of the EB 200. Set TCP/IP address 192.168.10.1 on the Ethernet port of the PC (3). ¾ Start the FTP server.
The ? character is used to display a list of all possible inputs [VxWorks Boot]: ? ? - print this list @ - boot (load and go) p - print boot params c - change boot params l - load boot file g adrs - go to adrs d adrs[,n] - display memory m adrs - modify memory f adrs, nbytes, value - fill memory t adrs, adrs, nbytes - copy memory e - print fatal exception v - print boot logo with version n netif - print network interface device address N - set ethernet address $dev(0,procnum)host:/file h=# e=# b=# g=# u=usr
[VxWorks Boot]: ^c '.' = clear field; '-' = go to previous field; ^D = quit boot device : ifeast0 processor number : 0 host name : xena file name : vxWorks.st vxworks.stripped inet on ethernet (e) : 192.168.0.9 192.168.10.2 inet on backplane (b): host inet (h) : 192.168.0.66 192.168.10.
Action 2 Change the MAC-Address as given on the label: Input Byte 1 to Byte 6 of the MAC-Address. After Input all 6 Bytes the data will be stored in the flash. Following text is displayed on the terminal: 080006020100- 00 0E 8C 9B A2 C6 New Ethernet Address is: 00:0e:8c:9b:a2:c6 [VxWorks Boot]: From now on, download can take place via the FTP server, provided that the FTP server has been started and EB200 is selected under menu item Security Æ User/Rights Security Dialog Æ User Name.
The download operation is now complete, and the communication between controller and device is automatically started. Following outputs are displayed on the terminal: Link status information Infos about PROFINET IO communication (e.g RT Class 1) Number of modules and modulinformation End of parameterization Write record 0x10000 with data length = 8 Start of cyclic date exchange 1. 2. 3. 4.
2.9 No. 1 2 3 Support for Commissioning Problems Problem Download with FTP server does not take place. The following message is displayed on the terminal: Error loading file: errno = 0x3c.
3 PROFINET IO Software Setting 3.1 Directory Structure of the DK-ERTEC 200 PN IO V3.0 Development Kit CD The DK-ERTEC 200 PN IO V3.0 Development Kit CD contains the following directory structure: Figure 18: Directory Structure of the DK-ERTEC 200 PN IO V3.
3.2 Configuration and User Files for the Application The example application software consists following software modules. The default directory is \Application Module Content Description usriod_main_rt.c Application main program for RT Startup of PNIO-stack, main loop with functions initiated by keyboard. usriod_main_irt_c2.c Application main program for IRT Class 2 Startup of PNIO-stack, main loop with functions initiated by keyboard. usriod_main_dba.
3.3 Interface Description A quick-start guide, the procedure, and an exact description of all PROFINET IO device functions with the data types and address structures used are presented in detail in document /5/. The following sections in document /5/ are relevant for PROFINET IO device users: o Section 2 Overview of PROFINET IO Device Software o Section 3 General information for PROFINET IO Software Creation o Section 4 Interface Description Copyright © Siemens AG 2008. All rights reserved.
4 Creating GSD Files The properties of a PROFINET device are stored in a Generic Station Description (GSD) file in XML format. The descriptive language is called GSDML (ML stands for markup language). The GSD file must be created by the PN IO device manufacturer and is imported by the engineering tool (STEP 7) to create the bus configuration. The detailed structure of the GSD file is described in /3/.
5 5.1 SNMP (Simple Network Management Protocol) Diagnostics via SNMP Via SNMP (Simple Network Management Protocol), a network management station can configure and monitor stations with SNMP capability. To this end, a management agent is installed in the station. The management station exchanges data via so-called get and set requests. 5.2 Management Information Base MIBs An MIB (Management Information Base) is a device database. SNMP clients access this database in the device.
sysUpTime Read only sysContact Read/write sysName Read/write sysLocation Read/write sysServices Read only Time after the last reset, for example, after power up – specified in multiples of hundredths of a second. A contact name can be entered here; factory setting: empty string. The possible value is a string with up to 255 characters. Name of the device; factory setting: empty string The possible value is a string with up to 255 characters. Device location; factory setting: empty string.
Example The IfOperStatus.1 variable determines the operating state (up, down) of Port 1 6 Important Information and Limitations 6.1 Number of PNIO Devices The current implementation of the system adaptation only permits one device instance. Multidevice functionality is not currently implemented in the system adaptation. 6.2 Parameters for One Device • • • 6.3 For the current implementation, 32 modules (slots) with up to 8 subslots were tested and released.
7 7.
7.2 References: /1/ IEC 61158 Part 5 PROFINET IO Application Layer Service Definition Version 1.0 PROFIBUS Nutzerorganisation e.V. /2/ IEC 61158 Part 6 PROFINET IO Application Layer Protocol Specification Version 1.0 PROFIBUS Nutzerorganisation e.V. /3/ GSDML Specification for PROFINET IO Version 1.0 April 2004, Order No: 2.352 PROFIBUS Nutzerorganisation e.V. /4/ EB 200 Manual V1.1.1 (EB200_Handbuch_V111.PDF); /5/ PNIO_DK_User_Interface_Description_V3.0.