siemens simatic net (s7) - osisoftcdn.osisoft.com/interfaces/2337/pi_ssimatics7_1.0.0.doc · web...

33
SIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 OSI Software, Inc.

Upload: dothuan

Post on 28-Mar-2018

268 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface to the PI System

for S7 Series PLC

V1.0.0

OSI Software, Inc.

Page 2: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

How to Contact UsPhone (510) 297-5800 (main number)

(510) 297-5828 (technical support)

Fax (510) 357-8136

Internet [email protected]

World Wide Web

http://www.osisoft.com

Bulletin Board

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

Mail OSI Software, Inc.P.O. Box 727San Leandro, CA 94577-0427USA

OSI Software GmbH Hauptstrae 30 D-63674 Altenstadt 1Deutschland

OSI Software, LTDP. O. Box 8256Level One, 6-8 Nugent StreetAuckland 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 statement—PI 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.

1997 OSI Software, Inc. All rights reserved777 Davis Street, Suite 250, San Leandro, CA 94577

Page 3: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

Table of ContentsIntroduction........................................................................................................................1

PI Point Configuration.......................................................................................................4

Configuration File..............................................................................................................7

SINET.INI...................................................................................................................7

The Windows NT Control Panel........................................................................................8

Softnet – S7...............................................................................................................8Hardnet - CP1413......................................................................................................8

Performance measurement...............................................................................................9

Performance Tag...........................................................................................................9

I/O-rate Tag....................................................................................................................9

Interface Files..................................................................................................................10

Installation.......................................................................................................................11

Pre-installation Notes...............................................................................................11Additional Pre-installation for a PI 2 Home Node.....................................................11Installation................................................................................................................11

Updating the Interface.....................................................................................................14

Startup.............................................................................................................................15

Shutdown........................................................................................................................17

Error and information messages.....................................................................................18

How the SIEMENS SIMATIC NET Interface Operates....................................................19

Data acquisition...........................................................................................................19

Hints for the System Manager.........................................................................................21

Configuration of the connection...................................................................................21

Additional entries in SINET.INI....................................................................................22

Test enviroment...........................................................................................................23

March 15, 1997 iii

Page 4: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

IntroductionThe 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.

1

Page 5: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

Supported Scenarios

System Network Remote CP Host CP Library

S7 H1 CP 443-16GK7 443-1BX00-0XE0

CP 14136GK1 141-3CB01

S7-14136GK1701-1CB00-3AA0

S7 PROFIBUS1 CP 342-56GK7 342-5DA00-0XE0

CP 5412 (A2)6GK1 541-2BA00

S7-54126GK1 702-5CB00-3AA0

CP 343-56GK7 343-5FA00-0XE0

CP 443-56GK7 443-5DX00-0XE0

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:

SIEMENSSINECS7- Programmierschnittstelle

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

Page 6: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

Supported Features

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

2 The interface supports scanning of tag caused by events from a PI tag (standard uniint feature).3 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.

3

Page 7: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

PI Point ConfigurationThe 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_POINTIf 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=tagnameIf 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

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

DB[Number],[Type]Index

Page 8: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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

B Byte (unsigned)

BYTE Byte (unsigned)

CHAR Byte (signed)

COUNTER Counter

D 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

W Word (unsigned)

WORD Word (unsigned)

X 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.

5

Page 9: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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

Not used in this version.

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 Input1 Output

Exception Reporting

Standard PI usage, see PI System Manual I.

Zero, Span

Standard PI usage, see PI System Manual I.

The Interface does not use the following tag attributes

Square root code

Totalization code

Conversion factor

Page 10: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

Configuration File

SINET.INIEach 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=S7ONLINESYMBOLICNAME=S7_15_PIVFD=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.

7

Page 11: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

The Windows NT Control PanelCommunication on the PC side is configured from “Setting the PG/PC Interface” in the Windows NT control panel.

Softnet – S7If 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 - CP1413If 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.

Page 12: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

Performance measurementPerformance 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 EngUnits

ExDesc Loc. 1 Loc. 4 PointSource

PointType

SINET1 .01 Sinet1 Performance Point 1

Seconds PERFORMANCE_POINT 1 1 S I

SINET1 .02 Sinet1 Performance Point 2

Seconds PERFORMANCE_POINT 1 2 S I

SINET1 .03 Sinet1 Performance Point 3

Seconds PERFORMANCE_POINT 1 3 S I

I/O-rate TagYou 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 PointSource

PointType

Span TypicalValue

Zero

SYSINET0.01 Snapshot event rate Events/min L R 6000 200 0

3. Add the /ec=<no. of event counter> to the startup file.Example:/ec=1

9

Page 13: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

Interface FilesThe 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/SINETSINET7.BAT Start SAPI-S7 interface processSINET7.exe SAPI-S7 Protocol InterfaceSINET.INI Example configuration file for Interface

Page 14: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

InstallationPre-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 Configure the CP MAC address.

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

PC 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 NodeIn the PI2 System Point Source Editor set up the following values:Point Source Code: SPoint Source Descriptor: S7 PLC’s / H1

Location Minimum 1 1 0 0 0

Location Maximum 10 1000 0 10 1

To disable output (WRITE) tag configuration set up the following values:Point Source Code: SPoint Source Descriptor: S7 PLC’s / H1

Location Minimum 1 1 0 0 0

Location Maximum 10 1000 0 10 0

Installation1. Insert the installation disk, and look for the following files on the disk.

SINET7.BAT Startup command fileSINET7.EXE Program executableSINET.INI Example configuration file for Interface

2. 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.

11

Page 15: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

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 -helpNote 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 tcpipWith 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 tcpipWith 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.

Page 16: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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 -startA 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 -stopThe service can be removed bySinet7.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 5000Add the following command to the c:\PI\adm\pisrvsitestop.bat file just above “:the end”C:\PI\interfaces\sinet\sinet5.exe -stopNote 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.

13

Page 17: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

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

Page 18: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

StartupTo 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 PLC’s 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

1 Disable

/deb=0 Optional debug level (defaulted to 0)

/db Optional debug switch for UNIINT

/ex=1 Optional event counter for rate measurement

15

Page 19: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

ShutdownIf 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 PLC’s in a correct status.

Page 20: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

Error and information messagesYou 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.

17

Page 21: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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.

Page 22: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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.

19

Page 23: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

Hints for the System ManagerConfiguration of the connection

To connect to the S7, you’ll 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.

Page 24: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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!

21

Page 25: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

SIEMENS SIMATIC NET (S7) Interface Documentation

Additional entries in SINET.INIThe 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 enviromentThe Interface was tested under the following Test Environment:

HOST PC SIEMENS PLC

MS WindowsNT 4.0 SP5

MS Visual C++ V6.0 SP3 enterprise edition

PI 2.1.2

SOFTNET-S7 V3.0

S7-400

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

CP 443-1

Page 26: SIEMENS SIMATIC NET (S7) - OSIsoftcdn.osisoft.com/interfaces/2337/PI_SSimaticS7_1.0.0.doc · Web viewSIEMENS SIMATIC NET (S7) Interface to the PI System for S7 Series PLC V1.0.0 How

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

changed S7MAXRECONNECTS

changed Installation chapter

23