You are on page 1of 29

SIEMENS SIMATIC NET (S7)

Interface to the PI System


for S7 Series PLC

V1.1.0 and greater

OSI Software, Inc.

How to Contact Us
Phone

(510) 297-5800
(510) 297-5828

(main number)
(technical support)

Fax

(510) 357-8136

Internet

techsupport@osisoft.com

World Wide
Web

http://www.osisoft.com

Bulletin
Board

(510) 895-9423
Telebit WorldBlazer modem (Hayes, MNP, or PEP compatible)
8 data bits, 1 stop bit, no parity, up to 14400 bps download
protocols: Xmodem, Ymodem, Zmodem, Kermit

Mail

OSI Software, Inc.


P.O. Box 727
San Leandro, CA 94577-0427
USA
OSI Software GmbH
Hauptstrae 30
D-63674 Altenstadt 1
Deutschland

OSI Software, LTD


P. O. Box 8256
Level One, 6-8 Nugent Street
Auckland 3, New Zealand

Unpublished -- rights reserved under the copyright laws of the United States.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
Trademark statementPI is a registered trademark of OSI Software, Inc. Microsoft Windows, Microsoft Windows for
Workgroups, and Microsoft NT are registered trademarks of Microsoft Corporation. Solaris is a registered trademark of Sun
Microsystems. HP-UX is a registered trademark of Hewlett Packard Corp.. IBM AIX RS/6000 is a registered trademark of the
IBM Corporation. DUX, DEC VAX and DEC Alpha are registered trademarks of the Digital Equipment Corporation.
272346203.doc

1997 OSI Software, Inc. All rights reserved

777 Davis Street, Suite 250, San Leandro, CA 94577

6/2/2015 01:39:00 PM

Table of Contents
Introduction........................................................................................................................ 1
PI Point Configuration.......................................................................................................4
Configuration File.............................................................................................................. 8
SINET.INI.................................................................................................................... 8
The Windows NT Control Panel........................................................................................9
Softnet S7...............................................................................................................9
Hardnet - CP1413......................................................................................................9
Performance measurement.............................................................................................10
Performance Tag.......................................................................................................... 10
I/O-rate Tag.................................................................................................................. 10
Interface Files.................................................................................................................. 11
Installation....................................................................................................................... 12
Pre-installation Notes...............................................................................................12
Additional Pre-installation for a PI 2 Home Node.....................................................12
Installation................................................................................................................ 12
Updating the Interface.....................................................................................................15
Startup............................................................................................................................. 16
Shutdown........................................................................................................................ 18
Error and information messages.....................................................................................19
How the SIEMENS SIMATIC NET Interface Operates.....................................................20
Data acquisition........................................................................................................... 20
Hints for the System Manager.........................................................................................22
Bad values from S7.....................................................................................................22
Configuration of the connection...................................................................................22
Additional entries in SINET.INI.....................................................................................24
Test enviroment............................................................................................................ 24

OSI Software, Inc.

Introduction
The SIEMENS SIMATIC NET Interface provides the transfer of data between
SIMATIC S7 PLC
and the Plant Information (PI) System.
The Interface communicates to the S7 PLC via SAPI-S7 Functions. One Interface can
only connect to one PLC. If necessary, one has to start a single copy of the interface per
PLC.
The Communication Processors (CP) and the library are not part of this PI interface. They
can be purchased from SIEMENS.

PI Server
OpenVMS, NT,
HPUX, SOL, AIX, DUX

TCP/IP
PI-API-NTI
Windows NT

PI-IN Interface

PI Server
Windows NT

PI-IN Interface

TF-1413

SOFTNET-S7

TF-1413

SOFTNET-S7

CP-1413

NT compatible
network card

CP-1413

NT compatible
network card

H1 industrial ethernet

Simatic S7

...

SIEMENS SIMATIC NET (S7) Interface Documentation

Supported Scenarios
System

Network

Remote CP

Host CP

Library

S7

H1

CP 443-1

CP 1613

S7-1613

Windows NT
compatible Ethernet
Card

SOFTNET-S7 Basic

CP 5412 (A2)

S7-5412

S7

PROFIBUS1

CP 342-5

SOFTNET-S7 Extended

CP 343-5
CP 443-5

The PI Interface makes internal use of the PI-API-NT in order to keep a standard way of
interfacing from a client node to the PI Server Node.
The interface runs under Windows NT Server or Workstation, Intel Platform. This
machine runs either a PI3 Server Node or the PI-API Node and can connect to any PI
Node in the network.
Since S7 PLC currently do not support FETCH telegrams, we support the S7 Function
protocol instead. This protocol represents OSI level 7 but is performance optimized.
SINEC AP and SINEC TF are not supported.
The protocols are described in detail in:
SIEMENS
SINEC
S7- Programmierschnittstelle

The SIEMENS SIMATIC NET (S7) interface has not been tested with Profibus. Please contact OSI
Software GmbH for further infromation.

Supported Features

2
3

Interface Platforms supported

Windows NT (Intel)

Order Code

GmbH

Vendor Software Required

Yes

Sign up for Updates

Yes

Exception Reporting

yes

PI API Node Support

Yes

UNIINT

Yes

Input

Scan based2

Outputs

Event based

Text Transfer

No

Configuration Data

No

Multiple Links

Yes3

Failover

No

Number of Points

Unlimited

The interface supports scanning of tag caused by events from a PI tag (standard uniint feature).

To run multiple copies of the interface as service you have to set up one S7 connection per interface in the
Siemens application COML S7 and you have to configure each interface to use a separate symbolic name
in sinet.ini. It is not possible to read from more than one PLC per interface.

SIEMENS SIMATIC NET (S7) Interface Documentation

PI Point Configuration
The following database details are necessary for configuring a PI point for use with the
SIMATIC NET Interface.

Point Name
The point name is free, according to the normal PI point naming conventions.

Extended Descriptor
PERFORMANCE_POINT
If the keyword PERFORMANCE_POINT is specified in the extended descriptor, then the
PI Point is a performance point. Performance points are described under the section
entitled Performance.
EVENT=tagname
If a tagname is specified using the EVENT keyword for an input point, then values for
the input point are read only when tagname changes value. If the EVENT keyword is not
specified, then the input point will be scanned periodically as described under the
Location4 PI Point attribute and under the /f command-line argument. tagname can be
any valid tag name. For example:
EVENT=sinusoid
MASK=<bitmask 0x0001 to 0xffff>
The Mask will be applied only to integer or digital tags. If the result of a BITWISE AND
between mask and value from PLC is different then 0, the value written to PI will be 1. If
the result of a BITWISE AND will be 0, the value 0 will be written to PI. Example:
Mask=0x1
Z=InstZero
The Z keyword is used to specify the instrument zero (InstZero). The instrument zero is
used in the conversions that are described under the SquareRoot PI Point attribute. If the
Z keyword is not found, then InstZero is assumed to be zero.

Point Source
The point source is a single character, for example S (SIMATIC NET). The point source
must be defined in the point source library before point configuration.

Point Type
The Interface supports the PI point types real R, integer I and discrete D.

Engineering Units
The Engineering Units have to be defined in accordance with the meaning of the
measured values.

Scan flag
This is usually ON for all points of this interface. If you edit this Point Attribute to OFF,
then the tag is OFFLINE (no values are exchanged for this tag).

Instrument Tag
This field contains the symbolic address of PLC variables. The syntax is as follows:
Syntax - Symbolic Address

Syntax - Symbolic Address


Number

Range number, where applicable

Type

Data Type, e.g. BYTE, REAL, CHAR

Index

Number of the element relative to start of range

S7 Range
Mnemonic

Description

DB

Common Data

The following table lists available data types by PLC type.


Mnemonic

Description

Byte (unsigned)

BYTE

Byte (unsigned)

CHAR

Byte (signed)

COUNTER

Counter

Double Word (4byte, unsigned)

DINT

Double Word (4byte, signed)

DWORD

Double Word (4byte, unsigned)

INT

Word (signed)

REAL

Floating Point (SIEMENS)

STRING

Text

TIMER

Timer

Word (unsigned)

WORD

Word (unsigned)

Byte for DB and DI

Examples
S7

Description

DB21,Real5

Data Module 21, Real 5

DB21,B1

Data Module 21, Byte 1

DB21,Char2

Data Module 21, Char 2

DB21,Dword3

Data Module 21, Dword 3

Location 1
This is the number of the interface process, which shall collect data for this tag. The
interface can run multiple times and so distribute CPU power to groups of tags. E.g. it is
possible to give a number of tags, to be scanned with high frequency, a separate process.
The parameter required here is the same as the parameter /id in the startup file of the
according interface process.

SIEMENS SIMATIC NET (S7) Interface Documentation


It is even possible to start multiple interface processes on different PI Nodes. But then a
separate Software License for the Interface is required per PI Node.

Location 2
Not used in this version.

Location 3
Specifies if the value is clamped (only for floating point values).
Location 3

Description

No operation

Value gets clamped to ZERO respectively


ZERO+SPAN

Location 4
Specifies the scan class used.
The startup command procedure has parameters like
/f=00:00:30
This parameter specifies cycle time for scan groups. The first /f= relates to scan group 1
etc.

Location 5
Specifies the direction of data transfer. The interface is able to handle READ and WRITE
Telegrams. As the interface has to open different connections for READ and WRITE, you
have to configure a logical connection to the PLC (Location2 and configuration file) for
each job (READ and WRITE) and PLC.
0
1

Input
Output

SquareRoot
Conversions can be applied to input and output values for tags of type integer or real.
The conversion that is applied depends upon the value of the SquareRoot PI Point
attribute as described in the following table.
Conditions:

Operation:

SquareRoot not
equal to 1

No operation. Raw input values are sent to PI for Input Tags and raw
values are output to the PLC for output tags.

SquareRoot=1

Input tags:
Value = [ (Value - InstZero)/ Convers ] * Span + Zero
Output tags:
Value = [ (Value - Zero)/Span] *Convers + InstZero

Zero, Span, and Convers are standard PI Point attributes. InstZero must be specified in
the extended descriptor. See the description of the extended descriptor for more
information.

Exception Reporting
Standard PI usage, see PI System Manual I.

Zero, Span
Standard PI usage, see PI System Manual I.

SIEMENS SIMATIC NET (S7) Interface Documentation

Configuration File
SINET.INI
Each interface process needs a configuration file, where the access point, symbolic name
and VFD is defined. While access point and VFD is optional (the interface will use the
first available access point and the first available VFD if there is no entry in the
configuration file) the symbolic name is required.
Example:
[INIT]
; ACCESS POINT defines the name of the CP device
; see settings of the PG/PC interface in siemens setup
; example for softnet: S7ONLINE
; for hardnet (CP1413): CP_H1_1:
ACCESSPOINT=S7ONLINE
SYMBOLICNAME=S7_15_PI
VFD=S7PIREAD
To run several copies of the interface as a service every interface needs its symbolic name.
The access point is a symbolic name for the network card used by the SIEMENS
software. You can edit/create the access point with the "Setting the PG-PC Interface"
application in the SIMATIC NET program group.

The Windows NT Control Panel


Communication on the PC side is configured from Setting the PG/PC Interface in the
Windows NT control panel.

Softnet S7
If the Softnet-S7 drivers are used on the interface node, perform the following in the
control panel.
1.

Click on the install button to install the ISO Ind. Ethernet module. One may need
to reboot after this is done. If the module has already been installed, its name will
appear in the white box that begins with <None>.

2.

From the same control panel add an ACCESSPOINT. Clicking on the down arrow
underneath Access Point of Application will reveal an option to add or delete an
Access Point.

3.

To associate this ACCESSPOINT with an Ethernet Module, highlight the appropriate


Ethernet Module name (which will appear somewhere beneath <None>).

4.

Click the Diagnostics button and test the configuration. If this test does not pass,
the interface will not be able to establish a connection to the PLC.

Hardnet - CP1413
If the CP1413 drivers are used on the interface node, enable the TF in setting the PG-PC
interface if the PLC has a TF connection configured for the PC.

SIEMENS SIMATIC NET (S7) Interface Documentation

Performance measurement
Performance Tag
You can configure a PERFORMANCE POINT to monitor the data transfer rate.
The performance point measurement is an integer, which specifies the time (in seconds)
that is required to update the scan list. The scan list is specified using the interface startup
script and the LOCATION4 point attribute.
To configure a performance point, create a tag with the point source specified for the
interface. The point type should be integer. The extended descriptor should say
PERFORMANCE_POINT all in uppercase. Location4 should specify the scan class of
interest.
Example:
Tag

Descriptor

Eng
Units

ExDesc

Loc. 1 Loc. 4 Point Point


Source Type

SINET1 .01

Sinet1 Performance Point Seconds


1

PERFORMANCE_POINT 1

SINET1 .02

Sinet1 Performance Point Seconds


2

PERFORMANCE_POINT 1

SINET1 .03

Sinet1 Performance Point Seconds


3

PERFORMANCE_POINT 1

I/O-rate Tag
You can configure an I/O-rate tag to measure the events sent by the interface to PI. In
order to do that, you will have to:
1.

Create/edit the file IORATES.DAT in the PIPC\dat directory.


Example IORATES.DAT:
SYSINET001,1

2.

Create a PI tag.
Example PI Tag:
Tag

Descriptor

EngUnits

Point
Point Span Typical Zero
Source Type
Value

SYSINET0.01 Snapshot event rate Events/min L


3.

Add the /ec=<no. of event counter> to the startup file.


Example:
/ec=1

6000 200

Interface Files
The startup files for the interface resides in the PIPC/interfaces/SINET directory. Listed
below are the files required for starting up the interface.
Directory PI/interfaces/SINET
SINET7.BAT
Start SAPI-S7 interface process
SINET7.exe
SAPI-S7 Protocol Interface
SINET.INI
Example configuration file for Interface

SIEMENS SIMATIC NET (S7) Interface Documentation

Installation
Pre-installation Notes
Before installing the Interface itself, the SIEMENS Library software needs to be installed
and the appropriate connections have to be configured on the PLC side:
S7

PC

Configure the CP MAC address.

Set up a connection of type PG/PC and configure the TSAPs and MAC address
for that.

Configure the Softnet S7 Database with COML S7. The TSAPs and MAC must
be according to the PLC configuration!

Configure the S7 Protocol to use the S7 Database created with COML S7.

To install the interface, you must define a point source code and modify the PI startup and
shutdown command files on that node. You can optionally specify one performance
monitoring tag as shown in section "Performance Point".

Additional Pre-installation for a PI 2 Home Node


In the PI2 System Point Source Editor set up the following values:
Point Source Code: S
Point Source Descriptor: S7 PLCs / H1
Location Minimum

Location Maximum

10

1000

10

To disable output (WRITE) tag configuration set up the following values:


Point Source Code: S
Point Source Descriptor: S7 PLCs / H1
Location Minimum

Location Maximum

10

1000

10

Installation
1.

Insert the installation disk, and look for the following files on the disk.
SINET7.BAT
Startup command file
SINET7.EXE
Program executable
SINET.INI

2.

Example configuration file for Interface

Copy these files to a directory such as c:\pipc\interfaces\sinet\. The names of the sinet7.bat and the
sinet7.exe can be freely altered as long as the root name of the executable and the command file is the
same. For example, for the first copy of the interface, one may wish to rename the executable and
command file to sinet1.exe and sinet1.bat. If the .bat file and the .exe file do not have the same root
name, then the executable will not be able to find the command-line arguments when the executable is
started as a service.

3.

Alter the command-line arguments in the sinet7.bat file as discussed under the section called The
Startup Command File. Pay particular attention to the /output flag. It is used to specify the directory
name and file name of the output log file. The sinet.ini file must be in the same directory as the output
log file. The interface will not be able to start if a directory is specified that does not exist.

4.

Try to start the interface interactively using the startup command file. If one cannot run the interface
interactively, one will not be able to run the interface as a service. Once the interface is successfully
running interactively, one can try to run it as a service by following the instructions below.

Running the Interface as a Service


The procedure for installing the interface as a service depends upon whether or not
Bufserv is being used. Once the interface has been installed as a service, the
procedure for starting, stopping, and removing the interface as a service is the same
whether or not Bufserv is used. The purpose of the Bufserv utility is to continue to
collect data from an interface in the event that the PI Data Archive is shut down for
some reason. For example, if the interface is installed on the PI home node and the
PI Data Archive is shut down for an upgrade, the Bufserv utility on the PI home node
will buffer the data in a file until the PI Data Archive is brought back online.
Another possibility is that the interface is installed on an API node. If there are
problems with the PI home node, then the Bufserv utility on the API node will buffer
the data in a file until the PI home node is brought back online.
The procedure for installing the interface in conjunction with the Bufserv Utility
assumes that the user has Bufserv 1.04 or higher because the procedure implicitly
assumes that Bufserv will be installed as a service. The actual installation of the
Bufserv Utility itself is not discussed. For these instructions, the user is referred to
the PI-API Bufserv 1.x Release Notes. Also, the installation procedure below does
not discuss the details related to shutdown events that the user should be aware of
when the Bufserv Utility is used. Once again, refer to the PI-API Bufserv 1.x
Release Notes for more information.
In the procedure below, it is assumed that the interface name is sinet7.exe. However,
one is free to change this name, and one must have a different name for each copy of
the interface that is installed as a service. The only restriction on naming is that the
executable and the bat file must have the same root name.
1.

One can get help for installing the interface a service at any time by typing the following:
Sinet7.exe -help
Note that the query flag that is described when help is invoked is not
implemented at this time.
The interface can be installed either as a manual or an automatic service. Automatic
services are started automatically when the NT operating system is rebooted. This
feature is useful in the event of a power failure. To install the interface as a manual
service, execute the following command.
Without Bufserv:
Sinet7.exe -install -depend tcpip
With Bufserv:
Sinet7.exe -install -depend tcpip bufserv
To install the interface as an automatic service, execute the following command.
Without Bufserv:
Sinet7.exe -install auto -depend tcpip
With Bufserv:
Sinet7.exe -install auto -depend tcpip bufserv
Check the Microsoft Windows NT services control panel to verify that the service has
been successfully added. One can use the services control panel at any time to
change the interface from an automatic service to a manual service or vice versa.

SIEMENS SIMATIC NET (S7) Interface Documentation


Once the service has been installed, the rest of the procedure is the same whether or
not Bufserv has been implemented. The service can be started from the services
control panel or by executing the following command from the directory:
Sinet7.exe -start
A message will be echoed to the screen informing the user whether or not the
interface has been successfully started as a service. If the service is successfully
started, the interface will attempt to read the command-line arguments from the
sinet5.bat file. For this to succeed, the root name (the part of the file name before the
.exe and .bat extensions) of the batch file must be the same as the root name of the
executable. Also, the batch file and the executable file must be in the same directory.
If the interface is unable to read the command-line arguments or if the command-line
arguments that the interface reads are invalid, the service will terminate with no
error messages echoed to the screen. For this reason, the user MUST check the
output log file to verify that the interface is running correctly.
If the service was successfully started, the user can verify that the service is still
running from the services control panel. If the service has been terminated, the
reason for its termination will be given in the output log file. If the service is still
running, the user can use apisnap.exe, ProcessBook, or another client program to
verify that data is being successfully transferred to the PI Data Archive.
The service can be stopped at any time by issuing the following command:
Sinet7.exe -stop
The service can be removed by
Sinet7.exe -remove
2.

If and only if the interface is installed as a manual service on the PI home node, the user may wish to
edit the c:\PI\adm\pisrvsitestart.bat and the c:\PI\adm\pisrvsitestop.bat command files. These
command files are invoked only when the PI data archive is started and stopped as a manual service
with the c:\PI\adm\pisrvstart.bat and the c:\PI\adm\pisitestop.bat command files.
In the c:\PI\adm\pisrvsitestart.bat file, make sure that the second to last line ends in
& wait 5000
If not, append & wait 5000 to the end of the line. In the same file, add the
following command just above :the end
C:\PI\interfaces\sinet\sinet7.exe -start & wait 5000
Add the following command to the c:\PI\adm\pisrvsitestop.bat file just above :the
end
C:\PI\interfaces\sinet\sinet5.exe -stop
Note that the full path name to the executable must be given in both the
c:\PI\adm\pisrvsitestart.bat and the c:\PI\adm\pisrvsitestop.bat command files.

Updating the Interface


To update the interface, simply replace the current Sint5.exe executable with the new
executable on the update disk.

SIEMENS SIMATIC NET (S7) Interface Documentation

Startup
To start the interface run the SINET/.BAT, star the service from the service control applet
or execute SINET7.EXE -start.
Command line switches for the SIMATIC NET interface
Parameter

Description

/ps=S

point source (S). For Point Source see also Chapter


Installation.

/in=1

Interface number. The interface number (P2) corresponds to


Location 1 of a tag. All tags with Location 1 = P2 will be
serviced by that Interface.

/host=localhost:5450

The Hostname and Port number of the PI Server to connect


to. Use 5450 for PI3 servers and 545 for PI2 servers. If this
interface runs on a PI3 Server, this should be
/host=localhost:5450.

/output=C:\SINET.LOG

Optional output file name, all messages will be written to that


file.

/pass=password

Optional password for connecting to (P3). Use only upper


case, because all command line arguments are converted to
upper case. As an alternative, you can wait for the prompt and
enter the password. This will avoid the situation to have a
password stored in a file and readable for every user on this
machine. The password only has to be entered first time. On
all future startups, the interface will remember the password
from an encrypted file.

/f=00:00:01

Scan class frequency class 1(required).


Scan frequencies are assigned to the Location 4 parameter of
a Tag. If a tag for example has Location 4=1, then he gets
values in frequencies of the first occurring switch /f=... in
SINETPISTART.BAT. The order number in
SINETPISTART.BAT is related to the scan class number.

/f=00:00:20

Scan class frequency class 2(optional)

/time=LOCAL

The PLCs do not send timestamps, so the interface has to


give a timestamp per value. This parameter decides whether
time stamping runs synchronously to the interface node
/time=LOCAL or to the PI Server node /time=SERVER.

/write=0

Disable write data (output) into PLC (security)


0

Enable

Disable

/deb=0

Optional debug level (defaulted to 0)

/db

Optional debug switch for UNIINT

/ex=1

Optional event counter for rate measurement

SIEMENS SIMATIC NET (S7) Interface Documentation

Shutdown
If the Interface is running in a command window, close the Command Window or press
Ctrl-C. This will call the exit handler of the interface.
If the interface is running as a service, execute the command SINET.EXE STOP to
stop the interface.
The shutdown procedure may take a while in order to leave the connected PLCs in a
correct status.

Error and information messages


You can find messages from the interface in two places:
The PIPC.log in /PIPC/dat directory on the interface PC (the interface puts its error and
information messages in this file except for messages from fatal errors that prevented the
interface from starting up).
The interface output file. All fatal error messages are copied to this file. The interface also
copies selected messages to this file and debug information (if debug is on).
Errors related to tag values are also reported in giving the tag a BAD INPUT state. This
happens, if the status of a value derived from the PLC is BAD.
Input tags can also get a status of I/O Timeout or DCS Failed if the Interface
detects connection problems.

SIEMENS SIMATIC NET (S7) Interface Documentation

How the SIEMENS SIMATIC NET (S7)


Interface Operates
For each group of tags (Location 1 parameter) an according interface process must be
started (/id=Location 1). For S7 tags, the executable SINET7.exe must be started.
At startup, the Interface checks all command line parameters (given in SINET7.bat). If
one of them is out of range, the interface generates an error-message and stops. If the
parameters are all right, the interface runs the initialization part. First step is to open a
connection to the PI Server in order to be able to retrieve necessary tag information. The
interface has to make a login for security reasons. We support 3 methods of logging into
the PI Server.
1. If the interface runs on the PI Server itself, it can be started under /hosts=localhost
and will not need an additional password. It uses the standard proxy account on the
server.
2. The administrator sets up a proxy account for the interface computer and
/host=hostname will lead to r/w rights for the interface. This is the recommended
method.
3. The interface attempts a logon under piadmin account and will ask for the password
when it was started first time (no SINET01.PWD file is found). The user enters the
correct password and the interface stores this password into an encrypted file on the
startup directory, where it will make use of it on future startups. Whenever the password
for piadmin changes, the user has to type in the correct password again on a new
startup of the interface.
It may occur that the administrator changes the piadmin password and does forget to
restart the interface in order to type in the new password. In this case the interface will
not be able to connect to the PI Server when an automatic restart of the interface occurred
(e.g. reboot of the interface computer caused by a power failure). If you want to avoid
such a situation, use method 2, proxy account.
After successful connection to the PI Server, the interface opens a connection to the
related SIEMENS library, SAPI-S7. If the library is not present, the interface will stop
with an error message. Once connection is made a list of all the tags with the interface
point source and configured for this special interface number is collected.

Data acquisition
Input
After successful startup, the interface generates a list of PI tags assigned to this interface.
Inputs are scan based and different scan classes can be defined. The smallest scan period
is 1 second. But this scan period can only be achieved, if the connected PLCs is in normal
operation.
Inputs can also be event based. Any PI tag can solve as trigger tag. Whenever this tag
changes value, the interface tag will perform a read.
The source of the point will be distinguished in evaluating the symbolic address written
in the Instrument Tagname field of a point. For S7 PLCs the SIEMENS library will use
this symbolic address directly and calculate the physical address internally.

Output
Output of data to the PLCs is internally handled by exception and downloaded whenever
an input scan cycle (of whatever scanclass) is performed. If it is necessary to update
values with 5-second accuracy, define a Scan-Class of at least 5 seconds (and at least 1
Input tag in that Scan Class). This does not mean that a write block is downloaded every
5 seconds. It means that if the value changes in PI, it gets downloaded within the next 5
seconds.
The mechanism of using the source point field makes it possible that another tag which
could be an input tag of any (and even the same) interface, can be the data source of an
Output Tag.

SIEMENS SIMATIC NET (S7) Interface Documentation

Hints for the System Manager


Bad values from S7
The interface checks the values from the S7 to suppress sending bad values to PI. The
following rules will be applied:
Condition

Digital State

RVAL > FLT_MAX

OVERANGE

RVAL < (-FLT_MAX)

UNDERANGE

ISTAT > SHRT_MAX

OVERANGE

ISTAT < SHRT_MIN

UNDERANGE

Configuration of the connection


To connect to the S7, youll have to create a SAPI S7 Database to attach to the access
point. See below for an example of the COML S7 screen to create a SAPI S7 Database:

This is an S7 database for the symbolic name S7_15_PI and the VFD S7PIREAD. Make
sure that the Remote Address, Local TSAP and Remote TSAP settings reflect your setup
and are the same in the configuration of the S7 PLC!
For the H1 Network use ETHERNET as network type.
The binary S7 database has to be connected to an Access point. This is done by the
setting the PG/PC interface application.

Above is an example of the PG/PC interface application. The Access point S7ONLINE
is set to ISO Ind. Ethernet via a Windows NT compatible network card. This access point
is connected via the Properties button to the binary S7 database (see below).

There is a debug facility that allows to copy usefully information about the S7
communication in a file (see below). However, this will slow down the communication
tremendously!

SIEMENS SIMATIC NET (S7) Interface Documentation

Additional entries in SINET.INI


The SINET.INI configuration file can hold additional information in the section
[COMMUNICATION]. You should be very carefully in adding/changing these entries as
they manipulate directly some internal variables without error checking.
Adding/changing these entries may will result in a not working configuration. See below
a table of supported keywords in SINET.INI.
Keyword

Default

Description

S7MESSAGEWAITDELAY

5 (milliseconds)

The interface will sleep that amount of


time between checking for received
message to lower CPU usage.

S7MAXWAITMESSAGE

10000

The interface will check that often for a


message before assuming that the
request has failed.

S7RECONNECTSHORT

5000 (milliseconds)

After an aborted connection the


interface will try the first reconnect after
that time

S7RECONNECTLONG

60000 (milliseconds)

After the first failed reconnect, the


interface will try to reconnect after that
time again.

S7MAXRECONNECTS

9999

Maximum number of reconnects before


the interface exits assuming a major
problem.

MAX_READ_VARIABLES

20

Maximum number of variables that are


read in one call. This can not be
greater than 20!

Test enviroment
The Interface was tested under the following Test Environment:
HOST PC

SIEMENS PLC

MS WindowsNT 4.0 SP5

S7-400

MS Visual C++ V6.0 SP3


enterprise edition

CPU 414-1 (414-1XG02-0AB0)

CP 443-1

PI 2.1.2

SOFTNET-S7 V3.0

SIEMENS SIMATIC NET (S7) Interface Documentation

Revisions
Date

Changes

29-Oct-99 AS

First release of the manual

01-Nov-99 AS

Added more information about setting the interface up

10-Nov-99 AS

Changes for Release

8-feb-01 AS

changed S7MAXRECONNECTS

changed Installation chapter

Changes for Release 1.0.2

Location3.

Removed order codes from SIEMENS parts (they are


changing frequently).

Replaced CP1413 with CP1613.

Added SOFTNET to the list of supported Scenarios.

Added list Bad Values table.

You might also like