PI Connect OPC Plus Single Interface - User Manual
PI Connect OPC Plus Single Interface - User Manual
User manual
V3.8a
Page 1 of 47
Contact:
Telephone
(0621) 456-2303
Fax
(0621) 456-3334
Address
Siemens AG
GER I CS MTE MHM, Hr. Lutter
Dynamostr. 4
D - 68165 Mannheim
Germany
Trademarks:
PI is Trademark of OSIsoft, LLC
Microsoft EXCEL, Microsoft Windows NT and Microsoft Windows XP, Windows 7 are Trademarks of Microsoft Corporation.
Page 2 of 47
Contents
1. Overview ..................................................................................................................... 5
1.1
General ............................................................................................................. 5
1.2
Exemplary configuration ................................................................................... 6
1.2.1 PCS7 via Open PCS7 ...................................................................................... 7
1.2.2 PCS7 / WinCC via WinCC OPC server ............................................................ 8
1.3
Performance ..................................................................................................... 9
1.4
Features of the interface ................................................................................ 10
1.5
Option Archive Recovery (via OPC HDA) ....................................................... 10
1.6
Licensing ........................................................................................................ 10
2. Install und Uninstall ................................................................................................... 11
2.1
Requirements for the Installation .................................................................... 11
2.2
Installation of the Interface Software .............................................................. 11
2.3
Uninstall .......................................................................................................... 11
3. Configuration ............................................................................................................. 12
3.1
Structure of the file SiOPC_IF.ini.................................................................... 12
3.2
Licence settings .............................................................................................. 13
3.2.1 Creating a licence ........................................................................................... 13
3.2.2 License Activation........................................................................................... 13
3.2.3 Emergency function ........................................................................................ 13
3.3
General settings ............................................................................................. 14
3.4
PI System Parameters.................................................................................... 15
3.5
OPC DA / OPC HDA Parameters ................................................................... 15
3.6
Global Parameters (for all instances valid) ..................................................... 17
3.6.1 Replacement tables for digital conditions (DigiCodeTable) ............................ 17
4. Starting and terminating of the Interface ................................................................... 18
4.1
Starting as Windows console application ....................................................... 18
4.2
Simplified start as Windows console application by linkages ......................... 18
4.3
Automatic start up as console application after Login .................................... 19
4.4
Shutdown of the console application .............................................................. 19
4.5
Starting as Windows Service .......................................................................... 20
4.5.1 General ........................................................................................................... 20
4.5.2 Register, configure and operation of an Instance as a service ....................... 20
4.5.3 Removing service of an instance .................................................................... 21
5. Function of the Siemens OPC+ Interface ................................................................. 22
5.1
Scope ............................................................................................................. 22
5.2
Connecting to redundant PCS7 OS (redundant OPC server) ........................ 22
5.3
Configuration of acquisition cycles ................................................................. 23
5.4
Special feature on time stamping ................................................................... 24
5.5
Writing PI data OnDataChange.................................................................... 25
5.6
Bit masking ..................................................................................................... 26
5.7
Scaling ............................................................................................................ 26
5.8
Replacement tables for digital conditions ....................................................... 26
5.9
Archive Recovery OPC HDA (optional) .......................................................... 27
5.9.1 General and requisites ................................................................................... 27
Siemens PI-Connect OPC+ Interface User manual
Page 3 of 47
Page 4 of 47
1. Overview
1.1
General
The Siemens PI-CONNECT OPC+ Interface reads process data from a Process Control System
(stand alone or redundant pair) via OPC Data Access (OPC DA) and sends this data to the PI
system. Writing data out of the PI system to variables of the Process Control System is also
supported.
The PI-CONNECT OPC+ Interface provides the option Archive Recovery. See also section 1.5
Option Archive Recovery (via OPC HDA). For best performance the Interface uses OPC HDA only
to close data gaps. In online mode the Interface uses OPC DA. On startup of the PI-CONNECT
OPC+ interface or after a reconnect of the connection to the process control system the data gap
can be closed out of the archives of the process control system.
For the option Archive Recovery the access to the archives of the process control system via the
OPC Historical Data Access (OPC HDA) server is necessary.
In the online mode (using OPC DA mode), the process data transfer between the DCS and the PI
interface will run only on data changes. Due to that the DCS has a low load. For the cyclical supply
of the PI exception test (check for horizontal value changes), events with current time stamps
were built (see section 5.4 Special feature on time stamping).
In the PI-CONNECT OPC+ interface a mechanism is implemented, which can handle the switch
over of the two redundant OPC servers itself (option).
The special features of PCS7 / Win CC OPC DA server (Time stamp correction, launch behaviour
and status handling) were considered and prepared in PI for an optimized representation.
Further features of the PI-CONNECT OPC+ Interface are:
Please regard for the installation of the PI-CONNECT OPC+ interface, that one instance of the
interface connects one PCS7 server or server pair. That means for each server or server pair one
instance of the interface has to be installed and licensed. For further information of the installation
please refer to chapter 2 Install und Uninstall.
In this description the functionality of the interface connecting OPC servers like in PCS7 or WinCC
is explained. Using other DCS systems the user has to interpret parts of this description for his
configuration.
Page 5 of 47
The interface was designed for OPC DA V2.05a and OPC HDA V1.2 OPC servers. It is tested
with OPC servers of the following systems:
- Siemens PCS7 V7 and V8 via OpenPCS7
- Siemens PCS7 V6.x, PCS7 V7.x, PCS7 V8 (via WinCC OPC DA server / WinCC Connectivity
Pack)
- Siemens WinCC >V5.1, WinCC V6,x, WinCC V7.x
- Siemens Teleperm M OPC server (only DA)
- Siemens Simatic NET OPC (only DA)
- Siemens SPPA T2000 (Teleperm XP), SPPA T3000
- different OPC servers of other producers (on enquiry)
For hints of the installation and configuration of the PI SDK / PI API please read chapter 8: Hints
for API Installation and PI Server Configuration and the referring documentation of OSIsoft, LLC.
1.2
Exemplary configuration
PI-CONNECT OPC+ should be installed on an own PC. The interface is able to connect to both
servers of a redundant server pair or to a stand alone server. Therefore the interface PC is
connected by an own LAN card to the terminal bus of PCS7. By another LAN card the connection
to the PI server is established. For communication with the PI server the interface software
requires the PI API/SDK.
Page 6 of 47
PI Client
ProcessBook
PI Client
DataLink
PI Client
PI-SMT
PI-CONNECT OPC+
Interface PC
Ethernet network
OSI Soft
PI API / PI SDK
Plant Information
System
Server
V3.4
Siemens
PI-Connect
OPC+
Interface
COM/DCOM
Ethernet network
((Pear to pear connection
recommended)
OpenPCS7
OPC DA / HDA
OS LAN (Terminal bus)
SIMATIC PCS7 OS
server
I
(Redundant)
SIMATIC PCS7 OS
server
II
(Redundant)
SIMATIC PCS7 OS
server
III
(Redundant)
PROCESS
Page 7 of 47
PI Client
ProcessBook
PI Client
DataLink
PI Client
PI-SMT
PI-CONNECT OPC+
Interface PC
Ethernet network
OSI Soft
PI API / PI SDK
Plant Information
System
Server
V3.4
Siemens
PI-Connect
OPC+
Interface
Ethernet network
((Pear to pear connection
recommended)
DCOM
OPC DA / HDA
OPC DA / HDA
SIMATIC PCS7 OS
Server
I
(Redundant)
SIMATIC PCS7 OS
Server
II
(Redundant)
OPC DA / HDA
SIMATIC PCS7 OS
Server
III
(Redundant)
PROCESS
Page 8 of 47
1.3
Performance
The PI-CONNECT OPC+ interface supports queued sending to PI (queued send to snapshot),
API bode buffering und Auto-reconnect after connection loss to the PI server or to the process
control system.
Redundancy of the PCS7 Systems is supported. Redundancy switching is done by the PICONNECT OPC+ interface (option).
Supported features:
Supported features
Signup for Updates
Yes
Exception Reporting
Yes
Yes
Unlimited
1 second
Cyclic, OnDataChange
OnDataChange
Time stamping
DCS or Interface PC
Archive Recovery
Pointclass
Classic
Page 9 of 47
1.4
1.5
1.6
Licensing
A license is necessary for each PI Interface PC. Each of these licenses allows connection to a
single PCS7 Server pair.
If a PCS7 process control system consists of more then a single PCS7 OS server pair a
license extension is needed for each additional PCS7 OS server pair.
If the PI-CONNECT OPC+ Interface shall handle itself switching between redundant OPC
servers an according license is needed.
Archive Recovery is an option for the PI-CONNECT OPC+ Interface which is needed only
once for each Interface PC.
Not redundant PCS7 OS servers as well as PCS7 OS Stations respectively redundant pairs of
PCS7 OS Stations are treated like a redundant PCS7 OS server in by the PI-CONNECT
OPC+ Interface.
For each instance of the PI-CONNECT OPC+ Interface a license file is needed for correct
operation. For generation of this license a tool is provided which must be run on the PI
interface PC to collect the data necessary for the generation of the license file. Those data
must be send to us by email. The license file is returned by email thereafter.
Installation, test and evaluation of the PI-CONNECT OPC+ Interface may be done with the
emergency licence provided with the delivery.(refer to section. 3.2.3 Emergency function).
Thus the needed license file may be ordered with the date of productive use of the PICONNECT OPC+ Interface whereby start time of the service contract will also not be until that
date.
Page 10 of 47
2.2
Operating system: depends on the release of PCS7. Please refer to release notes of PCS7
OS clients.
Operating system login of the interface PC and the PCS7 servers must be identical (also for
the PCS7 OS clients).
Option Archive Recovery (starting with PCS7 Version 6): License for OPC HDA server:
Connectivity Pack assigned to the right WinCC installed on every PCS7 OS server,
or since PCS7 V7.1: Open PCS7 for PCS7 OS clients on every PCS7 OS server
PCS7 Server, PI-Server and PI-Interface PC must be time synchronised by the same source.
2.3
Uninstall
To uninstall the OPC+ IF carry out the following steps:
The configuration and log files and the installation directory are not deleted by the uninstall
procedure and may be deleted manually afterwards.
Page 11 of 47
3. Configuration
3.1
general parameters
PI system parameters
OPC parameters
Meaning
Constant parameter
Op
OpZ
Ob
ObZ
For optional parameter the indicated values in all the tables below are the default values which are
used if the parameter is not indicated.
Page 12 of 47
3.2
Licence settings
The software is licensed to the machine on which it is running. To receive a valid license
file proceed as follows
Copy the CreateUMI.exe and the UMIL.dll (contained in the delivery package) to a
directory, e.g. C:\umi
When you see the "press any key" in the opened window, finish the operation by pressing
any key.
A file named UMI_xxxxxx.dat will be created, where xxxxxx is the name of the PC where
you did run the CreateUMI.exe.
You will receive the license files for the requested software.
To have the license files available for installation it might be useful to do this some time in
advance to installation.
Page 13 of 47
3.3
General settings
Within the group of general parameters those settings are located which are not explicitly
assigned to the coupling to the PI System or to the coupling to OPC.
Type Parameter
Explanation
ObZ
Logfile=C:\OPC_IF_01.log
Logfile for output of trace lines should be different for each instance.
Op
FileSize=10000
Maximum size of the log files in Bytes. The file is renamed in *.old when this size
is reached. Thereby is assured to have a maximum of two files on the hard disc
with the stated size.
OpZ
PrintLevel=5
OpZ
LogLevel=5
*)
Cycle_1=1000,1,1
Scan cycle 1 for cyclic reading of values, refresh flag, DataChange Flag
(refer to section 5.3 Configuration of acquisition cycles).
*)
Cycle_2=1000,1,1
Scan cycle 2 for cyclic reading of values, refresh flag, DataChange Flag
(refer to section 5.3 Configuration of acquisition cycles).
*)
and so on.
OpZ
BufferLimit =100000
Maximum amount (number of process values) of the internal buffer between OPC
and PI Interface.
Range:
1000... 1000000
recommended:
100000
Op
ValueState_Bad=-255
PI Point state, written if the OPC Variable has set the Quality Flag meaning Bad.
Range:
-1024 .. 0 (alle PI States)
default:
-255 (BAD INPUT)
Op
ValueState_Uncertain=0
PI Pointstatus, written if the OPC Variable has set the Quality Flag meaning
uncertain.
Range:
-1024 .. 0 (all PI States)
default:
0 (OK, resp.. no State)
*) It is possible to define 30 different intervals for the cyclic reading of values. The intervals must
be defined completely. It is not possible to define interval_1 to interval_5 and interval_7 without
prior definition of interval_6. At run time no intervals may be deleted or modified. Nevertheless,
it is possible to add further intervals (please refer to chapter 5.3 Configuration of acquisition
cycles).
Page 14 of 47
3.4
PI System Parameters
Listed parameter are applied to configure the coupling to the PI system as well as to control the
behaviour of the OPC+ IF interface towards the PI system.
3.5
Type Parameter
Explanation
Ob
PIHost=PI_SERVER
PI Server to be connected
Ob
PointSource=kkkkkkkk
Ob
IORateTag=ior_OPC_IF_1
Tag where a recording rate (values per second, average of ten seconds) of
the interface is stored. For each instance a separate tag should be used.
OpZ
UpdateDelay=30
OpZ
PIAPIVerbose=1
Op
USESDK= 0
Explanation
Ob
MasterOPCServer =
OPCServer.WinCC
ProgID of the first respectively stand alone OPC DA server. For the
PCS7/WinCC OPC DA Server the ProgID always is OPCServer.WinCC.
Op
SlaveOPCServer =
OPCServer.WinCC
ProgID of the redundant partner. In case of a stand alone OPC Server this
values should be omitted. Please refer to chapter 5.2 Connecting to
redundant PCS7 OS (redundant OPC server). For the PCS7/WinCC OPC
DA Server the ProgID always is OPCServer.WinCC.
Ob
MasterOPCServerHost=
Serv1
Op
SlaveOPCServerHost=
Serv2
Op
MasterHDAOPCServer =
OPCServerHDA.WinCC
ProgID of the first respectively stand alone OPC HDA Servers. For the
PCS7/WinCC OPC HDA Server the ProgID always is
OPCServerHDA.WinCC.
Op
SlaveHDAOPCServer =
OPCServerHDA.WinCC
ProgID of the redundant partner. In case of a stand alone OPC Server this
value should be omitted. Please refer to chapter 5.2 Connecting to redundant
PCS7 OS (redundant OPC server). For the PCS7/WinCC OPC HDA server
the ProgID always is OPCServerHDA.WinCC.
Op
MasterHDAOPCServerHost=
Serv1
Computer name of the PC where the MASTER OPC HDA server is installed.
Op
SlaveHDAOPCServerHost=
Serv2
Page 15 of 47
Op
MasterOPCDAItemPrefix,
MasterOPCDAItemSuffix,
SlaveOPCDAItemPrefix,
SlaveOPCDAItemSuffix,
MasterOPCHDAItemPrefix,
MasterOPCHDAItemSuffix,
SlaveOPCHDAItemPrefix und
SlaveOPCHDAItemSuffix
Definition of OPC DA and OPC HDA Item prefix und suffix using the
according option. Refer to chapter 5.17 Option Connection specific Item
Op
OPCHDAMaxRequestTime
Time span limit in hours for an OPC HDA request. If a request is done with a
greater time span the request is parted in the according number of partial
requests. Default is 144 (=6 days)
Op
OPCDATestItem
Item to verify the connection state of the OPC DA server. Refer to chapter
5.16 Controlling of the OPC connection via an OPC test Item
Op
OPCConnectionTestTime
Cycle of the OPC connection checks. Refer to chapter 5.16 Controlling of the
OPC connection via an OPC test Item
Op
OPCTestItemTSTimeout
Op
OPCReconnectDelay
Op
OPCDAItemBadStateSupressi
on
Op
LCID
Op
Archive_1=
local::Prozesswertarchiv\
Serially numbered list of the process value archives. Please refer to chapter
6.9 Location5 Attribute (PCS7 / WinCC Archive) and chapter 7.3
Identification of the WinCC Process value archives.)
Op
Archive_2=
local::Prozesswertarchiv2\
Serially numbered list of the process value archives. Please refer to chapter
6.9 Location5 Attribute (PCS7 / WinCC Archive) and chapter 7.3
Identification of the WinCC Process value archives
Op
HDADataBlock = 750
Op
HDADelay=700
Time in ms to wait for the next data block via the HDA OPC server. Higher
values will decrease the load on the PCS7 server.
Range:
0 ... 65535
Recommended:
100
Op
OPCStringMode=0
Mode used to read or write PI String tags from the OPC Server.
0:
Normal mode (default). String is written as VT_BSTR
respectively OPC value is transformed to VT_BSTR
before further processing
1:
read and write string as ByteArray from /to OPC.
Interpretation as 8 Bit/character String.
2:
like 1, but interpretation as 16 Bit/character String.
3:
request a OPC Item as VT_BSTR (otherwise always VT_EMPTY)
Op
WindowRecover=0
Op
WindowRecoverStartTime=
2006-01-25 16:17:54
Start time of HDA Window Recovery mode. Refer to chapter 5.12 HDA
Window Recovery Mod.
Format is mandatory : YYYY-MM-DD hh:mm:ss
Op
WindowRecoverEndTime=
2006-01-25 22:17:54
End time of HDA Window Recovery mode s. Refer to chapter 5.12 HDA
Window Recovery Mod.
Format is mandatory: JJJJ-MM-DD HH:MM:SS
Op
OPCWriteProtection = 1
1:
Prefix
0:
/ Suffix
Page 16 of 47
3.6
Op
OPCS7WAMaxReadds=3
Op
Op
OPCS7WAReaddDelay=
25
Page 17 of 47
4.2
C:\Programme\Siemens\SiOPC \SiOPCIF 01
C:\Programme\Siemens\SiOPC \SiOPCIF 03
for Instance 1
for Instance 3
Activate the connections dialogue features, select table connections and select option
minimized in field execute.
Complete the parameter file SiOPC_IF.ini by a section for the new interface instance and the
required parameter. Please notice:
Please notice:
Page 18 of 47
4.3
4.4
The interface will terminate. Please wait until the window of the console windows is closed.
Page 19 of 47
4.5
4.5.1 General
PI Connect OPC+ Interface (V3.8 and higher) can be started as a Windows service. The
necessary steps are described below. Please consider always the following details:
-
If the interface (=OPC client) shall access an OPC server remotely, it has to be ensured that
the user running the service has accordant DCOM access rights to the OPC server (and also
backwards for the callbacks of the asynchronous OPC interface). This is achieved normally
by using a user account for the service which is available on the OPC server, too.
Some OPC servers (e.g. Open PCS7) are only released to operate on a PC using a so-called
Autologon. Therefore on such a PC a user is always logged in automatically. This has to
persist if the interface will run as a service, too!
Service name:
PI_CONNECT_OPCPlus_Interface_SA#nn
Nn means the instance number, too. Thereafter the service may be configured using within the
Windows services. Usually the following parameters are set:
-
Recovery
For the last item we recommend to use the windows option which restarts the service after failure.
User account and startup type to be used depend on the intended use. Added two recommended
examples:
Page 20 of 47
User Account corresponds with the Windows account of the PCS7 client stations. This is
often identical with the Windows account of the OS Server.
Running in combination with Open PCS7 an autologon must be performed before starting the
Open PCS7 OPC Server. This has to be configured accordingly. The interface software must
not be started before the logon. Startup of the interface software should be done with a Net
Start Command included in a Batch file in the Startup directory.
Autostart.bat
echo Startjob for SiOPC-Interfaces
net start PI_CONNECT_OPCPlus_Interface_SA#nn
Therefore the PC does not need an Autologon. The interface may be operated without a logged in
user.
4.5.3
Page 21 of 47
Scope
Reading process values:
Process values are read cyclic out of the Data Manager (internal and external variables) of a
PCS7 server in up to 30 free definable cycles. However, the cycles are adjusted to the cycles of
the OPC server (please refer to chapter 5.3 Configuration of acquisition cycles).
In the online mode (using OPC DA mode), the process data transfer between the DCS and the PI
interface will run only on data change. Due to that the DCS has a lower load. For cyclic supply of
the PI exception test (check for horizontal value changes) events with actualized time stamps are
built (see section 5.4 Special feature on time stamping).
Either the stamps out of the process control system or local time if the Interface PC may be used.
Writing process values:
Data out of the PI System may be written to PCS7 variables in the Data Manager. Writing is done
event based (OnDataChange) whenever the source point of the PI system delivers a new event.
Archive recovery via OPC HDA (optional)
For PI points using the function the data gap since the last run of the interface is closed by the
interface software. To do so the values are read out of the process value archives of the PCS7
/WinCC servers via the OPC HDA Server.
Archive Recovery is an option of the interface software and must be
licensed separately to use the option.
Connection check:
The connection to the PCS7 server and the PI System is permanently checked by the SiOPC+
interface and a reconstitution of the connection is established. In case of loss of connection to the
PCS7 Server data gaps occur. In case of breakdown of the connection to the PI System data are
completely transmitted after successful reconnection. For this activation of the API Node Buffering
for the SiOPC+ interface is required (refer to chapter 8, Hints for API Installation and PI Server
Configuration).
5.2
Page 22 of 47
5.3
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
1000
1000
1000
2000
5000
10000
60000
300000
600000
3600000
2000
3000
4000
5000
10000
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
{optionally} ,1
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0
Cycle times are in milliseconds. Thereafter the switches for the kind of data communication
between the OPC server and the PI-CONNECT OPC+ Interface may follow comma separated.
The first switch sets the cyclic refresh to on; second one sets the DataChange notice.
When DataChange is activated (=1) all actual changes of the process values will be written in
the internal cache and also directly forwarded to the PI API.
When Refresh is activated (=1), the interface tests cyclically the cache and forwards the last
received value to the PI API. Those PI tags who are configured for a cycle, that is activated for
Refresh, in each case the IO Type 1 or 3 should be used (refer also section 6.7 Location3
Attribute (IO-Type) and 5.4 Special feature on time stamping).
For optimal mode of operation both switches (Refresh and DataChange) should be set to 1. This
is also the default value if those switches are not present. In this case the interface forwards
all actual changes of process values reported by the OPC server (Data Changes) directly to the
Siemens PI-Connect OPC+ Interface User manual
Page 23 of 47
PI-API and in case of an constant development without changing of the process value, the PI-API
will be supplied cyclically with the last received process value from the interface cache but with an
adapted time stamp (only with IO Typ = 1 or 3).
In each case the transmission between OPC server and the interface is done only, if
there is a change of the process value (On Data Change). The interface ensures
itself the cyclical feeding of the PI API using his internal cache. Thus the load for
the OPC server and the subjacent process control system (DCS) will be minimized.
Cycles 1 to 10 are PCS7 standard cycles and can not be changed in PCS7. Cycles 11 to 15 are
user specific cycles which may vary. They should be adjusted in the file SiOPC_IF.ini according to
the actual settings in the PCS7 server.
Process values may be read cyclically from a PCS7 server in 30 free adjustable cycles. These
cycles have to be defined in the section of the SiOPC-IF.ini file belonging to the interface instance
(please refer to chapter 3 Configuration). These times specify the cycle to order the values from
the OPC server. The WinCC OPC server maps these requests to the 15 cycles of the
PCS7/WinCC server. Cycles not contained in the list of the 15 PCS7 server cycles are mapped to
the next faster cycle.
All process values having the same cycle are signed up for one group in the OPC server. A
definite offset for the start of the scan cycle is not adjustable. Processing starts in groups with a
delay of some seconds after reading the configuration out of the PI server.
Directly after the start of data collection for a group the process values are read. Because of this
on start up of the interface the first values for all cyclic reading points will appear in the PI system
after a short time.
An optimisation algorithm assures to un-register no more needed process values (caused by a PI
Point update DELETE). However, on very large changes in configuration we recommend the
interface be restarted.
5.4
5,5
4,5
4,5
3,5
3,5
2,5
2
10:15:00
2,5
10:15:17
10:15:35
10:15:52
2
10:15:00
10:15:17
10:15:35
10:15:52
To avoid those reproducing problems in the PI archive the PI-Connect OPC+ Interface does some
corrections. The PI-Connect OPC+ Interface itself provides cyclic values in the scan cycle of the
PI API and delivers a corrected (actual) time stamp if needed. Leaps in time resulting of PCS7
Siemens PI-Connect OPC+ Interface User manual
Page 24 of 47
server redundancy switches have to be taken in account in doing so. To avoid faulty values
caused by cycle imprecision it may be necessary to suppress the value for one scan cycle for
measure points which run constantly for at least two scan cycles.
Therefore it is an absolute must to have the PCS7 Server, the Interface PC und the PI Server
synchronic in system time. If this can not be assured we recommend to use the local time of the
Interface PC for time stamping of the values sent to the PI System.
In the following example is shown how the value changes received from PCS7 are forwarded
cyclically to the Pi API and how the first level compression of PI System (exception test) works:
5.5
New Value
out of
PCS7
3
3
3
3
3
3
3
5
5
5
8
8
8
8
2
2
2
2
3
5
5
8
8
2
Page 25 of 47
5.6
Bit masking
It is possible to select a single bit or a group of bits out of the value using a 32 bit mask (refer to
chapter 6 PI Point configuration). For this the PCS7 source variable is converted into a 32 bit
unsigned integer. Post decimal positions of float variables are truncated (not rounded!!). If the
value of the source point is out of range of an unsigned 32 bit integer the PI value is set to
OVERRANGE res. UNDERRANGE. The bit mask may be given binary (max. 32 digits),
hexadecimal (max. 8 digits) or decimal (0....4294967295) separated by a blank following the
PCS7 Variable name in the ExDesc. The keyword BITMASK and the format key 0x res. 0b
are case sensitive. The first character of 0x and 0b is the numeral null!
Examples:
2
BITMASK=0b1100:
Binary bit mask. Bit 2 and2 will be selected. Only the decimal
values 0, 4, 8, 12 may be written to PI.
BITMASK=0xf0:
BITMASK=10:
Optionally it is possible to do a right shift on the masked double word to set the first selected bit to
0
6
7
the position 2 . This is helpful if e.g. the bits 2 and 2 are selected
(BITMASK=0b11000000).Without the shift option the values 0, 64, 128, 196 may be written to PI.
With the shift option (BITMASK=0b11000000; SHIFT=1) it will be shifted 6 positions to the right
6
6
7
0
because 2 is the lowest with the mask selected bit. Therefore the bits 2 and 2 will turn to 2 and
1
2 and with this the gapless with zero starting values 0, 1, 2, 3 will be written to PI. This is a
relevant help in designing digital sets within PI. The shift option is activated in adding the keyword
SHIFT=1 separated by a semicolon to the bit mask.
5.7
Scaling
The OPC+ IF supports scaling of values received from the OPC server. The function is activated
by setting the location2 attribute of the PI tag to 1. The attribute UserReal1 contains the value of
the factor; in UserReal2 the value of the offset is configured. Please refer to chapter 6 PI Point
configuration. The value transmitted to the PI server is calculated as follows:
5.8
+ UserReal2
+ offset
Page 26 of 47
5.9
5.9.2 Functionality
Starting with PCS7 version V6.0 the PCS7 Server, precisely WinCC supports an OPC HDA server
besides the OPC DA server. Via the OPC HDA server the process value archive of the PCS7
server may be accessed. The option Archive Recovery of the OPC+ IF may use this way to
close the data gap since the last shutdown on start up (e.g. after service works on the interface
PC or the network). The interface detects the time stamp of the last value in the PI archive and
asks for values out of the PCS7 system starting with that time. When the actual system time is
reached data collection is switched over to OPD DA. Because OPC DA is signed up in an early
stage the switching gap will be < 5 seconds. The archive recovery function may be activated for
each PI tag separately.
For each PI tag that uses the archive recovery function, the according PCS7 variable
must be available in a PCS7 process value archive. A breach of this condition in a
huge amount may cause errors in the interface software.
The archive variable name must be specified because normally variables in the process value
archive are different from the variable names in the DataManager. Therefore the intrumenttag
attribute of the PI tag is used. Furthermore the archive containing the variable must be specified.
For this the attribute location5 is foreseen. Points not using this functionality should be set to 0.
For further information please refer to chapter 6 PI Point configuration.
Archive recovery makes sense only for PCS7 archive variables corresponding with the
chronological sequence of the process value. In case of having archived only calculated values
e.g. the total of the last ten values archive recovery does not make sense because in the example
you only have a value archived which is about tenth the value.
Page 27 of 47
5.9.3 Performance
Performance of the archive recovery function depends on the starting point. The farther the
starting point lies in the past the less the performance will be. Here is an example of a
performance test:
Starting point:
4 days in the past
1 day in the past
1 hour in the past
Performance:
180 archive values per second
800 archive values per second
1400 archive values per second
These values also depend on the load of the PCS7 server. The actual performance is shown in
the interface application window during archive recovery. Be aware that processing is done
separately for each tag. Once a tag reaches the actual time this tag is switched to online mode
and the archive recovery process starts with the next tag.
Page 28 of 47
Blob
Float 64-Bit
j)
Raw data
Text reference
Page 29 of 47
Page 30 of 47
PI state
PCS7 Server not within reach, PCS7 Variable not found, breakdown
of connection to PCS7 server, AS not within reach of PCS7 server
Bad Quality
Error
Over Range
Under Range
Bad
The following states of the interface result in the shown PI States for all Points of the
interfaces:
Possible reason
PI state
Interface start up
Scan On
Scan Off
Scan Timeout
Scan On
The interface has the option to define in the ini File the correlation between the OPC quality flags
and the PI Point states resulting thereof. The following quality flags from OPC are supported:
OPC Quality Flag
PI Status
Bad
Good
Always 0 (OK)
Uncertain
Page 31 of 47
Page 32 of 47
= @RM_Master
= 30
= 15
= 0 (mandatory)
The variable @RM_Master changes very seldom and provides no new time stamp most of the
times when read. The value 0 for the parameter OPCTestitemTSTimeout changes the
observation mode of the variable OPCDATestItem from on change to on error and allows the
interface to switch to HDA mode on connection return.
Page 33 of 47
Function
RecoveryStateTag
TC_DA_Tags
TC_DA_HDA_Tags
ErrorTC_TagConfig
ErrorTC_DAError4DATags
ErrorTC_DAError4HDADATags
ErrorTC_HDAError
TC_HDA_InWork
Page 34 of 47
=3
OPCS7WAReaddQualityCode
=4
OPCS7WAReaddDelay
= 25
Page 35 of 47
6.
6.1
PI Point configuration
Automatic configuration tool (option)
For this interface an automatic configuration tool is available. A user defined filter is set up on the
PCS7 module level. Thereafter the PI tag configuration is created automatically. On any change if
the PCS7 configuration the necessary changes for the PI configuration may be created in so called
delta runs. For further information please refer to the documentation of the configuration tool.
Only structure tags are recognized by the confiration tool. The means that the variables
have to be parameters if a WinCC structure type. This is the fact for all PCS7 sturcture
tags normally.
6.2
PointSource
ExDesc
PCS7 Tag
Location1
Assignment to instance
Location2
Scaling on/off
Location3
IO Type
Location4
Location5
InstrumentTag
UserInt1
replacement table
UserReal1
scaling, factor
UserReal2
scaling, offset
SourceTag
This documentation only covers the interface specific attributes. For Pi point configuration
additional attributes have to be set. For a detailed description of PI SMT, PI Point Database and
their attributes please refer to the system documentation of the PI System.
6.3
PointSource Attribute
The PointSource Attribute for OPC+ IF points may be P for PCS7, O for OPC etc. This
parameter assigns PI Points to the OPC+ IF. It must correspond with the parameter PointSource
in the SiOPC_IF.ini file. The assignment to the particular instance of the PCS7 interface is
produced via the attribute Location1.
Only values with a maximum of eight characters are supported for the PointSource. Upper /Lower
case are not differentiated. Please keep in mind that some values may be occupied by the PI
Server itself (e.g. C for Performance equations) and others may be occupied by further already
existing interfaces. Please consult your PI Administrator to appoint that value.
Caution is advised if an interface used on the PI Serve supports only single character point
sources. If such an interface is set to PointSource A for excample it will try to operate ALL tags
wwhich have the PointSource starting with A. This attribute is mandatory for OPC+ tags.
Page 36 of 47
6.4
6.4.1
ExDesc attribute
Structure
The ExDesc attribute of a PI Point may contain several parameters. The parameters are
separated by a semicolon.
<IDENTIFIER1=Parameter1>;<IDENTIFIER2=Parameter2>;<IDENTIFIER3=Parameter3>
For these settings upper and lower case has to be taken in account!
6.4.2
Page 37 of 47
6.5
6.6
6.7
1:
read, time stamp provided by the OPC server with check and eventually
correction (recommended!)
2:
read, time stamp provided by the OPC server without check and correction
3:
4:
6.8
6.9
Page 38 of 47
>0
If this function is used, it has to be proofed, that the replacement table is defined in the
configuration file, before start up interface or definition of PI Points.
Page 39 of 47
7. Hints on PCS7, WinCC and the WinCC OPC Servers (DA and HDA)
7.1
General
The OPC DA and OPC HDA interfaces are open interfaces defined by the OPC Foundation
(www.opcfoundation.org).
OPC servers provide access to process data for OPC clients. Actual values can be read or written
via the OPC DA (Data Access) server. OPC HDA (Historical Data Access) servers enable access
to historical process values as to process archive values.
OPC Clients make use of an OPC DA/HDA OPC Server services to read and write process data.
The Siemens OPC+ Interface is an OPC client, optimised to access the WinCC DA und HDA
OPC Server. WinCC itself is a core module of a SIMATIC PCS7 Server. The SIMATIC PCS7
server may be configured redundant. This means the server software is installed on two PCs and
is active on both PCs at the same time. SIMATIC PCS7 clients interact to such a redundant pair
using PCS7 internal mechanisms. The WinCC OPC servers on the other hand act as two stand
alone OPC servers providing identical data content. The Siemens OPC+ Interface is designed to
access such a redundant server pair. For further information on the functionality of the redundant
access refer to chapter 5.2 Connecting to redundant PCS7 OS (redundant OPC server).
7.2
Same operating system login and password, member of the group administrators
Same Workgroup
Furthermore we suggest expanding the DCOM access rights on the interface PC and the PCS7
Server PCs as follows:
Start with
StartRundcomcnfg
the DCOM configuration. Quit eventually occurring messages. Select the folder Default Security
of the DCOM configuration. You will find three buttons to adjust the Default Access Permissions,
Default Launch Permissions and Default configuration Permissions. Make sure for all 3 points
the users System, Interactive and the group Administrators to have the maximum rights. For
example here the dialog for the Default Access Permissions:
Page 40 of 47
For further possibilities in configuration please refer to the OPC Foundation, the PCS7
documentation und die Help function of the Operating System.
7.3
<prefix>:<archive name>\
The archive names may be seen directly in the WinCC Explorers Tag Logging. The process
variable name corresponding to the archive variable may also be found here.
For this example the entries in the file SiOPC_IF.ini would be:
Archive_1
Archive_2
=
=
local::Prozesswertarchiv\
local::Prozesswertarchiv2\
Page 41 of 47
To determine the prefix and the check the archive access we recommend to use the tool
opc_archive.exe delivered with the interface. It is recommend to operate the tool directly on
the OS Server. The EXE file may simply be copied and started fort his purpose.
Launch this program and follow the instructions on the display.
Programm zur Bestimmung der vorhandenen Archive bzw. Tags!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!
!!!!!
!!!!! Application require PCS7 Server performance !!!!!
!!!!!
Do not use in critical situations.
!!!!!
!!!!!
!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Host des OPC-Servers eingeben!
Bitte '1' eingeben fuer "localhost"
>>1
ProgID des OPC-Servers eingeben!
Bitte '1' eingeben fuer "OPCServerHDA.WinCC"
>>1
Waehle maximale Anzahl die ausgelesen werden soll (empfohlen <= 100)!
Zahl eingeben (2 .. 10000)
>>20
Running the program the file WinCCArchive.log is created containing the requested archive
variables including the complete path. Output should look like follows:
Info[4] <2004.10.1 17:9:2> {A} 0 :
Info[4] <2004.10.1 17:9:2> {A} 1 :
Info[4] <2004.10.1 17:9:2> {A} 2 :
Info[4] <2004.10.1 17:9:2> {A} 3 :
Info[4] <2004.10.1 17:9:2> {A} 4 :
*
*
local::Prozesswertarchiv\@RM_MASTER
local::Prozesswertarchiv\F1
local::Prozesswertarchiv\I1
local::Prozesswertarchiv\read_DB3_1
local::Prozesswertarchiv\read_DB3_2
7.4
Page 42 of 47
[APIBUFFER]
BUFFERING=1
This activates PI API Node Buffering.
In older versions the additional input of MAXFILESIZE=2000000 is needed in order to set the
size of the data file to maximal 2GB.
The account of the PI API Node Buffering Service should be checked in the Windows service
manager and adjusted. Please take care, that the service is set to automatic. Current versions
request a user account, which is the same as the Windows account the user is logged in. Please
refer to the OSISoft documentation for details of your version.
We recommend addressing the PI Server via name resolution (hosts table or DNS).
For correct function of the API buffer server it is necessary that both interface and buffer server
use the same name for the PI Server und no mixing of name resolution and direct addressing
(TCP-IP address) is used.
By using an high available PI Server (HA-PI) please refer to the hints in chapter 8.4 Running the
Interface against a high available PI Server (HA-PI).
8.2
Page 43 of 47
REMARK!!!: If the Interface is desired to run as PI User piadmin, the piconfig commands listed
above are not necessary. For the Proxy Account / PI Trust Entry piadmin has to
be entered instead of siemens.
For additional information to the commands and functioning of PIConfig refer to the manual PI
Data Archive of OSI Software. You may use PI SMT3 to create groups and users as well.
8.3
Page 44 of 47
The access rights of all PI Points belonging to the interface should be configured as follows (these
are minimal access rights):
Interface uses the PI User piadmin:
Security settings since PI Server version 3.4.380: piadmin: A(r,w) | piadmins: A(r)
Example for older PI versions:
8.4
PtAccess
PtGroup
PtOwner
o:rw g: w:
Piadmins
Piadmin
piadmins
piadmin
PI-Server:
PI-Buffer Subsystem:
PI-SDK:
PI API:
V3.4.380.36
V3.4.375.84a
V 1.3.8.387
V 1.6.1.15
Page 45 of 47
Primary
PI Server
Secondary
PI Server
PI Interface
PC
PIbufss
PI-SDK/API
PI-Connect OPC +
Interface
The settings in the ini files of the PI-API (Pilogin.ini, Piclient.ini) and of the SDK must be in
accordance to the OSI manuals of the PI-HA Server, the PI Buffer Subsystem and the interface
installation manual. It is recommended to use PI ICU to create the settings. Differing settings may
cause malfunction in data transmission.
Pre-processing of the data in the PI Buffer Subsystem (Exception and Compression are done on
the interface PC) and replication of the data to multiple servers may lead to higher load on the
interface PC. This should be taken in account by choosing the interface PC.
Also take care of the fact that in case of connection loss to the Primary Server the interface
(comparable to all OSIsoft Interfaces) does not recognize point updates and write tags (Data
transfer from PI to the OPC Server) do not receive any values. After connection return the tag
configuration is automatically checked and updated, the write connection returns to normal
operation and point updates are recognized again.
Not supported configurations:
Replication of data using the elder PI Buffer Server service (PI-Bufserv) of the PI API to multiple
autonomous PI Servers or a Collective is not tested and not supported.
The redundant version of the Interfaces is not released for operation with a PI Collective or to
multiple autonomous PI Servers.
Page 46 of 47
9. Revision History
Date
Author
IF-Docu OPC+ IF
Hetterich V1.3.1
V 3.6.7
Aug,10th 2010
Hetterich V1.3.2
V3.7.1
V3.7.4
Hetterich V1.3.4
V3.7.4
Lutter
V1.3.5
V3.7.6
Hetterich V1.3.6
V3.7.8
V3.7.8
Location5 value -1
Sep.2nd 2011
V3.7.8
Hetterich V1.3.8
Remarks
V3.7
V3.7.10
General revision
V3.7a
V3.7.10
General revision
V3.7b
V3.7.10
paging
V3.7c
V3.7.10
General revision
Lutter
V3.8
V3.8.0
th
Lutter
V3.8a
V3.8.5
Aug, 4 2014
Page 47 of 47