PCW-DSF Opc
PCW-DSF Opc
LACROIX Sofrel
2, rue du Plessis
35 770 VERN SUR SEICHE
Telephone: 02 . 99 . 04 . 89 . 00 Fax: 02 . 99 . 04 89 . 01
Reference........ : PCW-DSF_OPCV232-ag.doc
Version ........... : V 2.34
Date ................ : 18 June 2007
Classification.... : Public
Approved by........ : MB
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 3
LIST OF UPDATES
First version : 1.10 Date: 09 / 07 / 98
Previous version : 2.33 Date: 26 / 10 / 05
DESCRIPTION OF MODIFICATIONS
V 1.11 :
24/9/99 GR References Added reference [1] and renumbered
1.1 Added reference [1]
2.3.2.1 New paragraph
2.3.2.2 New paragraph
2.3.2.3 New paragraph
V 1.12 :
22/10/99 LL 2.3.2.1 Modified description of the ACK item
GR 2.3.2.1 Added explanation on HOLDCOMM and STOPCOMM
Added SENDING item and modified description of
ACQUISITION
V2.10
05/05/00 LL Document entirely overhauled document
V2.11
14/11/00 LL 2.2 Added trace levels; TraceLev in [Global] section
2.4, 2.5 et 2.8.1 Description of HISTRATE item
2.7 Added BASERATE parameter
2.8.3 Details on UPDATE item
2.8.3.3 Description of SECTION3 corrected
V2.12
09/03/01 LL 2.4 Description of functioning of HSTARTNOTIFY for handling initial
history values.
2.5 Description of functioning of HISTPOLL for handling stamp-
dated value searches.
V2.13
11/12/03 LL 2.5 Description of the functioning of history polling from V2.0.23.
V2.30
02/03/04 PL 2.8, 2.3 Added groups of stations from server version 2.0.30.
V2.32
7/04/05 LH 2.2 Addition of a level of traces operator to replace the traces meter
of reference from server version 2.0.32.
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 4
V2.33
SG Change of document number to match server version.
V2.34
24/04/07 LH / SF 3.2.1 Addition of the AlwaysNotify key
2.8 New pagination
Deletion of the paragraph covering OCCibleNotification
2.3
mechanism implementation
2 Addition of a general architecture diagram
2.5 Archive management: the archive viewing summary/history
alternation no longer exists. Each item is dealt with according to
type (history or summary).
Addition of the description of the new viewing mode
implemented from this version 2.0.34.
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 5
REFERENCES
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 6
CONTENTS
1. INTRODUCTION 7
1.1 Purpose 7
1.2 Reference documents 7
1.3 Terminology and abbreviations 7
1.3.1 Terminology 7
1.3.2 Abbreviations 7
2. DESCRIPTION OF FUNCTIONALITIES 8
2.1 Starting PCWin 8
2.2 Trace management 8
2.3 Browser management 10
2.4 Managing time-stamped values 10
2.5 Managing archives 11
2.6 Multiple client management 12
2.7 Asynchronous communications management 13
2.8 OPC items 13
2.8.1 SYSTEM Variable 14
2.8.2 Station parameters 16
2.8.3 Station variables 17
2.8.4 Station group parameters 22
3. OPERATING CONDITIONS 23
3.1 Operating environment 23
3.2 Configuration file 23
3.2.1 Main configuration file 23
3.2.2 Station configuration files 25
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 7
1. INTRODUCTION
1.1 Purpose
This document presents OPC server implementation specifications based on
SOFREL’s PCWin software. The server implements the functionalities of the OPC
2.0 standard.
1.3.2 Abbreviations
Not applicable.
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 8
2. DESCRIPTION OF FUNCTIONALITIES
The functionalities available in the SofrelOPCServer server allow standardized access to the
data in Sofrel supervisory control stations and the PCWin software package. Data access is
based on COM/OLE technology and occurs via OPC 2.0 interfaces. Optional interfaces are
only implemented if they can be of any use in a server running PCWin.
The SofrelOPCServer server is available in two versions, which are functionally identical with
regard to the OPC 2.0 standard. The first version is an in-process server (implemented
though a dynamic library), and the second version is a local or remote server (implemented
in an executable).
Sofrel
PCWin OPC OPC OPC
Server Client
Index of bit in Trace Prefix used for this Active trace category
level level category
0 1 IN/OUT Input/output trace for functions
8 to 31 NO TRACE Reserved
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 9
The prefix is a character string placed prefixing the trace message proper
identifying the category the message trace.
The trace level is a global operating parameter of the SofrelOPCServer, which is
defined even when no clients are connected and identified. It can be modified
statically with the aid of the “TraceLev” key in the [Global] section of the server
configuration file called “SofrelOPCServer.ini ”, which resides in the “OPC” subfolder
of the PCWin installation folder. Any such modifications only take effect when the
SofrelOPCServer is restarted. This parameter can also be modified dynamically with
the aid of OPC component “SYSTEM/TRACELEV”. This type of modification takes
effect immediately and is stored in the server configuration file. The default value of
trace levels is 0, which corresponds to no trace.
These traces are sent by default to an instance of the XS_CSuiviApp.exe PCWin
application. The OPC server automatically starts this program when a trace is
requested. It automatically stops XS_CSuiviApp.exe when it ends, which causes the
monitoring window to close.
The user can however close this monitoring window at any time, in which case the
traces are sent to the debugger controlling execution of the SofrelOPCServer via the
OutputDebugString function (if the debugger is running). The monitoring window can
be reopened by modifying the server’s trace level.
Trace level changes in an existing monitoring window reuse the same window.
However, only traces of the new level are sent to the window when levels change.
Trace messages are formatted as follows:
Client: date time function[line]: (SUCC|ERR)[result]{ : message}
Optional message components are surrounded by square brackets. The
expressions in brackets are syntax groups. The ‘|’ operator indicates a choice
between two possible expressions.
The date format is DD-MM-YYYY and the time format is HH :MM :SS.SSS.
Function names are explicit and take into account the complete name space in
which the function is defined (class or namespace name). The result is returned
either with the “SUCC” keyword if the operation was successful or with the “ERR”
keyword. The full error message is surrounded by curly braces after the result. If the
error has no description, its full error code is returned in hexadecimal format. The
“message” part is optional and only appears for certain trace messages. It is used
more particularly for messages of the CALLS category to indicate the list of
parameters and the function’s return value.
Activity traces of various different clients are differentiated by prefixing them with the
client name whenever possible. The name is supplied by the client when it calls
IOPCCommon::SetClientName, or a name automatically generated by the server
using the ID the client supplies in “SYSTEM/CLIENTID”. However, for the execution
of internal server functions (timer recall and PCWin functions), for which there is no
client as such, the name cannot be that of a client. Internal operation traces are
therefore identified as “SofrelOPCServer”.
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 10
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 11
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 12
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 13
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 14
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 15
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 16
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 17
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 18
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 19
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 20
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 21
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 22
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 23
3. OPERATING CONDITIONS
[Reprise]
HistMix = 0
HistPer = 5
HistInt = 7
HistRate = 0
ComImm = 0
[Global]
BaseRate = 100
StartDelay = 10
MaxIOPending = 0
TraceLev = 0
AlwaysNotify = 0
Lot=100
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 24
The [Reprise] section contains the “HistMix”, “HistPer”, “HistInt”, “HistRate” and
“ComImm” keys.
“HistMix” key is a DWORD-type key taking values 0 or 1. When set to 1, it transits time-
stamped values for a datapoint to OPC VALUE items instead of transmitting them to HVALUE
items.
“HistPer” key is a DWORD-type key containing PCWin archive polling times in minutes for
histories and reports. Its default value is 5 minutes. the value 0 is prohibited and cannot be
used.
“HistInt” key is a DWORD-type key containing the number of days to subtract from the current
date to determine the first polling date when the server is first started. Its default value is 7 days.
“HistRate” key is a DWORD-type key containing the timeout in milliseconds between two
notifications for the history and report values of a given item. Its default value is 0,
corresponding to combined retrieval of all histories in a single notification (burst mode).
“ComImm” key is a DWORD-type key that can be set to 0 or 1. Setting it to 1 forces PCWin to
communicate with the stations immediately. Its default value is 0, which allows PCWin to defer
communications with the stations and to group and process queries in sets.
NB: all these keys can be dynamically modified using the OPC server’s “system”
item. Such modifications take effect immediately and the new values are
saved in the SofrelOPCServer.ini configuration file.
The [Global] section contains the “BaseRate”, “StartDelay”, “MaxIOPending”,
“TraceLev” and “AlwaysNotify” keys.
“BaseRate” key is a DWORD-type key. It expresses the base rate in seconds for the timer used
to execute asynchronous operations and transmit histories. Its default value is 100 milliseconds.
“StartDelay” key indicates the amount of time allowed for clients to identify themselves by
means of the item OPC “SYSTEM/CLIENTID” before the first item notifications occur. It is
expressed in seconds, its default value being ten.
“MaxIOPending” sets the maximum number of operations pending execution for each type of
asynchronous operation. Its default value is 0, which means there is no limit to the number of
pending operations.
“TraceLev” key is a DWORD-type key containing the trace levels used by the OPC server. Its
default trace level value is 0, meaning no trace. This value can be dynamically modified with the
aid of the “SYSTEM/TRACELEV” item.
"AlwaysNotify" key is a BOOLEAN key; it determines the server’s behavior when optimizing
the number of notifications for a VALUE item change. When this key is 0 (default value), the
server makes a single notification for several simultaneous operations (subscription,
synchronous or asynchronous read, refresh). When this key is 1, the server performs a
notification for each operation.
Optional "Lot" key is a DWORD key; it determines the number of items to process in a set when
consulting the archiving server. Its default value is 100.
NB: none of these keys (with the exception of “TraceLev”) can be dynamically
modified by an OPC server item.
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.
SOFREL PCWin - OPC Server - Function Specifications File - V 2.34
11 July 2007 25
This document is the property of LACROIX Sofrel and may not be disclosed to any third part without its written permission.