Siemens S7 Series Communication Instruction Manual

Siemens S7 Series Communication Instruction Manual

Communication via knx gateway

Advertisement

Quick Links

Communication with
S7 CPU via KNX
Gateway
S7-1200, S7-1500, PROFINET, "Triple-X PROFINET +
KNX" Universal Gateway
https://support.industry.siemens.com/cs/ww/en/view/109739689
Siemens
Industry
Online
Support

Advertisement

Table of Contents
loading

Summary of Contents for Siemens S7 Series

  • Page 1 Communication with S7 CPU via KNX Gateway S7-1200, S7-1500, PROFINET, “Triple-X PROFINET + Siemens KNX” Universal Gateway Industry Online https://support.industry.siemens.com/cs/ww/en/view/109739689 Support...
  • Page 2: Warranty And Liability

    Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications – e.g. Catalogs – the contents of the other documents have priority. We do not accept any liability for the information contained in this document.
  • Page 3: Table Of Contents

    Table of Contents Table of Contents Warranty and Liability ....................2 Task ........................4 Introduction ................... 4 Overview of the automation task ............4 Solution....................... 5 Overview....................5 Description of the core functionality ............. 7 Hardware and software components ........... 8 Mode of Operation ...................
  • Page 4: Task

    1 Task Task Introduction Gateways enable communication between two networks/bus systems that use different communications protocols. KNX is a fieldbus for building automation. Technically, KNX is the successor to the European Installation Bus (EIB), adding communication mechanisms and transmission media. The functionality of a KNX system can be extended by integrating an S7 CPU into a KNX system via a gateway.
  • Page 5: Solution

    2 Solution Solution Overview Diagrammatic representation Representing all SIMATIC controllers, this solution uses an S7-1200 CPU. The diagrammatic representation below shows the most important components for communication between an S7-1200 CPU and a KNX network using the “Triple- X PROFINET + KNX” universal gateway from MBS GmbH. Figure 2-1: Block diagram of the solution with the components used S7-1200 CPU PROFINET...
  • Page 6: Entry Id: 109739689, V1.0

    2 Solution The following table shows the relevant interfaces of the gateway for this application example: Table 2-1: Gateway interfaces Interface label Communication Network Connected device medium PROFINET 1 or Ethernet PROFINET SIMATIC CPU PROFINET 2 (S7-1200 CPU) Ethernet PG / PC Twisted pair cable KNX devices (incl.
  • Page 7: Description Of The Core Functionality

    2 Solution Description of the core functionality Configuration The connection between the S7-1200 CPU and the gateway is configured via  the configuration of the gateway as distributed I/O in STEP 7 (TIA Portal).  configuration files of the gateway (cfg and txt files) (see Figure 3-3) that reference each other.
  • Page 8: Hardware And Software Components

    (RS485) the gateway web server’s page, Linux 2.6.34.7 #267 “Help > Device info”. Software module: V2_05W Alternative: RS232 Hardware module: 15.1.1 Siemens Gamma KNX 5WG1227-2AB11 Operating and installation room control unit instructions https://support.industry.siemens.c om/cs/ww/en/view/76776544 Siemens Gamma KNX 5WG1223-2DB13 wall switch triple...
  • Page 9 2 Solution Software components Table 2-4: Software components Component Article number Note SIMATIC STEP 7 6ES7822-1..04-.. Professional V14 (TIA Portal) The latest GSDML files are GSDML-V2.31-MBS- Manufacturer: MBS available directly from MBS MICRO3004-20150206 GmbH GmbH. The GSDMLV2.31 file was used in this example. The files are available in the “AdditionalFiles –...
  • Page 10: Mode Of Operation

    3 Mode of Operation Mode of Operation The data between the two bus systems, PROFINET and KNX, is exchanged between the drivers (PROFINET, KNX) in the gateway via data point mapping. The data points are described in the pnetd1.txt and eib1.txt configuration files and mapped to each other in the dispatch.txt dispatch file.
  • Page 11: Data Point Mapping

    3 Mode of Operation Data point mapping The following figure shows all of the data used and the process image of the S7- 1200 CPU for the configuration with the gateway. Please note: The input or output signal type always refers to the “perspective” of the respective device.
  • Page 12: Correlation Of The Gateway Configuration Files

    3 Mode of Operation Correlation of the gateway configuration files The gateway is configured using various configuration files (cfg, txt files). Once programming is complete, these files are uploaded in a text editor (for example, Notepad++) using the integrated web server in the gateway or directly edited and enabled in the integrated web server.
  • Page 13 3 Mode of Operation In the gateway configuration files, KNX objects are identified by “eib…” and Note PROFINET objects are identified by “pnetd…”. This application example describes how to edit and customize these files so that they can be used for data exchange (see Chapter 4.4 Gateway: Editing configuration files).
  • Page 14: Configuration And Project Engineering

    4 Configuration and Project Engineering Configuration and Project Engineering This chapter describes the configuration in STEP 7 (TIA Portal) and the programming of the gateway configuration files. If you want to use the sample configuration of this application example without any changes, you can download the STEP 7 project directly to the S7-1200 CPU and the gateway configuration to the gateway (see Chapter 5.3.1 Commissioning the...
  • Page 15 4 Configuration and Project Engineering Action Comment Use drag and drop to move the “UGW-micro” from the hardware catalog to the “Devices & networks” editor. Click “Not assigned”) for the UGW-micro and select the interface of the S7-1200 CPU used (“PLC_1.PROFINET…”).
  • Page 16: Gateway: Setting The Lan Ip Address

    4 Configuration and Project Engineering Gateway: Setting the LAN IP address Table 4-2: Setting the IP address of the gateway Action Comment Make sure that See Chapter 5.2 Installing the hardware  your computer is in the same subnet as all the components involved, ...
  • Page 17 4 Configuration and Project Engineering Action Comment When you have logged back on to the gateway using the new IP address, a complete system restart is required. Click the “Restart required!” button to perform a restart. Use the “complete system restart” option to restart the gateway as described in Chapter 4.6.
  • Page 18: Gateway: Data Backup

    4 Configuration and Project Engineering Gateway: Data backup Table 4-3: Perform the gateway data backup Action Comment Make sure that See Chapter 5.2 Installing the hardware  your computer is in the same subnet as all the components involved,  all the components are connected using LAN cables, ...
  • Page 19: Gateway: Editing Configuration Files

    4 Configuration and Project Engineering Gateway: Editing configuration files This chapter provides a detailed description of the structure and editing of the gateway configuration files. You can edit the files directly in the integrated web server or download the files, edit them with a text editor (for example, Notepad++) and then upload them back to the gateway.
  • Page 20: Configuration Files

    4 Configuration and Project Engineering 4.4.2 Configuration files For the configuration of the gateway, the following files are edited and then downloaded to the gateway using the integrated web server or directly edited in the integrated web server.  pnetd1.cfg ...
  • Page 21: Eib1.Txt" Gateway File

    4 Configuration and Project Engineering “eib1.txt” gateway file 4.4.4 The data points of the KNX protocol and their properties are defined in the “eib1.txt” configuration file. Table 4-6: Structure of the “eib1.txt” gateway file Description Comment [M failure] The KNX data points have the following structure: name = EIB Failure [<def>...
  • Page 22: Pnetd1.Txt" Gateway File

    4 Configuration and Project Engineering “pnetd1.txt” gateway file 4.4.5 The data points of the PROFINET protocol and their properties are defined in the “pnetd1.txt” configuration file. Table 4-7: Structure of the “pnetd1.txt” gateway file Description Comment #--------------------------------- The addresses of the PROFINET data points have the following structure: # STATUS #---------------------------------...
  • Page 23: Pnetd1.Cfg" Gateway File

    4 Configuration and Project Engineering “pnetd1.cfg” gateway file 4.4.6 The PROFINET device settings are made in the “pnetd1.cfg” configuration file. When configuring, make sure that the STEP 7 configuration and the gateway’s configuration file match exactly. Table 4-8: Structure of the “pnetd1.cfg” gateway file Description Comment The device configuration of the...
  • Page 24: Dispatch.txt" Gateway File

    4 Configuration and Project Engineering “dispatch.txt” gateway file 4.4.7 The assignment between KNX data points and PROFINET data points is made in the “dispatch.txt” configuration file. Table 4-9: Structure of the “dispatch.txt” gateway file Description Comment # S7 --> KNX Syntax of a dispatch entry: [<route source>...
  • Page 25: Gateway: Overview Of The Configuration

    4 Configuration and Project Engineering Gateway: Overview of the configuration The following overview shows you the correlation of the gateway configuration files. eib1.txt [M 1/1/3] name = KNXS7 switch format = UINT1 [S 1/1/2] name = S7KNX value format = UINT1 dispatch.txt # S7 ...
  • Page 26: Gateway: Restart

    4 Configuration and Project Engineering Gateway: Restart Note For changes of the configuration files to be activated, restart the gateway. If changes are made in the “pnet1.cfg” PROFINET driver file, a complete restart (de-energized) of the gateway is required. Table 4-10: Restarting the gateway Action Comment Click the “Restart required!”...
  • Page 27: Installation And Commissioning

    5 Installation and Commissioning Installation and Commissioning This chapter describes the steps necessary to start up the example. Note Always follow the below installation guidelines:  “S7 1200 Programmable Controller” System Manual  Gateway manual Installing the software Install the latest version (V14 or higher) of STEP 7 (TIA Portal) on your computer. No additional software is needed for configuring the “Triple-X PROFINET+KNX”...
  • Page 28: Installation Under Plant Conditions

    5 Installation and Commissioning 5.2.2 Installation under plant conditions Under “real” conditions, a SIMATIC controller is normally directly connected to a KNX gateway. The gateway is integrated into a PROFINET network via the two PROFINET interfaces and connected to the KNX network via the KNX interface. Figure 5-2: Installation under plant conditions 24V DC 24V DC...
  • Page 29: Commissioning

    5 Installation and Commissioning Commissioning This chapter describes the steps for downloading the sample project to the S7-1200 CPU and the sample configuration to the gateway. 5.3.1 Commissioning the gateway Note For some actions in the gateway web server, you need a user name and password.
  • Page 30 5 Installation and Commissioning Action Comment Click “OK” to confirm the following message. Note Restoring the data backup overwrites the gateway’s IP address setting (here: 192.168.0.3). Enabling the restored configuration requires a restart. Select “Yes” to confirm the message. Communication with S7 CPU via KNX Gateway Entry ID: 109739689, V1.0, 06/2017...
  • Page 31: Commissioning The S7-1200 Cpu

    5 Installation and Commissioning 5.3.2 Commissioning the S7-1200 CPU Table 5-2: Commissioning the S7-1200 CPU Action Comment Start STEP 7 (TIA Portal) and open the Requirement: You have STEP 7 (TIA Portal) “MBS_KNX” STEP 7 project from the V14 or higher installed on your computer. “109740160_KNX_S7_PROJ_Vxx.zip”...
  • Page 32 5 Installation and Commissioning Action Comment Acknowledge the download dialogs and set the S7-1200 CPU to RUN. After the download, the devices have also been assigned their PROFINET IP addresses. In the project tree, select the S7-1200 (PLC_1) and in the menu bar, click “Go online”. If everything was parameterized and downloaded correctly, all icons are green.
  • Page 33: Operation Of The Application Example

    6 Operation of the Application Example Operation of the Application Example You can verify communication between the S7-1200 and the KNX devices using the watch table in TIA Portal and the functions of the KNX devices. Table 6-1: Monitoring and modifying tags using the watch table Action Comment In STEP 7 (TIA Portal), open the...
  • Page 34 6 Operation of the Application Example Action Comment On the KNX wall switch triple, press A1. In the watch table, monitor the value change of the “readValBool” tag. Enter a new value for the “setValInt” tag. Click the button to modify the value. On the KNX room control unit, navigate to the “i”...
  • Page 35: Links & Literature

    7 Links & Literature Links & Literature Table 7-1: Links Topic Siemens Industry Online Support https://support.industry.siemens.com Download page of the entry https://support.industry.siemens.com/cs/ww/en/view/109739689 Product page with gateway data sheet, manual http://www.mbs-solutions.de/profinet-knx Library of general functions (LGF) for STEP 7 (TIA Portal) and S7-1200 / S7-1500 https://support.industry.siemens.com/cs/ww/en/view/109479728...
  • Page 36: History

    9 History History Table 9-1 Version Date Modifications V1.0 06/2017 First version Communication with S7 CPU via KNX Gateway Entry ID: 109739689, V1.0, 06/2017...

This manual is also suitable for:

S7-1200S7-1500

Table of Contents