Anda di halaman 1dari 42

Application Description 05/2016

Communication with S7 CPU


via BACnet Gateway
S7-1200 / PROFINET / UGW//micro PROFINET RS232/RS485

https://support.industry.siemens.com/cs/ww/en/view/109476182

Warranty and Liability

Warranty and Liability

Siemens AG 2016 All rights reserved

Note

The Application Examples are not binding and do not claim to be complete with regard to
configuration, equipment or any contingencies. The Application Examples do not
represent customer-specific solutions. They are only intended to provide support for
typical applications. You are responsible for the correct operation of the described
products. These Application Examples do not relieve you of the responsibility of safely
and professionally using, installing, operating and servicing equipment. When using these
Application Examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these Application Examples at any time and without prior notice. If there are
any deviations between the recommendations provided in this Application Example and
other Siemens publications e.g. Catalogs the contents of the other documents shall
have priority.

We do not accept any liability for the information contained in this document.
Any claims against us based on whatever legal reason resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of fundamental contractual obligations (wesentliche
Vertragspflichten). The compensation for damages due to a breach of a
fundamental contractual obligation is, however, limited to the foreseeable damage,
typical for the type of contract, except in the event of intent or gross negligence or
injury to life, body or health. The above provisions do not imply a change of the
burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security
information

Siemens provides products and solutions with industrial security functions that support the
secure operation of plants, systems, machines and networks.
In order to secure plants, systems, machines and networks against cyber threats it is
necessary to implement (and to maintain continuously) a holistic, state-of-the-art industrial
security concept. With this in mind, Siemens products and solutions are only part of such
a concept.
It is the clients responsibility to prevent unauthorized access to his plants, systems,
machines and networks. Systems, machines and components should only be connected
with the companys network or the Internet, when and insofar as this is required and the
appropriate protective measures (for example, use of firewalls and network segmentation)
have been taken.
In addition, the recommendations by Siemens regarding the respective protective
measures have to be observed. For more information on industrial security, visit
http://www.siemens.com/industrialsecurity.
Siemens products and solutions undergo continuous development to make them even
more secure. Siemens explicitly recommends to carry out updates as soon as the
respective updates are available and always only to use the current product versions. The
use of obsolete or no longer supported versions can increase the risk of cyber threats.
In order to always be informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed at http://www.siemens.com/industrialsecurity.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1

Task ..................................................................................................................... 4
1.1
1.2

Solution............................................................................................................... 5
2.1

2.2

2.3
3

Siemens AG 2016 All rights reserved

STEP 7 (TIA Portal) device configuration .......................................... 14


Editing the UGW configuration files ................................................... 16
Editing in the integrated web server ................................................... 17
Editing in an editor (for example, Notepad++) ................................... 18
UGW device configuration.................................................................. 20
Configuration files ............................................................................... 20
UGW file pnetd1.cfg ......................................................................... 21
UGW file pnetd1.txt .......................................................................... 22
UGW file dispatch.txt ....................................................................... 25
UGW file bac1.txt ............................................................................. 27
UGW file bac1.cfg ............................................................................ 29
Overview of the UGW configuration ................................................... 30

Installation and Commissioning .................................................................... 31


5.1
5.1.1
5.1.2
5.2
5.3
5.3.1
5.3.2

Data points and signal course ............................................................ 10


Process image: S7 CPU and UGW (BACnet) .................................... 11
Correlation of the UGW configuration files ......................................... 12

Configuration and Settings............................................................................. 14


4.1
4.2
4.2.1
4.2.2
4.3
4.3.1
4.3.2
4.3.3
4.3.4
4.3.5
4.3.6
4.4

Overview............................................................................................... 5
Recommendation ................................................................................. 6
Assumed knowledge ............................................................................ 6
Description of the core functionality ..................................................... 7
Configuration ........................................................................................ 7
Data types ............................................................................................ 7
Hardware and software components ................................................... 8

Function Principle ........................................................................................... 10


3.1
3.2
3.3

Introduction ........................................................................................... 4
Overview of the automation task .......................................................... 4

Installing the hardware ....................................................................... 31


Setup under laboratory conditions ..................................................... 31
Setup under plant conditions .............................................................. 32
Installing the software......................................................................... 33
Commissioning ................................................................................... 33
Commissioning the UGW ................................................................... 33
Commissioning the S7-1200 CPU ..................................................... 36

Operating the Application ............................................................................... 38


6.1
6.2

Changing values on the SIMATIC side .............................................. 38


Changing values on the BACnet side ................................................ 40

Links & Literature ............................................................................................ 42

Contact MBS GmbH......................................................................................... 42

History............................................................................................................... 42

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

1 Task
1.1 Introduction

Task

1.1

Introduction
Gateways enable the communication between two networks that use different
communication protocols.
BACnet (Building Automation and Control Networks) is a network protocol used in
technical building automation.

1.2

Overview of the automation task


The task is to create a communication connection between a SIMATIC PLC via
PROFINET interface, using a BACnet gateway.
The objective of this application example is to outline which gateway is suitable for
this, and how the configuration between SIMATIC PLC and the gateway is realized.
In the following text PROFINET is abbreviated with PN.

Siemens AG 2016 All rights reserved

The figure below provides an overview of the automation task.


Figure 1-1

BACnet
Gateway

SIMATIC
PLC

BACnet devices

PROFINET

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

BACnet

2 Solution
2.1 Overview

Solution

2.1

Overview

Schematic layout
An S7-1200 CPU is used in place of all SIMATIC PLCs. The layout diagram below
shows the most important components of the solution for the communication
between an S7-1200 CPU and the UGW//micro PROFINET RS232/485 universal
gateway by MBS, in the following abbreviated by UGW.
Figure 2-1: Schematic layout

PG / PC
UGW//micro
PROFINET
RS232/485

Siemens AG 2016 All rights reserved

S7-1200 CPU

BACeye (optional)
Browser

LAN / BACnet

PROFINET

BACnet devices

The UGW enables communication via different bus systems (PROFINET,


BACnet) and different communication protocols between an S7-1200 CPU and
BACnet devices.
In this application example, no BACnet devices are used. The UGW web server
and the optional BACeye software by MBS GmbH are used for verifying the correct
communication.
The relevant interfaces of the UGW for this application example are represented in
the following table:
Table 2-1: UGW interfaces
Interface name

Communication
medium

Network

PROFINET 1 or
PROFINET 2

Ethernet

PROFINET

LAN

Ethernet

LAN /
BACnet

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Connected device
SIMATIC PLC
(S7-1200 CPU)
Configuration PC/PG or
BACnet devices

2 Solution
2.1 Overview
Recommendation
In order to obtain a separation between both Ethernet networks, PROFINET and
LAN / BACnet, we recommend you to connect the S7-1200 to the PROFINET
interface of the UGW and the BACnet devices to the LAN interface. You can then
manage both networks independent of each other and, if necessary, also use the
same IP addresses on PROFINET and BACnet.
The application example on hand deals exclusively with connecting BACnet via the
LAN interface. If several devices shall be connected to the LAN interface, a switch
must be interconnected.
Advantages

Siemens AG 2016 All rights reserved

The solution presented here offers the following advantages:

The application example can simply be adjusted to other controller families.


The S7-1200 CPU is used here in place of all other SIMATIC PLCs with
PROFINET IO interface. This makes the solution scalable for the respective
application case.

The application example can be simply adjusted for plant expansions. The
configuration of the UGW is performed with a standard text editor or directly in
the integrated web server of the UGW.

Configuring and commissioning the UGWs does not require any additional
software. Standard tools such as internet browser and a simple text editor are
sufficient. A special configuration tool for the UGW is not required.

Topics not covered in this application

In the case of differences in the documentation on the topic of BACnet, the


documentation by MBS GmbH is always given priority.

The document on hand does not replace the UGW//micro manual.

The application example on hand only gives an introduction into BACnet


communication with SIMATIC PLCs. More information about BACnet gateway
can be found in the UGW//micro manual or directly by contacting MBS GmbH.

The communication between UGW and BACnet devices is not part of this
application example.

Training, service and support for UGW//micro PROFINET RS232/485 are


solely provided by MBS GmbH. Siemens AG does not conduct training
sessions on the topic of BACnet.

Assumed knowledge

Basic knowledge of STEP 7 (TIA Portal) programming is assumed.

Basic knowledge of PROFINET and BACnet communication is assumed.

Validity
This application is valid for

STEP 7 (TIA Portal) V13 SP1 or later

S7-1200 CPU firmware version 4.1 or higher (adjustable for S7-1500 firmware
1.7 or higher)

MBS UGW//micro PROFINET RS232 as well as


MBS UGW//micro PROFINET RS485

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

2 Solution
2.2 Description of the core functionality

2.2

Description of the core functionality

Configuration
The connection between S7-1200 CPU and UGW is handled via

the configuration in STEP 7 (TIA Portal).

the configuration files, consisting of cfg files and txt files (see Figure 3-3) that
reference each other. These files are loaded into the UGW by means of
integrated web server or are edited directly.

Data types
This application example contains a STEP 7 project and a data record for the
UGW, in which data of different data type is exchanged in both directions between
an S7-1200 CPU and an UGW.
All common formats (S7-1200 / UGW) were configured as an example:
Table 2-2: Data types SIMATIC / UGW

Siemens AG 2016 All rights reserved

SIMATIC (S7-1200)

UGW

BOOL

BIT

USINT

UINT8

UINT

UINT16

UDINT

UINT32

SINT

SINT8

INT

SINT16

DINT

SINT32

REAL

FLOAT32

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

2 Solution
2.3 Hardware and software components

2.3

Hardware and software components


The application example has been created with the following components.

Hardware components
Table 2-3: Hardware components

Siemens AG 2016 All rights reserved

Component

Qty

Article number

Note

SIMATIC S7-1200
FW4.1

6ES7212-1AE40-0XB0

Alternatively, any other S7-1200


CPU (as of FW4.1) or S7-1500
CPU (as of FW1.7) can be used.

Compact Switch
module

6GK7277-1AA10-0AA0

(optional)
The switch is only required if
S7-1200 and UGW shall be
addressed simultaneously from
the PG/PC (without replugging).

UGW//micro
PROFINET
RS232
UGW//micro
PROFINET
RS485/RS232

Manufacturer: MBS
GmbH

http://www.mbs-ugw.de/microprofinet-gateway-bis-500datenpunkte
(Contact details of MBS GmbH
are also available here)

Operating system:
Linux 2.6.34.7#89
Software module:
V2_01C#3681
Hardware module:
15.1.1

The respective versions are


available on the page of the UGW
web server in Help>Device info.

Software components
Table 2-4: Software components
Component

Qty

Article number

Note

SIMATIC STEP 7
Basic (TIA Portal)

6ES7833-1FA13-..

GSDML-V2.31MBSMICRO300420150206

Manufacturer: MBS
GmbH

Current GSDML files are


available directly at MBS GmbH.
In this example GSDMLV2.31
was used. The files are available
in the folder AdditionalFiles GSD in the STEP 7 project.
When opening the project, the
GSD file is automatically installed.

BACeye

Manufacturer: MBS
GmbH

(optional)
http://www.baceye.com
This tool is not mandatory for
plant operation. In this example, it
is used for testing the BACnet
network.
The full version, as well as the
free-of-charge demo version with
read access to BACnet only, can
be downloaded here.
The software version can be read
in BACeye via the Help menu.
Alternatively, the integrated UGW
web server can be used for
testing.

Version 1.1.7.2

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

2 Solution
2.3 Hardware and software components

Example files and projects


The following table contains all files and projects used in this example.
Table 2-5
Component

Note

This document.

109476182_BACnet_S7_CODE_Vxx.zip

This zip file contains the STEP


7 project.

109476182_BACnet_UGW_RestoreFile_Vxx.zip

This zip file contains the UGW


data backup with the data
configuration files.

Siemens AG 2016 All rights reserved

109476182_BACnet_DOKU_Vxx_en.pdf

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

3 Function Principle
3.1 Data points and signal course

Function Principle

3.1

Data points and signal course


The following figure represents the communication between an S7-1200 CPU and
a BACnet device. The communication can take place in both directions.
The figure below shows a signal formed by a BACnet device and read via an input
of the S7-1200 CPU. The UGW compiles the BACnet protocol into a PROFINET
protocol here.
Each device interface, where the signal runs through represents a data point. The
UGW connects two different bus systems and therefore has two data points.
Data point is an intermediate format and is used, in order to convert from the input
format to the output format. An extensive description can be found in the
UGW//micro manual (/5/) in chapter 6 Protocol Properties and Data Points.
Figure 3-1: Signal course of BACnet device S7-1200 CPU

Signal course

Siemens AG 2016 All rights reserved

UGW
BACnet
device

BACnet
BACnet

S7-1200
CPU

PROFINET

A
outbit
outbyte

E
inbit
inbyte

PROFINET
E

Signal
Data point

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Input

Output

10

3 Function Principle
3.2 Process image: S7 CPU and UGW (BACnet)

3.2

Process image: S7 CPU and UGW (BACnet)


The figure below shows all of the data used, as well as how the process image of
the S7-1200 CPU is composed during the respective configuration with UGW
(BACnet).
Please note that the input or output signal type always relates to the perspective
of the respective device.
Figure 3-2
S7-1200 CPU
PLC Variablen
Nam e

Datentyp
Lnge

UGW (BACnet) Peripherie


Prozessabbild

Adresse

Peripherie

PLC_1 DI8

Siemens AG 2016 All rights reserved

integrierte
Peripherie

Note

PLC_1 DO6_1

Adresse

E0

A0

PROFINET

Nam e

Signaltyp Adresse

inBool

BOOL
1 Bit

E 100.0

INPUT_01B_1

E100

UGW_outBit_0.0

Outbit

BO 0

outBool

BOOL
1 Bit

A 100.0

OUTPUT_01B_1

A 100

UGW_inBit_0.0

Inbit

BI 0

inUsint

USINT
1 Byte

EB 101

INPUT_01B_2

E 101

UGW_outByte_1

Outbyte

AO 0

outUsint

USINT
1 Byte

AB 101

OUTPUT_01B_2

A 101

UGW_inByte_1

Inbyte

AI 0

inUint

UINT
2 Byte

EW 102

INPUT_02B_1

E 102..103

UGW_outWord_2

Outbyte

AO 1

outUint

UINT
2 Byte

AW 102

OUTPUT_02B_1

A 102..103

UGW_inWord_2

Inbyte

AI 1

inUdint

UDINT
4 Byte

ED 104

INPUT_04B_1

E 104..107

UGW_outDouble_4

Outbyte

AO 2

outUdint

UDINT
4 Byte

AD 104

OUTPUT_04B_1

A 104..107

UGW_inDouble_4

Inbyte

AI 2

inSint

SINT
1 Byte

EB 108

INPUT_01B_3

E 108

UGW_outByte_8

Outbyte

AO 3

outSint

SINT
1 Byte

AB 108

OUTPUT_01B_3

A 108

UGW_inByte_8

Inbyte

AI 3

intInt

INT
2 Byte

EW 109

INPUT_02B_2

E 109..110

UGW_outWord_9

Outbyte

AO 4

outInt

SINT
2 Byte

AW 109

OUTPUT_02B_2

A 109..110

UGW_inWord_9

Inbyte

AI 4

inDint

DINT
4 Byte

ED 111

INPUT_04B_2

E 111..114

UGW_outDouble_11

Outbyte

AO 5

outDint

DINT
4 Byte

AD 111

OUTPUT_04B_2

A 111..114

UGW_inDouble_11

Inbyte

AI 5

inReal

REAL
4 Byte

ED 115

INPUT_04B_3

E 115..118

UGW_outFloat_15

Outbyte

AO 6

outReal

REAL
4 Byte

AD 115

OUTPUT_04B_3

A 115..118

UGW_inFloat_15

Inbyte

AI 6

*compact CPUs (for example, S7-1200) with integrated digital inputs and
outputs:
In STEP 7 (TIA Portal), the integrated digital inputs and outputs are automatically
preassigned with the smallest addresses 0.
Further modules/IOs are automatically assigned to the next free address.
Here, the address space from 100 onward was deliberately selected in the
process image. This makes it easier to recognize the connected tags between
S7-1200 CPU and UGW.

Note

Integer data types are illustrated on the BACnet page with analog values.
In principle, several tags can be programmed in a module.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

11

3 Function Principle
3.3 Correlation of the UGW configuration files

3.3

Correlation of the UGW configuration files


The configuration of the UGW is performed via various configuration files (cfg, txt).
After programming has been completed in an editor (for example, Notepad++),
these files are uploaded via the integrated web server in the UGW or are directly
edited and activated in the integrated web server. In the UGW a configuration
check is performed and possible errors are displayed.
Since the UGW supports different bus systems (PROFINET, BACnet, ), there are
different driver files (cfg) with protocol information. For each driver file, there is a
configuration file (txt) with the definition of the data points used.
A central component is the distribution file (dispatch.txt). It contains the
assignments of the data points of the different protocols to each other.
The data points are programmed as objects. The exact meaning and structure of
these files can be found in the manual on this UGW (/5/). The cfg and txt files also
contain respective information as comment lines.
The complete configuration is available in the included UGW data backup
ugwbackup in the ugw > config folder and the included comments
(109476182_BACnet_UGW_RestoreFile_Vxx.zip).

Siemens AG 2016 All rights reserved

Figure 3-3: UGW configuration files

PROFINET

BACnet

pnetd1.cfg

pnetd1.txt

dispatch.txt

bac1.txt

bac1.cfg

Device
configuration

Definition of the
data points

Assignment between
data points

Definition of the
data points

Device
configuration

Table 3-1: UGW configuration files


File

Content

Description

pnetd1.cfg

Configuration of
PROFINET I/O

This file contains information and settings for


the PROFINET network, including the I/O
used there.
In this case: I/O configuration of the UGW in
STEP 7 (TIA Portal)

pnetd1.txt

Definition of the
PROFINET data points

It is defined here how and with which data


type the data points are interpreted.

dispatch.txt

Assignment between
BACnet data points and
PROFINET data points

This file describes the assignment of the data


points on the PROFINET side (pnetd1.txt)
and on the BACnet side (bac1.txt).

bac1.txt

Definition of the BACnet


data points

This file contains the description of the


individual data points on the BACnet side.

bac1.cfg

Configuration of the
BACnet device

This file contains information and settings on


the UGW on the BACnet side.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

12

3 Function Principle
3.3 Correlation of the UGW configuration files

Note

In the UGW configuration files, BACnet objects are called bac and
PROFINET objects are called pnetd.

This application example describes how this data must be edited and adjusted so it
can be used for data exchange. Along with this description, you receive data
backup file with the preconfigured example files that you can adjust for your own
application.

Note

In addition, there are the following configuration files that need to be loaded into
the UGW but not edited:

Siemens AG 2016 All rights reserved

driver.cfg
ugwc1.cfg
ugwc1.txt
gateway.cfg
ntp.cfg
plants.cfg

These files are not described any further in this application. If you require further
information, open these files or contact MBS GmbH.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

13

4 Configuration and Settings


4.1 STEP 7 (TIA Portal) device configuration

Configuration and Settings

This chapter describes the configuration in STEP 7 (TIA Portal) and programming
of UGW configuration files.
If you wish to adopt the example configuration of this application example without
modifications, you can load the STEP 7 project directly into the S7-1200 CPU and
the UGW data backup into the UGW. The program example and the UGW
configuration file can be found in Table 2-5. For installation and commissioning,
please continue directly with Chapter 5 Installation and commissioning.

4.1

STEP 7 (TIA Portal) device configuration

Note

Before you can perform the UGW in STEP 7 (TIA Portal), you need to install the
GSD file of the UGW.
Unzip the 109476182_BACnet_UGW_RestoreFile_Vxx.zip file and open the
STEP 7 project. The GSD will then be automatically installed.

Siemens AG 2016 All rights reserved

Table 4-1
No.

Action

1.

Create a STEP 7 (TIA Portal) project, and


insert an S7-1200 CPU (S7-1212 C DC/DC/DC
FW4.1).

2.

Open the Network view in Devices &


networks.

Remark

In the hardware catalog you navigate to head


module UGW-micro.
Please note the firmware (V2.31).

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

14

4 Configuration and Settings


4.1 STEP 7 (TIA Portal) device configuration

Siemens AG 2016 All rights reserved

No.

Action

3.

Use drag-and-drop to move UGW micro from


the hardware catalog into the Devices &
networks editor.

4.

Click on not assigned and select


PLC_1.PROFINET.

5.

Set the following IP addresses:


S7-1200 CPU:192.168.16.1
UGW-micro: 192.168.16.2

6.

Double-click on the UGW micro to open the


device view.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Remark

15

4 Configuration and Settings


4.2 Editing the UGW configuration files
No.
7.

Action
Open the hardware catalog and equip the
UGW micro with the required modules.

Remark

Adjust the I/O addresses to the range from 100


onward.

Siemens AG 2016 All rights reserved

8.

Create the PLC tag table TagsUGW as in the


figure on the right.

9.

Create watch table WatchTableUGW with all


of the tags.

Note

A PLC program is not required for this simple example. All tags are monitored
and controlled by means of the watch table.
Since the tags directly access the process image, no system blocks are
necessary (SFC, SFB).

4.2

Editing the UGW configuration files


This chapter describes the approach for editing the UGW configuration files. You
can edit the files directly in the integrated web server or download the files for
editing with an editor (for example, Notepad++) and then upload them again to the
UGW.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

16

4 Configuration and Settings


4.2 Editing the UGW configuration files

4.2.1

Editing in the integrated web server


The following instruction describes the editing of the configuration files directly in
the integrated web server.

Table 4-2: Editing in the integrated web server


Action
1.

Start your preferred web browser and connect


with the UGW web server.
In the delivery state, the address is:
169.254.0.1
User name: gw
Password: GATEWAY

2.

Select BACnet in the top menu bar, in order


to edit the configuration files for the BACnet
protocol.

Remark

Siemens AG 2016 All rights reserved

Alternatively: Select Profinet in the top menu


bar, in order to edit the respective files of the
PROFINET protocol.
3.

Select Files in the menu bar on the left.

4.

Click the edit icon of the configuration file to be


processed.

5.

A new window opens in which you can make


the changes.
Click on Save to save the changes.

6.

After saving, the window closes automatically


and the message Restart required! appears.
Click the message, in order to do a system
restart.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

17

4 Configuration and Settings


4.2 Editing the UGW configuration files
Action
7.

Remark

A configuration check is automatically done by


the system and the result is shown. Click on
"Next".
If the check was not without errors, stop the
restart and edit your changes, according to the
notes in the check result.

8.

Click on Restart and confirm the other


messages.

Siemens AG 2016 All rights reserved

After the restart the changes made are


activated.

4.2.2

Editing in an editor (for example, Notepad++)

Table 4-3: Editing in an editor (for example, Notepad++)


Action
1.

Start your preferred web browser and connect


with the UGW web server.
In the delivery state, the address is:
169.254.0.1
User name: gw
Password: GATEWAY

2.

Select BACnet in the top menu bar, in order


to edit the configuration files for the BACnet
protocol.

Remark

Alternatively: Select Profinet in the top menu


bar, in order to edit the respective files of the
PROFINET protocol.
3.

Select Files in the menu bar on the left.

4.

Click Start Download, in order to download


the configuration file to be edited.
Save the downloaded file in a directory on your
PC.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

18

4 Configuration and Settings


4.2 Editing the UGW configuration files
Action
5.

Remark

Open the downloaded file with an editor (for


example, Notepad++) and make the necessary
changes.
Then save the file.

6.

Click on Start Upload in the web server, in


order to transfer the edited file back to the
gateway.

7.

1.

Click on the Browse button and navigate


to the file to be edited in the directory of
your PC. Select this file.

2.

Then click the Start button, in order to


start the transfer of the edited file to the
gateway.

Siemens AG 2016 All rights reserved

8.

Click the Restart button in the General Restart menu item.


The change is only activated by the restart.

9.

A configuration check is automatically done by


the system and the result is shown. Click on
"Next".
If the check was not without errors, stop the
restart and edit your changes, according to the
notes in the check result.

10.

Click on Restart and confirm the other


messages.
After the restart, the change made is activated.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

19

4 Configuration and Settings


4.3 UGW device configuration

4.3

UGW device configuration

4.3.1

Configuration files
For the configuration of the UGW, the following files are edited and then loaded
into the UGW via the integrated web server or they are directly edited in the
integrated web server.

Note

pnetd1.cfg

pnetd1.txt

dispatch.txt

bac1.txt

bac1.cfg

However, the following configuration files also need to be loaded into the UGW,
but not edited:

Siemens AG 2016 All rights reserved

driver.cfg
ugwc1.cfg
ugwc1.txt
gateway.cfg
ntp.cfg
plants.cfg

All required files of the data backup are located in the file
109476182_BACnet_UGW_RestoreFile_Vxx.zip.

Note

More information on programming MBS gateways can be found at the following


link:
http://proxy.mbs-software.info/doku.php?id=start

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

20

4 Configuration and Settings


4.3 UGW device configuration

UGW file pnetd1.cfg

4.3.2

Table 4-4: Structure of the pnetd1.cfg file

Siemens AG 2016 All rights reserved

No.

Description

1.

The device
configuration of the
UGW can be found in
STEP 7 (TIA Portal).

2.

The device
configuration of the
UGW is done line by
line in the pnetd1.cfg
configuration file,
according to the device
configuration in STEP 7
(TIA Portal).
Each device is referred
to as module (Mod001,
Mod002,..).
An example of how
each module type is
configured is available
in the pnetd1.cfg file.
Comments are marked
by control character #.

Remark

Mod001 = ID:0x11 IN:1 OUT:0 # Mod001, INPUT_01B_1


Mod002 = ID:0x21 IN:0 OUT:1 # Mod002, OUTPUT_01B_1
Mod003 = ID:0x11 IN:1 OUT:0 # Mod003, INPUT_01B_2
Mod004 = ID:0x21 IN:0 OUT:1 # Mod004, OUTPUT_01B_2
Mod005 = ID:0x12 IN:2 OUT:0 # Mod005, INPUT_02B_1
Mod006 = ID:0x22 IN:0 OUT:2 # Mod006, OUTPUT_02B_1
Mod007 = ID:0x13 IN:4 OUT:0 # Mod007, INPUT_04B_1
Mod008 = ID:0x23 IN:0 OUT:4 # Mod008, OUTPUT_04B_1
Mod009 = ID:0x11 IN:1 OUT:0 # Mod009, INPUT_01B_3
Mod010 = ID:0x21 IN:0 OUT:1 # Mod010, OUTPUT_01B_3
Mod011 = ID:0x12 IN:2 OUT:0 # Mod011, INPUT_02B_2
Mod012 = ID:0x22 IN:0 OUT:2 # Mod012, OUTPUT_02B_2
Mod013 = ID:0x13 IN:4 OUT:0 # Mod013, INPUT_04B_2
Mod014 = ID:0x23 IN:0 OUT:4 # Mod014, OUTPUT_04B_2
Mod015 = ID:0x13 IN:4 OUT:0 # Mod015, INPUT_04B_3
Mod016 = ID:0x23 IN:0 OUT:4 # Mod016, OUTPUT_04B_3

Note

Further information is available in the pnetd1.cfg file or the manual on the UGW
by MBS GmbH.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

21

4 Configuration and Settings


4.3 UGW device configuration

4.3.3

UGW file pnetd1.txt

Table 4-5: Structure of the pnetd1.txt file


Description
1.

The PROFINET
data points are
programmed in the
configuration file
pnetd1.txt.
Type and address
are specified in
square brackets (for
example,
[S inbit 0.0]).

Siemens AG 2016 All rights reserved

Each data point has


different
parameters: (name,
format, query,
writecache,..)
The name can be
selected by the
user.
format specifies
the respective data
types of the UGW.
Further information
on type, address,
formats, and further
parameters is
available in the
pnetd1.txt file in
the data backup file
in the config
folder.

Remark
#------------------------------------------------------# INPUT BUFFER (max 340 bytes)
#------------------------------------------------------# 1.Bit of (INPUT_01B_1/Mod001)
[S inbit 0.0]
name
= S7_inBool
format = BIT
query = pe
writecache = yes
# (INPUT_01B_2/Mod003)
[S inbyte 1]
name
= S7_inUsint
format = UINT8
query = pe
writecache = yes
# (INPUT_02B_1/Mod005)
[S inbyte 2]
name
= S7_inUint
format = UINT16
query = pe
writecache = yes
# (INPUT_04B_1/Mod007)
[Y inbyte 4]
name
= S7_inUdint
format = UINT32
query = pe
writecache = yes
# (INPUT_01B_3/Mod009)
[S inbyte 8]
name
= S7_inSint
format = SINT8
query = pe
writecache = yes
# (INPUT_02B_2/Mod011)
[S inbyte 9]
name
= S7_inInt
format = SINT16
query = pe
writecache = yes
# (INPUT_04B_2/Mod013)
[S inbyte 11]
name
= S7_inDint
format = SINT32

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

22

4 Configuration and Settings


4.3 UGW device configuration
Description

Remark
query = pe
writecache = yes
# (INPUT_04B_3/Mod015)
[Y inbyte 15]
name
= S7_inReal
format = FLOAT32
query = pe
writecache = yes
#-------------------------------------------------------# OUTPUT BUFFER (max 340 bytes)
#--------------------------------------------------------

Siemens AG 2016 All rights reserved

# 1.Bit of (OUTPUT_01B_1/Mod002)
[M outbit 0.0]
name
= S7_outBool
format = BIT
query = pe
# (OUTPUT_01B_2/Mod004)
[M outbyte 1]
name
= S7_outUsint
format = UINT8
query = pe
# (OUTPUT_02B_1/Mod006)
[M outbyte 2]
name
= S7_outUint
format = UINT16
query = pe
# (OUTPUT_04B_1/Mod008)
[X outbyte 4]
name
= S7_outUdint
format = UINT32
query = pe
# (OUTPUT_01B_3/Mod010)
[M outbyte 8]
name
= S7_outSint
format = SINT8
query = pe
# (OUTPUT_02B_2/Mod012)
[M outbyte 9]
name
= S7_outInt
format = SINT16
query = pe
# (OUTPUT_04B_2/Mod014)
[M outbyte 11]

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

23

4 Configuration and Settings


4.3 UGW device configuration
Description

Remark
name
= S7_outDint
format = SINT32
query = pe
# (OUTPUT_04B_3/Mod016)
[X outbyte 15]
name
= S7_outReal
format = FLOAT32
query = pe

Further information is available in the pnetd1.txt file or the manual on the UGW
by MBS GmbH

Siemens AG 2016 All rights reserved

Note

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

24

4 Configuration and Settings


4.3 UGW device configuration

4.3.4

UGW file dispatch.txt

Table 4-6: Structure of the dispatch.txt file

1.

Description

Remark

In the dispatch.txt
configuration file, the
assignment between
BACnet data points and
PROFINET data points is
programmed.

# Mod001, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.BO 0]
target = 1190 pnetd inbit 0.0

Siemens AG 2016 All rights reserved

Here, the data points in


the networks BACnet
(940 bac) and
Pnet (1190 pnet) are
assigned to each other.
It has to be ensured that
the network address
940 bac or
1190 pnet and the
BACnet data network
includes the value of
555, in accordance with
the DeviceID in the
bac1.cfg file.
The syntax is:
[Network.DataPoint
]
target =
Network.DataPoint

# Mod002, see bac1.txt (object in BACnet device 555,


internal)
[1190 pnetd outbit 0.0]
target = 940 bac 555.BI 0

# Mod003, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 0]
target = 1190 pnetd inbyte 1
# Mod004, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 1]
target = 940 bac 555.AI 0

# Mod005, see bac1.txt (object in BACnet device


555, internal)
[940 bac 555.AO 1]
target = 1190 pnetd inbyte 2
# Mod006, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 2]
target = 940 bac 555.AI 1

# Mod007, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 2]
target = 1190 pnetd inbyte 4
# Mod008, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 4]
target = 940 bac 555.AI 2

# Mod009, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 3]
target = 1190 pnetd inbyte 8
# Mod010, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 8]
Communication with S7 CPU via BACnet Gateway
Entry ID: 109476182, V1.2, 05/2016

25

4 Configuration and Settings


4.3 UGW device configuration
Description

Remark
target = 940 bac 555.AI 3

# Mod011, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 4]
target = 1190 pnetd inbyte 9
# Mod012, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 9]
target = 940 bac 555.AI 4

# Mod013, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 5]
target = 1190 pnetd inbyte 11

Siemens AG 2016 All rights reserved

# Mod014, see bac1.txt (object in BACnet device 555,


internal)
[1190 pnetd outbyte 11]
target = 940 bac 555.AI 5

# Mod015, see bac1.txt (object in BACnet device 555,


internal)
[940 bac 555.AO 6]
target = 1190 pnetd inbyte 15
# Mod016, see bac1.txt (object in BACnet device 555,
internal)
[1190 pnetd outbyte 15]
target = 940 bac 555.AI 6

Note

Further information is available in the dispatch.txt file or the manual on the


UGW by MBS GmbH.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

26

4 Configuration and Settings


4.3 UGW device configuration

4.3.5

UGW file bac1.txt

Table 4-7: Structure of the bac1.txt file


Description
1.

The BACnet data points are


programmed in the configuration
file bac1.txt.
The syntax is as follows:
[Type
DeviceID.DataPoint]
The name can be selected by
the user.

Siemens AG 2016 All rights reserved

Use bac_description to
specify a description of the data
point as desired.
For binary signals, a text for an
inactive data value can be
specified with
bac_inactive_text.
For binary signals, a text for an
active data value can be
specified with
bac_active_text.
For floating point numbers, a
minimum and maximum value
(bac_min_pres_value,
bac_max_pres_value),
(bac_units) unit can be
specified.
Start values can be defined with
(bac_relinquish_default).

Remark
# (Mod001, object in BACnet device 555, internal)
[S 555.BO 0]
name = UGW_outBit_0.0
bac_description = Bit / Bool -->S7
bac_inactive_text = OFF
bac_active_text = ON
bac_relinquish_default = 0
# (Mod002, object in BACnet device 555, internal)
[S 555.BI 0]
name = UGW_inBit_0.0
bac_description = Bit / Bool -->UGW
bac_inactive_text = OFF
bac_active_text = ON
# (Mod003, object in BACnet device 555, internal)
[S 555.AO 0]
name = UGW_outByte_1
bac_description = Byte / USINT -->S7
bac_min_pres_value = 0
bac_max_pres_value = 255
bac_units = 95 # No Unit
# (Mod004, object in BACnet device 555, internal)
[S 555.AI 0]
name = UGW_inByte_1
bac_description = Byte / UNSINT -->UGW
bac_units = 95 # No Unit
# (Mod005, object in BACnet device 555, internal)
[S 555.AO 1]
name = UGW_outWord_2
bac_description = WORD / UINT -->S7
bac_min_pres_value = 0
bac_max_pres_value = 65535
bac_units = 95 # No Unit
# (Mod006, object in BACnet device 555, internal)
[S 555.AI 1]
name = UGW_inWord_2
bac_description = WORD / UINT -->UGW
bac_units = 95 # No Unit
# (Mod007, object in BACnet device 555, internal)
[Y 555.AO 2]
name = UGW_outDouble_4
bac_description = DOUBLE / UDINT -->S7
bac_min_pres_value = 0
bac_max_pres_value = 4294967295
bac_units = 95 # No Unit
# (Mod008, object in BACnet device 555, internal)
[Y 555.AI 2]
name = UGW_inDouble_4
bac_description = DOUBLE / UDINT -->UGW

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

27

4 Configuration and Settings


4.3 UGW device configuration
Description

Remark
bac_units = 95 # No Unit
# (Mod009, object in BACnet device 555, internal)
[S 555.AO 3]
name = UGW_outByte_8
bac_description = BYTE / SINT -->S7
bac_min_pres_value = -127
bac_max_pres_value = 128
bac_units = 95 # No Unit
# (Mod010, object in BACnet device 555, internal)
[S 555.AI 3]
name = UGW_inByte_8
bac_description = BYTE / SINT -->UGW
bac_units = 95 # No Unit

Siemens AG 2016 All rights reserved

# (Mod011, object in BACnet device 555, internal)


[S 555.AO 4]
name = UGW_outWord_9
bac_description = WORD / INT -->S7
bac_min_pres_value = -32767
bac_max_pres_value = 32768
bac_units = 95 # No Unit
# (Mod012, object in BACnet device 555, internal)
[S 555.AI 4]
name = UGW_inWord_9
bac_description = WORD / INT -->UGW
bac_units = 95 # No Unit
# (Mod013, object in BACnet device 555, internal)
[S 555.AO 5]
name = UGW_outDouble_11
bac_description = DOUBLE / DINT -->S7
bac_min_pres_value = -2147583647
bac_max_pres_value = 2147483648
bac_units = 95 # No Unit
# (Mod014, object in BACnet device 555, internal)
[S 555.AI 5]
name = UGW_inDouble_11
bac_description = DOUBLE / DINT -->UGW
bac_units = 95 # No Unit
# (Mod015, object in BACnet device 555, internal)
[Y 555.AO 6]
name = UGW_outFloat_15
bac_description = DOUBLE / REAL -->S7
bac_min_pres_value = 0.0
bac_max_pres_value = 3.402823e+038
bac_units = 95 # No Unit
# (Mod016, object in BACnet device 555, internal)
[Y 555.AI 6]
name = UGW_inFloat_15
bac_description = DOUBLE / REAL -->UGW
bac_units = 95 # No Unit

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

28

4 Configuration and Settings


4.3 UGW device configuration
Note

Further information is available in the bac1.txt file or the manual on the UGW
by MBS GmbH.

UGW file bac1.cfg

4.3.6

Table 4-8: Structure of the bac1.cfg file


No
.
2.

Description
The BACnet device configuration is
programmed in the bac1.cfg configuration file.

Siemens AG 2016 All rights reserved

Necessary settings: DeviceID = 555.

Remark
(... <CODE-Auszug Anfang>
[BACnet]
DeviceID = 555
DeviceName = UGW555
DeviceDescription = UGW BACnet
Client/Server
VendorName = MBS GmbH Krefeld
VendorID = 50
Location = Rack
ModelName = UGW
<CODE extract end>...)

Note

Further information is available in the bac1.cfg file or the manual on the UGW
by MBS GmbH.

Note

How you can edit configuration files, can be found in chapter 4.4 Editing the
UGW configuration files.
How to load example configuration files into the UGW, is described in chapter
5.3.1 Commissioning the UGW.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

29

4 Configuration and Settings


4.4 Overview of the UGW configuration

4.4

Overview of the UGW configuration


The following overview shows you the UGW configuration files.

pnetd1.cfg
Mod001 = ID:0x11 IN:1 OUT:0 # Mod001, INPUT_01B_1
Mod002 = ID:0x21 IN:0 OUT:1 # Mod002, OUTPUT_01B_1

pned1.txt
# 1.Bit of (INPUT_01B_1/Mod001)
[S inbit 0.0]
name
format
query

= S7_inBool
= BIT
= pe

writecache = yes
# 1.Bit of (OUTPUT_01B_1/Mod002)

Siemens AG 2016 All rights reserved

[M outbit 0.0]
name

= S7_outBool

format

= BIT

query

= pe

dispatch.txt
# Mod001, see bac1.txt (object in BACnet device 555, internal)
[940 bac 555.BO 0]
target = 1190 pnetd inbit 0.0
# Mod002, see bac1.txt (object in BACnet device 555, internal)
[1190 pnetd outbit 0.0]
target = 940 bac 555.BI 0

bac1.txt
# (Mod001, object in BACnet device 555, internal)
[S 555.BO 0]
name = UGW_outBit_0.0
bac_description = Bit / Bool -->S7
bac_inactive_text = OFF
bac_active_text = ON
bac_relinquish_default = 0
# (Mod002, object in BACnet device 555, internal)
[S 555.BI 0]
name = UGW_inBit_0.0
bac_description = Bit / Bool -->UGW
bac_inactive_text = OFF
bac_active_text = ON

bac1.cfg
DeviceID = 555

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

30

5 Installation and Commissioning


5.1 Installing the hardware

Installation and Commissioning

This chapter describes the steps necessary for commissioning the example.

Note

The following setup guidelines must generally be followed

System manual S7-1200 Automation System


UGW//micro manual

5.1

Installing the hardware

5.1.1

Setup under laboratory conditions


For the function test of this application under laboratory conditions, the following
setup, using a switch is the best option. Thus, all the following functions (see
following advantages) can be operated simultaneously with a single PG/PC. This is
possible since the networks used in this application example are all based on
Ethernet. It does not contain any BACnet devices in the actual sense.

Siemens AG 2016 All rights reserved

Advantages:

STEP 7 (TIA Portal) online functions

S7-1200 CPU test

BACeye / web browser (UGW web server)

BACnet communication test

UGW web server

Configuration of BACnet

Disadvantages:

Halved address scope since there is only one common network.

No topological separation of PROFINET and BACnet.

The IP base addresses of all devices must be identical.

Figure 5-1: Setup under laboratory conditions


24V DC

24V DC

24V DC

PROFINET 1
PROFINET 2
IP: 192.168.16.2
LAN
IP: 192.168.16.5

CSM /
Switch

S7-1200 CPU

UGW//micro PROFINET
RS 232/485

PN

BACnet

PN
IP: 192.168.16.1

PROFINET

PG/PC

PROFINET

PROFINET

IP: 192.168.16.100

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

31

5 Installation and Commissioning


5.1 Installing the hardware

5.1.2

Setup under plant conditions


Under real conditions, two larger network topologies are usually interconnected
with a building infrastructure network (BACnet), for example, a network of several
SIMATIC PLCs (PROFINET), via a UGW. The UGW is integrated here into a
PROFINET network via both PROFINET interfaces and connected with the BACnet
network via the LAN interface.
Advantages:

Full address scope in each of the two networks

Topological separation of PROFINET and BACnet

Disadvantage:

In the diagnostic case, a separate diagnosis device is necessary for each


network.

Figure 5-2: Setup under plant conditions


24V DC

24V DC

Siemens AG 2016 All rights reserved

PROFINET 1
PROFINET 2
IP: 192.168.16.2
LAN
IP: 192.168.16.5

SIMATIC S7
CPU

BACnet Gert

UGW//micro PROFINET

PN
IP: 192.168.16.1

PROFINET

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

RS 232/485

LAN

BACnet

32

5 Installation and Commissioning


5.2 Installing the software

5.2

Installing the software


This chapter describes the steps for the installation of the software.

Table 5-5
No
.

Action

Remark

1.

Install the current version of STEP 7


(TIA Portal) on your PC.

As of STEP 7 (TIA Portal) V13 SP1

2.

Optionally, install the diagnostic tool BACeye


(see Table 2-4), if you wish to test the data
communication via BACnet network (monitoring
and control).

Execute the file BACeyeSetup.exe and follow


the installation instruction.

5.3

Commissioning
This chapter describes the steps for loading the example code into the
S7-1200 CPU and the UGW.

Siemens AG 2016 All rights reserved

5.3.1

Commissioning the UGW


This chapter describes the commissioning of the UGW gateway by restoring the
backup file. To do this, unzip the 109476182_BACnet_UGW_RestoreFile_Vxx.zip
file and store the ugwbackup.tgz backup file in any directory.

Note

For some actions in the UGW web server, you require a user name and
password.
Standard setting (in the as-supplied state):
User name:
Password:

gw
GATEWAY

IP: 169.254.0.1

If this login doesnt work, read the UGW manual or contact MBS GmbH.

Table 5-1: Commissioning the UGW


No.
1.

Action
Make sure that,

your PC is located in the same subnet as


all of the involved components,

all of the components are connected with


each other via LAN cable,

all of the components are connected to a


power supply and switched on.
(see chapter 5.1.1 Setup under laboratory
conditions)

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Remark
-

33

5 Installation and Commissioning


5.3 Commissioning

Siemens AG 2016 All rights reserved

No.

Action

2.

Start your preferred web browser and connect


with the web server integrated in the UGW.

3.

Navigate to General Backup/Restore.

4.

If required, secure all UGW configuration files.


Select Backup gateway configuration and
start the data backup.

5.

Select Restore gateway configuration and


click the Browse... button. Navigate to the
backup file ugwbackup.tgz.

Remark
-

Then click the Start button.


Note: The following files are overwritten in the
UGW.

pnetd1.cfg

pnetd1.txt

dispatch.txt

bac1.txt

bac1.cfg

driver.cfg

ugwc1.cfg

ugwc1.txt

gateway.cfg

ntp.cfg

plants.cfg

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

34

5 Installation and Commissioning


5.3 Commissioning
No.
6.

Action

Remark

Take note of the backup information and


confirm it.
Note:
By restoring the data backup file provided, the
setting of the IP address is also changed. The
IP address is replaced by 192.168.16.5. Thus,
all devices of this application example are in
the same subnet
You can change the IP address anytime in
General IP-Network.

Siemens AG 2016 All rights reserved

7.

Once the installation of the data backup has


been successful, trigger a system restart.

Note

In the event of error messages after transferring the txt and cfg files to the UGW with the
correct configurations, the comment lines (#...) might be the cause. In this case, the
comment lines must be written in a separate line.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

35

5 Installation and Commissioning


5.3 Commissioning

5.3.2

Commissioning the S7-1200 CPU

Table 5-2: Commissioning the S7-1200 CPU

Siemens AG 2016 All rights reserved

No.

Action

Remark

1.

Start the STEP 7 (TIA Portal) and open the


project in zip file
109476182_BACnet_S7_CODE_Vxx.zip

2.

Open Devices & networks.

3.

Right-click on the connection and select


Assign device name.

4.

Assign the device name to S7-1200 CPU and


UGW using the Assign name button.

5.

In the project navigation, select the S7-1200


CPU (here PLC_1) and click on the Download
to device button.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

36

5 Installation and Commissioning


5.3 Commissioning
No.
6.

Action
Acknowledge the download dialogs and set the
S7-1200 CPU to RUN mode.

Remark
-

After the download, your PROFINET IP


addresses were also assigned to the devices.

7.

Select the S7-1200 (PLC_1) in project


navigation and click on Go online in the menu
bar.

Siemens AG 2016 All rights reserved

When everything was configured and


downloaded correctly, all icons turn green.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

37

6 Operating the Application


6.1 Changing values on the SIMATIC side

Operating the Application

6.1

Changing values on the SIMATIC side


Since no program was created in S7-1200, the tags are controlled and monitored
with the watch table.

Table 6-6

Siemens AG 2016 All rights reserved

No.

Action

1.

Open the watch and force


table WatchTableUGW
in STEP 7 (TIA Portal).

2.

Click on the Monitor all


button

Remark

Define any control value


for the out tags and load
them to the S7-1200 CPU.

3.

Start BACeye.
Click on the refresh
button.
If you wish to use the
integrated web server of
the UGW as an
alternative, in order to
monitor the BACnet tags,
continue with step 6.

4.

Double-click on the listed


device.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

38

6 Operating the Application


6.1 Changing values on the SIMATIC side

Siemens AG 2016 All rights reserved

No.

Action

5.

Select all tags and rightclick.


Add all tags to the watch
table.
Now you can monitor the
values of all tags.

6.

Alternatively, you can also


start your preferred web
browser. Connect with the
web server integrated in
the UGW.
IP: 192.168.16.5

Remark

Navigate to BACnet
Status and update the
page.
Here, you can monitor the
values of the tags.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

39

6 Operating the Application


6.2 Changing values on the BACnet side

6.2

Changing values on the BACnet side


The example of the inBool signal (PLC tag) is used for illustrating how a signal is
changed on the BACnet side using BACeye, and how the changes are monitored
in the S7-1200 CPU using watch table WatchTableUGW.

Table 6-6

Siemens AG 2016 All rights reserved

No.

Action

7.

Start BACeye.
Click on the refresh
button.

8.

Double-click on the listed


device in BACeye.

9.

Start the watch and force


table WatchTableUGW
in STEP 7 (TIA Portal).

Remark

Click on the Monitor all


button
10.

Double-click on the BO 0
tag in BACeye.

11.

Successively click on
value ON and Send in
the Present Value line.
Confirm the sending.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

40

6 Operating the Application


6.2 Changing values on the BACnet side
No.

Action

12.

Watch how the value has


changed in the watch
table in STEP 7.

13.

Alternatively, the web


server of the UGW can
also be used for
controlling the values.

Remark

Siemens AG 2016 All rights reserved

Select any UGW_out


tags and enable editing.

14.

Change the value and


confirm with Ok.

15.

Then monitor the behavior


in the watch table in STEP
7 (TIA Portal).

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

41

7 Links & Literature

Links & Literature


Table 7-1

Siemens AG 2016 All rights reserved

Topic

Title

\1\

Siemens Industry Online


Support

https://support.industry.siemens.com/cs/en/en/

\2\

Download page of the


entry

https://support.industry.siemens.com/cs/ww/en/view/1094
76182

\3\

System Manual SIMATIC


S7-1200 automation
system

http://support.automation.siemens.com/WW/view/en/53741769

\4\

Update of the S7-1200


system manual

http://support.automation.siemens.com/WW/view/en/89851659

\5\

UGW//micro manual

http://www.mbs-ugw.de/micro-profinet-gateway-bis-500datenpunkte

\6\

BACeye User Manual

http://baceye.com

\7\

Overview of BACnet on
YouTube

http://www.youtube.com/watch?feature=player_embedded&v=Sig
bjIBipaQ

\8\

MBS Wiki

http://proxy.mbs-software.info/doku.php?id=start

Contact MBS GmbH


Figure 8-1

MBS GmbH
Rmerstrae 15
D-47809 Krefeld
Phone: +49 2151 7294-0
Fax +49 2151 7294-50
info@mbs-software.de

History
Table 9-1
Version

Date

V1.0

05/2015

First version

V1.1

09/2015

Error correction

V1.2

05/2016

Documentation has been adapted to the new interfaces


in the UGW web server and the thus connected changes.

Communication with S7 CPU via BACnet Gateway


Entry ID: 109476182, V1.2, 05/2016

Modifications

42

Anda mungkin juga menyukai