Avocet Web Services API
Avocet Web Services API
Contents
Avocet 2017.2..................................................................................................................5
Avocet Production Data Management System Installation Guide.............................7
Avocet installation preliminaries and references...........................................................................................7
Supported operating systems, servers, and databases for Avocet desktop ................................................8
Avocet 2017.2 components........................................................................................................................11
Avocet 2017.2 installation packages...........................................................................................................12
Avocet 2017.2 licensing..............................................................................................................................13
Common prerequisites for Avocet desktop.................................................................................................13
Avocet Installer utility..................................................................................................................................15
Upgrade prerequisites.................................................................................................................................16
Files to download........................................................................................................................................16
Before launching the Avocet Installer..........................................................................................................17
Launch the Avocet Installer.........................................................................................................................18
Install the licensing software.......................................................................................................................21
Install Avocet...............................................................................................................................................24
Microsoft ClickOnce....................................................................................................................................36
Install the AppServer..................................................................................................................................49
Install Petrel Studio Plug-in 2015................................................................................................................49
Install OFM Plug-in 2014.1, 2016.1, or both...............................................................................................50
Troubleshooting installation issues.............................................................................................................50
Post-installation considerations..................................................................................................................51
Production day start....................................................................................................................................51
Specify a timeout interval for the Avocet client...........................................................................................52
Define links to custom screen-level help files.............................................................................................53
Enable custom screen-level help on an existing database implementation................................................54
High frequency infrastructure: installation and configuration.................................56
HFI manager and the AvocetHFSync service.............................................................................................56
HFI manager prerequisites.........................................................................................................................57
HFI manager and high frequency data flow................................................................................................57
Introduction to Apis interfaces and configuration properties.......................................................................62
Suggested workflow for installing Avocet HF store and HFI Manager .......................................................63
How to implement a corporate historian in a high frequency setting..........................................................75
How to set up your OPC UA data sources for high frequency implementations ........................................88
Run script to grant non-administrative or standard user rights to Avocet HF store and HFI manager........93
Multiple HFI manager and Avocet HF store instances................................................................................94
Multiple Avocet HF store and corporate historian instances.......................................................................96
Apis backup and restore command line options.......................................................................................101
Appendix 1: Manual steps to apply security settings to your corporate historian.....................................105
Appendix 2: Manual steps to grant non-administrative or standard user rights to Avocet HF store and HFI manager
..................................................................................................................................................................106
Appendix 3: Install and uninstall Apis components (manual procedure)...................................................114
Appendix 4: Security guidelines and technologies....................................................................................116
Appendix 5: Install and launch the HF Player...........................................................................................135
Appendix 6: Troubleshooting.....................................................................................................................139
Working with data flow configuration and alarms...................................................143
How to work with the Data Flow screen ...................................................................................................143
Real-time and historical data in the Avocet context..................................................................................144
Configuration of data flow.........................................................................................................................144
Before you begin ......................................................................................................................................144
Access the Data Flow screen...................................................................................................................145
Data Flow screen compared with Tag Mapping screen............................................................................145
Map historian tags to Avocet items ..........................................................................................................146
Check connectivity to the Avocet HF Store and corporate historian.........................................................147
Set up the Avocet item for data flow configuration....................................................................................147
How to map tags manually........................................................................................................................150
Specify transaction and property in the Avocet database and populate HF Store tags............................150
Map corporate historian tags with Avocet item and transaction properties..............................................151
Display additional data fields....................................................................................................................153
iii
Share configuration files between AvocetVM and AvocetWebService projects........................................211
Edit the Web.config file and verify the license file path.............................................................................212
Enable pass-through authentication ........................................................................................................213
Encrypt database connection strings........................................................................................................214
Encrypt passwords in regular connection strings.....................................................................................216
Set up IIS 8.0 or 8.5 on Windows Server 2012 R2 (manual steps)..........................................................217
Internet Information Services roles and features......................................................................................218
Install IIS 8.0 or 8.5 on Windows Server 2012 R2....................................................................................218
Test the IIS HTTP connection on Windows 2012 R2 Server....................................................................223
Configure HTTP response headers..........................................................................................................224
Enable HTTPS..........................................................................................................................................225
Enable the .NET 4.5 application pool........................................................................................................229
Add the web services application under the default website ...................................................................231
Browse the web service node to launch the Swagger UI..........................................................................232
Add the WebApiServer tag to your AppConfig_ProjectLayer file..............................................................234
Restart IIS after a configuration change in the Avocet web service configuration....................................235
Apply security constraints to user roles and HTTP request methods.......................................................235
Notifications..............................................................................................................................................237
Edit the HFIManager.exe.config file and verify plug-in..............................................................................237
Mail settings, recipients, and groups.........................................................................................................238
SignalR scale out configurations...............................................................................................................242
Avocet web services controllers and operations.......................................................................................244
HTTP request methods and status codes................................................................................................245
Log into the application ID........................................................................................................................245
5
Schlumberger, the Schlumberger logotype, and other words or symbols used to identify the products
and services described herein are either trademarks, trade names or service marks of Schlumberger
and its licensors, or are the property of their respective owners. These marks may not be copied,
imitated or used, in whole or in part, without the express prior written permission of Schlumberger. In
addition, covers, page headers, custom graphics, icons, and other design elements may be service
marks, trademarks, and/or trade dress of Schlumberger, and may not be copied, imitated, or used, in
whole or in part, without the express prior written permission of Schlumberger. Other company, product,
and service names are the properties of their respective owners.
® ® ® ®
Avocet , Studio , PIPESIM , and OFM are marks of Schlumberger.
An asterisk (*) is used throughout this online help to designate other marks of Schlumberger.
Security Notice
The software described herein is configured to operate with at least the minimum specifications set
out by Schlumberger.You are advised that such minimum specifications are merely recommendations
and not intended to be limiting to configurations that may be used to operate the software. Similarly,
you are advised that the software should be operated in a secure environment whether such software
is operated across a network, on a single system and/or on a plurality of systems. It is up to you to
configure and maintain your networks and/or system(s) in a secure manner. If you have further questions
as to recommendations regarding recommended specifications or security, please feel free to contact
your local Schlumberger representative.
Product Information
Country of Origin: United States of America
Note: To start installing Avocet components immediately, without reviewing preliminaries and
prerequisites, skip to the Avocet Installer utility section.
To complete the setup and configuration of some of the components, refer to the following Help topics
and documents:
Installation Reference Provides guidelines for MS SQL server and Oracle database setup
Application Servers and Process Groups Contains configuration steps for setting up Internet Information Services server
to support the Avocet web services API and the application server
Avocet Integration: Studio Contains installation and configuration information for the Petrel Studio Plug-in
2015
7
Help topic Description
Avocet Integration: Oilfield Manager Projects Contains installation and configuration information for the OFM Plug-in 2014.1
and 2016.1
High Frequency Infrastructure Manager Describes how to configure and deploy the Avocet HF Store and HFI manager
Installation and Configuration in an OPC UA high frequency implementation
The Avocet Installer does not deploy the Avocet web services independently
Avocet Web Services
as its own package because the web services package is designed mainly for
developers. Refer to the Avocet Web Services documentation for configuration
details.
Supported Client OS
Supported Server OS
The Enterprise editions of the database servers support features such as database partitioning and
compression. The Standard editions do not support these features though they do support all Avocet
functionality. When sizing your database, if the Enterprise features are not required, you can use the
Standard edition.
Note: While the Enterprise edition of MS SQL Server 2012 SP2 has not been formally certified,
it is used in test and production deployments.
As a rule of thumb, you should also use the most recent release of the database server.
The following SQL database engine has been tested for disconnected desktops:
• SQLite v.3.7.17
SQLite is specifically aimed at local installations on disconnected field laptops having single users. Its
requirements are minimal.
The following IIS versions are supported for the web services API:
• IIS 8.0 or 8.5 on Windows server 2012 R2
Operating System Microsoft Windows 7 SP1 64-bit Microsoft Windows 7 SP1 64-bit
Client software Microsoft .NET 4.6.1 Runtime, Microsoft Internet Explorer 8 or later
Microsoft Office 2003 or higher required for integration for Office applications
Database connectivity Required for client machines connecting directly to the database (client/server mode).
SQL Server client software is included with Microsoft Vista or later. SQL Server client software
matching the database server version is recommended.
Oracle Instant Client software is included with the application. Oracle client software deployed
on machines is also supported.
Note: The requirements and recommendations described herein are guidelines. They may vary
depending on your specific deployment requirements.
Database server specifications will change based on anticipated data requirements and user load.
Specifications here indicate typical configurations. At a minimum, data and indexes should be separated
on two physical disks with their own disk controllers.
The database server can be deployed using vendor-specific high availability solutions for redundancy
and disaster recovery. Proper back-up procedures should be used to provide protection against failures
based on standard IT procedures.
Note: Beginning with Windows Server version 2008 R2, all Windows Server versions are
released in 64-bit only.
Processor 2 Intel Dual x64 Server class 4 Intel Dual x64 Server class CPUs or better
CPUs or better
9
Requirement Recommended Size Recommended Size
Hard Disk Space 2 x 500 GB or greater The database sizing varies by client.
Database software Recommended: Microsoft SQL Server 2012 SP2 Standard Edition or Oracle 12.1.0.2
(Oracle 12c) Enterprise Edition
Following your Oracle or MS SQL Server guidelines, you can install and run the database on any
compatible database server.
Operating System Microsoft Windows Server Microsoft Windows Server 2012 R2 x64
2012 R2 x64
Processor Intel Core, AMD Opteron, or 2 Intel Dual x64 Server class CPUs or better
equivalent
Server software Microsoft .NET 4.6.1 Runtime, Microsoft Internet Explorer 8 or later
Microsoft Office 2003 or higher required for integration for Office applications
Database connectivity Required for client machines connecting directly to the database (client/server mode).
SQL Server client software is included with Microsoft Vista or later. SQL Server client software
matching the database server version is recommended.
Oracle Instant Client software is included with the application. Oracle client software deployed
on machines is also supported.
Operating System Microsoft Windows Server 2012 R2 64-bit Microsoft Windows Server 2012 R2 64-bit
Processor Intel Dual, Quad, or 8-Way Server class Intel Dual, Quad, or 8-Way Server class CPU’s
CPUs or better or better
Server software Microsoft .NET 4.6.1 Runtime, Microsoft Internet Explorer 8 or later
Microsoft Office 2003 or higher required for integration for Office applications
Database connectivity Required for client machines connecting directly to the database (client/server mode).
SQL Server client software is included with Microsoft Windows Vista or later. SQL Server
client software matching the database server version is recommended.
Oracle Instant Client software is included with the application. Oracle client software deployed
on machines is also supported.
Component Description
Avocet desktop client The main client GUI where you perform your production management tasks
Configuration Tool Utility that allows administrators to initialize databases, modify the type system, set up units
of measure, and perform a range of administrative tasks
11
Component Description
Database Configuration Tool Utility that allows administrators to create and initialize fresh database instances and upgrade
existing database with the latest data type definitions
APIS Foundation The Advanced Plant Information System (APIS) is a data collection system consisting of a
database (HoneyStore) and data historian server (ApisHive). The ApisHive structure is the
basis of the Avocet HF Store, a local historian in the Avocet high-frequency implementation.
You must install and configure APIS Foundation to enable the OPC UA high-frequency
implementation. See the Help topic High Frequency Infrastructure Manager Installation and
Configuration.
HFI Manager The high frequency infrastructure (HFI) manager supports the automatic synchronization of
high frequency data. It actively monitors updates to the Avocet database and then automatically
updates the related tags in the Avocet HF store. See the Help topic High Frequency
Infrastructure Manager Installation and Configuration.
AvocetWebService The web services API is addressed to developers to customize and extend their own web
services applications. It does not have its own installation routine. See the Avocet Web
Services documentation in the AvocetVM\Documentation folder.
Note: The Avocet web services API is required for the Avocet application server
deployment and is installed with the application server.
ClickOnce Deployment package that enables an Avocet server to publish files to multiple Avocet clients,
providing for the installation and updating of Avocet clients through a web connection
Application server A server that is especially designed to handle the execution of Avocet processes, such as
allocations and data loading. It requires the Avocet web services API and an Internet
Information Services (IIS) server.
Redistributables Avocet includes several redistributables, such as Microsoft Visual C++ Redistributable for
Visual Studio 2015, .NET Framework 4.5.2, Visual C++ Runtime, Report Viewer, and others.
Plugins Studio and OFM plugins are available for connecting Avocet with Studio and OFM
Avocet_2017.2_InstallationUtility.zip A Windows PowerShell utility from which you can install Avocet
prerequisites and components, including the ClickOnce
deployment package and Studio and OFM plug-ins
13
To execute some of the configuration and verification commands, you should have the administrator
privilege or be able to run tasks as the administrator.
You can either refer to the corresponding Microsoft websites for downloading and verifying the
installation of the components or run the Avocet Installer utility.
1. Right-click the Windows PowerShell shortcut to display the flyout menu, and choose Properties.
2. In the Shortcut tab of the Windows PowerShell Properties dialog, choose Advanced… .
15
Note: The Avocet web services API is installed as part of the application server installation. It
does not have its own installation routine. You must manually deploy the web services API if
you want to use it to extend or customize web applications other than the application server.
Upgrade prerequisites
This procedure provides guidelines for what you must do if you have an existing implementation that
you are upgrading.
If you have an OPC UA implementation that uses the ApisHive instance of an Avocet HF store, you
can use the Avocet Installer to upgrade to the latest Apis Foundation version. The upgrade script
leaves intact all settings, modules, and items of your Avocet HF store configuration.
Before upgrading any aspect of Avocet, do the following:
Files to download
This task lists which files to download and then shows how to download them from the Schlumberger
Integrated Solutions (SIS) Software Download Center.
From the Schlumberger Integrated Solutions (SIS) Software Download Center (SIS Software Download
Center), download the following zipped files:
• Avocet_2017.2_Full_Release.zip
This contains the Avocet content folders AvocetVM, AvocetWebService, and AppServer.
• Avocet_2017.2_InstallationUtility.zip
This contains the Avocet Installer components, including prerequisites and utilities.
• Avocet_2017.2_Prerequisites.zip
A convenience package, this zipped file contains the Avocet prerequisites, also contained in the
Avocet_2017.2_InstallationUtility.zip file. You can copy this package to multiple machines to lay
down the Avocet prerequisites.
1. Extract the contents of the zipped Installer package to the temporary folder.
The file contents, which are contained in a single Installer folder, are displayed below:.
2. Copy the Avocet content folders you extracted from the Avocet_2017.2_Full_Release.zip file to
the Avocet subfolder that resides within the Installer folder.
The Installer\Avocet subfolder should display the contents as shown in the following screenshot:
17
3. Paste your customized Avocet files to their respective subfolders in the Installer folder.
4. Optional. After you copy the Avocet content folders to the Avocet subfolder, you can copy and
move the Installer folder to different supported systems to install different components.
The following diagram outlines how the Avocet Installer deploys the Avocet content folders to a
specified deployment folder:
19
Option Description Additional configuration
Avocet the AvocetVM folder and contents The Installer checks for and prompts you to install
any missing prerequisites, including
• Microsoft .NET Framework 4.6.1 or later
• Microsoft Visual C++ Redistributable for Visual
Studio 2015
• Microsoft ReportViewer 2010 Redistributable
• Microsoft ReportViewer 2012 Redistributable
• Microsoft Visual C++ 2008 Runtime Libraries (x64)
• Microsoft Visual C++ 2008 Runtime Libraries (x86)
• Microsoft Visual C++ 2010 Runtime Libraries (x64)
• Microsoft Visual C++ 2010 Runtime Libraries (x86)
• Microsoft Visual C++ 2012 Runtime Libraries (x64)
• Microsoft Visual C++ 2012 Runtime Libraries (x86)
• Microsoft Access Database Engine Redistributable
2010
ClickOnce for the ClickOnce deployment package Setup instructions are described herein.
AvocetClient
Avocet the Avocet application server, including the The Avocet application server requires Windows
AppServer scheduler process.The application server manages server 2012 R2. After installing the application server,
resource-intensive processes such as data loading, refer to the Help topic Application servers and process
allocations, and so forth. These processes can be groups for setup and configuration instructions.
served on separate systems, apart from the system
where the Avocet client resides.
Avocet HF Store The Avocet HF store is a proxy for the ApisHive, an If you have an existing Apis installation, the Avocet
OPC UA server that reads tag data from an OPC Installer upgrades your existing instance while
UA corporate historian. The Avocet HF store is maintaining your settings, modules, and items. It is
required for high frequency data collection. By recommended that you set the license path for the
default, the Avocet Installer creates an APIS install Avocet HF Store at the prompt, before you install it.
directory with its subfolders in the C:\Program Files The Avocet HF store instance or instances must be
path. It ignores the value specified in the paired with the Avocet HFI manager on the same
Deployment location field. system. Refer to the Help topic High Frequency
Infrastructure Manager Installation and Configuration.
Avocet HFI The High Frequency Infrastructure (HFI) manager The Avocet HF store instance requires the Avocet
manager is a new feature that supports the high frequency HFI Manager to be installed on the same system.
implementation. It polls the Avocet database for Refer to the Help topic High Frequency Infrastructure
changes related to high frequency data and Manager Installation and Configuration.
automatically synchronizes the update with the
Avocet HF store.
Schlumberger This is the 2017.1 version of the Schlumberger You manually configure the license utility after it is
Licensing Licensing utility. The Installer deploys it in its default installed.
Software location, ignoring the value in the Deployment
location field.
Studio and OFM The Studio plug-in is an integration component that If necessary, you can copy the extracted folder to the
plug-ins lets you load Avocet well bore and completion items target systems. Each plugin utility folder contains an
into Petrel for analysis.The two OFM plug-ins enable MSI installer file. You manually launch the MSI file
the export of forecast data from OFM to Avocet.You to install the plugin. Refer to the Help topics Avocet
can install both OFM plug-ins on the same system Integration: Studio and Avocet Integration: OFM.
if you have the corresponding OFM versions
installed. Each plugin folder is extracted to the path
specified in the Deployment location field.
Deployment the file path for installing the selected options. The
location Installer does not read the Deployment location
value for the Avocet HF Store, Schlumberger
Licensing, and plug-in selections
Safety Critical
statements
21
Installing and configuring your license
To install and configure your license, review the Schlumberger Licensing User Guide that you can
access from the Help menu in the Schlumberger Licensing window.
As an example, to set a remote license server, enter the port number and fully qualified domain name
under Remote License Servers text box. Then click Add license server.
Be sure that your user and system variables are entered correctly. This will depend on the type of
license that you have selected.
As an example, the port number and domain name are entered as both user and system variables in
the Environment Variables dialog under the Advanced tab of your computer’s System Properties
definition.
Schlumberger Licensing can run on your local machine or on a license server. Therefore, use one of
the following workflows:
• To use a local license file, install and set up Schlumberger Licensing on your local machine.
• To use a server license file, install and set up Schlumberger Licensing on your licensing server
machine and on your local machine.
23
1. Choose Start > Programs > Schlumberger > Schlumberger Licensing 2017.1 > Schlumberger
Licensing from your Start menu.
The Schlumberger Licensing window opens.
2. Enter your license server name in the All License Servers section, and then click Add License
Server.
3. Click Apply.
4. Click OK to close the Schlumberger Licensing window.
Install Avocet
This set of tasks shows how to install Avocet from the Installer, launch Avocet for the first time, and
prepare your new or existing database.
1. To deploy the AvocetVM folder to the target directory specified under Deployment location, do the
following:
a) Select Avocet.
b) Verify the deployment location.
c) Select the Terms & Conditions and safety acknowledgement check boxes.
d) Click Install.
Windows Powershell is displayed. You are prompted to install any prerequisites. If the deployment
is successful, you receive a message saying that the setup is finished and specifying the location
of the log file. You are returned to the directory path of the Installer folder.
The Avocet Installer should copy your customized files to their respective folders.
2. Verify that your customized files were successfully deployed to their respective folders.
3. Exit Windows Powershell by typing Exit at the directory prompt.
25
• <layers>
<layer>AVM</layer>
<layer>UnitSystem_Imperial</layer>
<layer>OG_STD</layer>
<layer>HF</layer>
<layer>YourImplementationLayer</layer>
</layers>
You must include an Integrated Security attribute (or Trusted_Connection depending on your data
provider) in your connection string. You can refer to the following table, which is described in this
MSDN web page.
OleDb
Integrated Security=SSPI;
Odbc Trusted_Connection=yes;
When constructing your connection string using Windows authentication, you can omit the user name
and password.
Note: If upgrading from an earlier Avocet version, refer to the Help topic Avocet upgrade
scenarios in the Installation Reference section.
27
Note: If you are upgrading from Avocet 2012.1 or Avocet 2012.1 SP 1, you have to first execute
specified preliminary upgrade scripts before continuing to the formal database upgrade. Refer
to the Help topic "Database upgrade from Avocet 2012.1 or Avocet 2012.1 SP 1" in the Installation
Reference section for more information.
Note: This list may differ from the default list depending how long it has been since your last
upgrade.
4. Review the selected scripts and de-select the ones you do not want to submit for upgrading in the
current session.
29
5. In the ribbon toolbar, click Home > Upgrade to apply the scripts to your database and initialize the
selected ones.
The upgrade status of each script is displayed in the right-hand side panel. For example, a successful
upgrade is noted with a green checkmark as in the following example:
When a selected script fails the upgrade, it is noted with an X mark against a red background, as
shown in this example taken from a different upgrade session:
You can click on the X to view the accompanying error message. An example error message is
shown below:
You can export these errors to an Excel spreadsheet by clicking the Export Errors to Excel button
at the bottom of the panel.
To summarize, scripts that are included in an upgrade session can have a status of
• success
• failed
• not run
1. In the Upgrade Manager, select an application Id (database) from the database drop-down list.
2. Click Home > Show Applied Updates in the ribbon toolbar.
The scripts that have been executed against the database or that have been designated Never
Run are listed in the left-hand panel, as shown in this example:
31
Any upgrade or other action does not affect the scripts that have already been applied to the
database.
3. Deselect Show Applied Updates to return to the list of available upgrade scripts.
Never Run
Note: Be careful which script or scripts you designate as Never Run because they are removed
from the list of available upgrade scripts for the application ID.
1. In the list of scripts to upgrade, select the script you do not want to execute against the application
ID.
2. In the ribbon toolbar, choose Home > Never Run.
The script designated Never Run is removed from the list of scripts to upgrade for the specific
application ID and database. When you select Home > Show Applied Updates, the Never Run
script is displayed at the bottom of the list of scripts that have been applied to the database.
3. For future reference, note the script or scripts that you have designated as Never Run.
4. If in a later upgrade session you decide to run the upgrade script, do the following:
a) Choose Home > Show Applied Updates, and scroll to the upgrade script you designated as
Never Run.
b) Select the script, and click Home > Upgrade.
The script is executed against the database. In the status list on the right-hand panel, scroll to the
bottom of the list to verify that the script upgrade was successful.
Some script upgrades can fail because of errors similar to the following:
• Column names in each table must be unique. Column name 'CHAR11' in table 'ITEM_EVENT_EXT'
is specified more than once.
• Column names in each table must be unique. Column name 'VAL61' in table 'ITEM_EVENT_EXT'
is specified more than once.
If the types of errors listed above appear during the upgrade process, it means that the columns already
exist in the specified table.You can contact the Schlumberger deployment team to address any issues.
Initialize the existing database with the latest definitions from the type system
This task shows how to initialize your existing database with the latest definitions from the type system.
33
2. Log into your application ID.
3. Access the Database Initializer screen (Database Tools > Database Initializer).
4. Verify that the layers you want to initialize are marked for import.
After initializing your database with the latest type definitions, you should
• remove references to deprecated features
• generate replication triggers if you haven't done so
Remove references to deprecated features
Upgrade users must delete certain configuration files and remove tags that point to deprecated features.
Effective Avocet 2017.1 onwards, the Avocet UA Server and Visualization Designer have been
deprecated. Consequently, as an upgrade user, you should remove configuration files and settings
that point to these features.
5. Open your vmConfig_ProjectLayer.xml file, remove the following entries, and save the file:
• node type definition for TreeNode.Visualization
• corresponding screen configuration ID
Slb.Avocet.OPCUA.Client.Screens.VisualizationWellOverview
1. Open the Avocet Configuration Tools utility (ConfigTools.exe), and in the Navigation Tree, access
Replication > Trigger Manager to open the Trigger Manager screen.
2. Check whether the Home > Replication Triggers > Create Publisher Database option is enabled.
If it is greyed out, go to step 3. Otherwise, click Create Publisher Database.
The publisher database is created.
3. Click Create Replication Triggers to generate the SQL Server replication triggers, as shown in
this screen excerpt:
35
Microsoft ClickOnce
Avocet is a Microsoft Windows Presentation Foundation & Windows Forms application, which you can
publish using ClickOnce technology.
ClickOnce is a deployment technology that allows you to create a self-updating Avocet deployment
that can be installed and run with minimal user interaction.
You can publish a ClickOnce application in two different ways: from a web page or from a network file
share. A ClickOnce application can be installed on an end-user's computer and be run locally even
when the computer is offline, or it can be run in an online-only mode without permanently installing
anything on the end user's computer.
An Avocet ClickOnce deployment is self-updating. It can check for newer versions as they become
available and automatically replace any updated files. The deployment can specify the update behavior.
A network administrator can also control update strategies, for example, marking an update as
mandatory. Updates can also be rolled back to a previous version by the end user or by an administrator.
An Avocet ClickOnce deployment is inherently isolated; therefore, installing or running an Avocet
ClickOnce deployment cannot break existing applications. Avocet is completely self-contained; each
application is installed to and run from a secure per-user, per-application cache.
The ClickOnce deployment package consists of files that support the deployment of a current Avocet
implementation from a shared folder on a server system to multiple client workstations.
1 Using the Avocet Installer utility, install the ClickOnce deployment package, including the AvocetVM content, in a test
folder on a server system.
2 To publish the ClickOnce content from a production environment, create a shared folder either through a network file
share or through an IIS web server with an application folder. Client workstations can access the Avocet content from
the shared folder.
3 Copy the contents of the ClickOnce deployment folder from the test folder to the shared folder in the production
environment.
4 Maintain product and configuration updates in the ClickOnce deployment. Launch the Installer to update the ClickOnce
content in the test folder, and copy the updated content to the shared folder in the production environment.
1. Copy the AvocetVM folder of the Avocet installation package and paste it to the Avocet subfolder
of your Installer directory, as indicated in the following screenshot:
37
You will need to have the URL by which the client workstation connects with the ClickOnce deployment
server.
Note: If you are updating the project file after the initial ClickOnce installation, go to step 8.
Note: Specify the http protocol for the ComponentsUrl tag. Do not enter https here. At the
file share site or IIS web server, you can add the https binding.
1. On your Windows system, access the Start > Administrative Tools > Computer Management
> System Tools node, and double-click the Shared Folders entry.
2. Right-click the Shares folder to display the fly-out menu, and select New Share… .
4. Specify the permissions on the Shared Folder Permissions pane, and click Finish.
The shared folder is created.
5. Right click the newly created share, and choose Properties from the flyout menu.
The Properties tab is displayed.
6. Access the Share Permissions and Security tabs to verify or update permissions, and click OK
when done.
7. Verify your Windows Firewall settings to ensure that they enable the correct levels of access.
8. Copy the contents of the Publish_x nn folder to the specified network share.
Depending on network and security settings, your file share link will be similar to
\\serverName\DisplayName. Remote clients can access the Avocet content to deploy and update
it on their systems.
1. Create the folder to be shared on the appropriate drive. Note its physical path.
2. Go to Start > All Programs > Accessories, and right-click Command Prompt to display the fly-out
menu.
3. Click Run as Administrator to display the Command Prompt window.
4. At the prompt, enter
net share <sharename=drive:path>
where sharename is the network name of the shared folder and drive:path is the absolute physical
path of the shared folder: for example, ClickOnce=C:\AvocetDeployment\ClickOnce\Publish_xNN.
Note: You can type net share ? to display help for the net share syntax.
5. Copy the contents of the Publish_x nn folder to the specified network share.
Depending on network and security settings, your file share link will be similar to
\\serverName\DisplayName. Remote clients can access the Avocet content to deploy and update
it on their systems.
39
Note: For the ClickOnce web server application, you will need to edit the IIS > Request Filtering
rules to ensure all filtering options are enabled.
Note: Do NOT delete or manually modify the web.config file outside the IIS environment.
Otherwise, you have to recreate your settings and customizations within IIS.
1. Launch IIS, and in the connection tree, right-click on the Sites > Default Web Site node of your
server to display the flyout menu.
2. Choose Add Application... .
The Add Application dialog is displayed.
3. In the Add Application dialog, complete the following fields:
Alias Enter the display name of the deployment: for example, ClickOnce.
Application pool To select an application pool other than the default value, click the Select… button to choose
from the Application Pool drop-down list.
Physical path Specify the physical path to include the Publish_x nn subfolder: for example,
C:\rootDirectory\Publish_x nn.
The content view of the ClickOnce application will look similar to the following:
41
5. Enable Windows authentication (IIS > Authentication) and directory browsing (IIS > Directory
Browsing).
6. Double-click IIS > Request Filtering to display the Request Fitlering pane.
7. Under the Actions column, choose Edit Feature Settings... .
The Edit Request Filtering Settings dialog is displayed.
8. Under the General heading, verify that all filtering options are selected, as in the following screenshot:
9. Click OK.
1. Choose IIS > Default Document to display the Default Document panel, and choose Add… from
the Actions column to add avocet.htm as the default launch document.
43
Set the security bindings
For your ClickOnce web server application, you can enable the HTTPS binding.
The ComponentsUrl tag in the COgenV4_x NN.proj project file must be specified with the http protocol.
1. In the IIS connection tree, select the Default Web Site node.
2. Under the Actions column, select Edit Site > Bindings... to open the Site Bindings dialog.
3. Choose Add... to open the Edit Site Binding dialog, and complete the following:
a) Choose https in the Type drop-down list.
b) Leave the IP address as All Unassigned.
c) Specify a port number. You can use the default 443 if it is not is use.
d) Choose the machine certificate as the SSL certificate selection.
e) Click OK to return to the Site Bindings dialog.
f) Click Close.
4. In the connection tree, choose your ClickOnce application folder, and then select IIS > SSL
Settings.
5. In the SSL Settings pane, make sure that the Require SSL check box is deselected.
6. Under the Actions column, choose Manage Application > Advanced Settings... to open the
Advanced Settings dialog.
7. Next to Enabled Protocols, enter http, and click OK.
Client workstations can access the ClickOnce deployment site using either http or https protocol. If
using https protocol, then in the URL string the client must specify the server name as listed in the
machine certificate.
Install the ClickOnce deployment on client workstations
In the production environment of a ClickOnce deployment, client workstations connect to an Avocet
production database through a network share or web server application folder.
The Avocet.htm launch document gives clients the option to install the Avocet runtime prerequisites.
45
2. If this is a first-time installation on the workstation, select the 32-bit or 64-bit installation prerequisite
option, and follow the prompts.
Note: The Install Prerequisites (64-bit) option installs all components, including the 32-bit
runtime files.
During the installation of the runtime libraries, you may be asked to close certain Microsoft
applications. Otherwise a reboot is required. To avoid a reboot, close any open Microsoft
Word, Visual Basic, or Internet Explorer instances.
a) Execute the Run command to start the Avocet Setup for the selected option.
b) For each prerequisite, accept the license agreement, and click Install and follow any prompts.
3. Click the
1. From the Start menu choose the Avocet entry, or from the Desktop choose the Avocet icon.
The application will launch and display the Login dialog.
2. Enter the login credentials and choose other options as required.
1. From the Start menu, select Control Panel > Add/Remove Programs.
2. Right-click Avocet from the list of installed programs, and choose Uninstall.
A prompt dialog is displayed.
3. Select Remove the application from this computer.
4. Click OK to continue uninstalling the program.
By repeating the ClickOnce for AvocetClient installation option, you are creating an updated
Publish_xNN folder. Moving the existing Publish_xNN folder ensures that any outdated files are
removed.
2. Copy the updated content and any custom configuration files to their appropriate locations in the
Avocet folder under the Installer directory, as suggested by this screenshot:
47
5. Under Deployment location, click Browse to locate the deployment folder where your ClickOnce
files reside.
6. Select the check boxes to accept the terms and conditions and the safety acknowledgment.
7. Click Install.
The Windows PowerShell window is launched, and updated Publish_xNN subfolders are created
in the deployment folder.
8. Compare the new Publish_xNN subfolders against the previous ones to note any changes.
9. Review the updated content and custom configuration files under the AvocetVM subfolder to ensure
that no errors exist.
10. After checking for errors, point the network file share or IIS web server application in the production
environment to the updated Avocet ClickOnce deployment package.
The latest updates are available to the ClickOnce clients for download.
Note: ClickOnce clients should also back up custom configuration files before downloading
the latest content.
Client unable to install Avocet from IIS web server application If the Application Install dialog does not launch, then check
folder your web browser's security settings.
Client unable to install Avocet from network share Browse to the sharedFolder \Publish_xnn\AvocetVM folder,
and click the AvocetVM.application manifest file.
Click Install.
Client unable to install prerequisites Verify that the COgenV4_xNN.proj file's ComponentsUrl
and ComponentsLocation attributes are updated.
1. To install the application server to the target directory specified under Deployment location, do the
following:
a) Select AppServer
b) Verify the deployment location.
c) Select the Terms & Conditions and safety acknowledgement check boxes.
d) Click Install.
A prompt is displayed, asking for the port and path to the Schlumberger License server.
2. Specify the port number, host, and file path to the Schlumberger License server.
The default port number is 27000.
Windows Powershell is displayed. You are prompted to install any prerequisites.
3. At the Avocet AppServer Setup prompt, click Yes to attach your domain computer certificate to the
IIS https binding.
If you have third-party or custom certificates, click No. You must manually configure the IIS https
binding with the certificate.
4. Exit Windows Powershell by typing Exit at the directory prompt.
If you have not already done so, define an LDAP user with pass-through authentication.
You must edit the DeploymentFolder\AppServer\Web.config file.
Refer to the Application servers and process groups Help topic for configuration information.
1. To deploy the Petrel Studio Plug-in 2015 to the target directory specified under Deployment location,
do the following:
a) Under Extended options, select Petrel Studio Plug-in 2015.
b) Verify the deployment location.
c) Select the Terms & Conditions and safety acknowledgement check boxes.
49
d) Click Install.
Windows Powershell is displayed. You are prompted to install any prerequisites. If the deployment
is successful, you receive a message saying that the setup is finished and specifying the location
of the log file. You are returned to the directory path of the Installer folder.
2. Refer to the Help topic Avocet Integration: Studio to complete the installation and configuration.
Note: You can install both OFM Plug-in 2014.1 and OFM Plug-in 2016.1 on the same system
running Avocet 2017.2.Your configuration must also have the compatible OFM versions (2014.n
and 2016.1) installed on the same or different systems. As a best practice, both OFM integrations
should connect with the identical Avocet database.
Refer to the Help topic Avocet Integration: Oilfield Manager Projects for a complete list of prerequisites.
1. To deploy the OFM Plug-in 2014.1 or OFM Plug-in 2016.1 to the target directory specified under
Deployment location, do the following:
a) Under Extended options, select OFM Plug-in 2014.1 or OFM Plug-in 2016.1. If installing both
plug-ins, select OFM Plug-in 2014.1 and OFM Plug-in 2016.1.
b) Verify the deployment location.
c) Select the Terms & Conditions and safety acknowledgement check boxes.
d) Click Install.
Windows Powershell is displayed. You are prompted to install any prerequisites. If the deployment
is successful, you receive a message saying that the setup is finished and specifying the location
of the log file. You are returned to the directory path of the Installer folder.
2. Refer to the Help topic Avocet Integration: Oilfield Manager Projects to complete the installation
and configuration.
Post-installation considerations
After you install your Avocet components and define your project layer files, you can specify the
production day for collecting and aggregating data and a timeout interval for the Avocet client.
You define these parameters in the AppConfig_ProjectLayer .xml file of your implementation.
Note: Because the end time is exclusive, the actual end time is 11:59:59 PM (23:59:59).
The calculations return the values for the specific day, not for individual hours. Monthly allocation
calculations use similar inclusive start times and exclusive end times. They start at 12:00 PM (00:00:00)
of the first day of the month and end at 12:00 PM (00:00:00) of the last day of the month. The
calculations return the values for the specific month.
The production day itself extends for 24 hours. When you specify a start time for the production day,
the system assumes the end time of the production day is 24 hours later. For example, if the production
day's inclusive start time is 6:00 AM (06:00:00), then the production day's exclusive end time is 6:00
AM (06:00:00) of the following day.
Note: The actual start and end times in this example are 6:00 AM (06:00:00) and 5:59 AM
(05:59:59).
In allocation processing, the default daily calculations are distinguished from the production day
calculations. The production day calculation values are aggregated for the specified production day
period, which excludes part of the current day and extends to the following day.
51
In the example outlined above, the production day calculations ignore values collected before 06:00:00
of the current day, as they belong to the previous production day.
You enable a production day data collection period by specifying the start time in the AppConfig_
ProjectLayer .xml.
1. In your AppConfig_ ProjectLayer .xml file, locate the section containing the application ID of the
database to which you are connecting.
2. At an appropriate level in the XML hierarchy, add the <prodDayStart> tag, and specify a numerical
value between 00:00:00 and 23:59:59.
<prodDayStart>06:00:00</prodDayStart>
<firstDayOfWeek>Monday</firstDayOfWeek>
<fileLoaderConfig>LoaderConfig.xml</fileLoaderConfig>
<downtimeLevels>3</downtimeLevels>
<orgUnitLevels>4</orgUnitLevels>
The system automatically defaults to an exclusive end time that is set 24 hours after the
<prodDayStart> time.
3. Save theAppConfig_ ProjectLayer .xml file.
4. Start or restart the Avocet application to initialize the change.
The allocation process uses the production day start value to calculate and aggregate data for the
defined production day.
Note: See the Release Notes for instructions on linking to the standard Avocet Help that is
packaged with the installation.
You can link your custom help files to Avocet screens through the Home > Navigation > Add Context
Help Link ribbon toolbar option. Your custom help file overrides the existing help link. You can store
the help files locally, or you can link to external sites, such as Sharepoint. You can modify the
AppConfig_xxx.xml of an existing database to enable the context help feature. You invoke the help
content from the Help icon on the screen.
You should be familiar with the structure of the vmConfig.xml file before linking the help to a screen
type. Place your help file or help files in the desired location.
To define links to custom screen-level help files, follow these steps:
1. To be able to see the Add Context Help Link option, select the Diagnostic node in the Login
dialog when logging into the Avocet client.
2. On the screen or screen type that you wish to link the help file, click Home > Navigation > Add
Context Help Link to open the Custom Dialog Window.
53
3. Click the Type drop-down list to display the selection of screen types to which you can assign the
screen-level help. You can assign the help to a specific screen or to a group of related screens.
Node Assigns the help file to a specific tree node. Note that a custom deployment with different tree
node IDs would break any assigned help links.
Screen Assigns the help file to designated <screen> node for the currently displayed screen. This help
might be available to multiple screens defined under the <screen> node.
Screen_Config Assigns the help file to a <screenConfig> node that references the <screen> node of the currently
displayed screen.This assignment is more specific than the <screen> node assignment.Typically
you would use this assignment for a specific Item Editor screen type because Item Editor screens
reference the same <screen> node
Class Assigns the help file to the class name to which the currently displayed screen belongs. If
assigned to the class, the screen-level help will work in all configurations as long as the class
is not reused for multiple screen types: for example, Item Editor, Data Entry, Transaction, and
so forth
1. Open your project layer AppConfig_ProjectLayer.xml file under ..\AvocetVM\Config, and locate the
application ID definition that contains the database to which you connect.
2. At the same level as the <database> node, enter the following XML markup, highlighted in yellow
in the following example: <contextHelp>contextHelp.xml</contextHelp>.
<application id="ProjectLayerAppID">
<description>ProjectLayerAppID</description>
<database>
55
High frequency infrastructure: installation
and configuration
The Avocet high frequency implementation is based on two components that you install from the
Avocet Installer utility: Avocet HF store and Avocet HFI Manager.
This section describes the installation steps for the Avocet HF store and Avocet HFI manager. It also
describes the configuration guidelines for setting up the Avocet high frequency implementation.
Data Flow Configuration and Alarms Tells how to set up tag mapping and alarms for high frequency data
Connection Manager, Data Loading, and Tag Provides descriptions of how to set up connection manager instances to obtain
Mapping historical and real-time data. The subtopic How to set up your OPC UA data
sources for high frequency implementations is included in this section.
57
The following table describes the main relationships in the high frequency data flow:
HFI Manager and Avocet The HFI manager through its AvocetHFSync service listens for changes to the Avocet
Database database. It polls the LOG_ROWS table for events related to the synchronization process,
such as updates to tag maps, alarms, item properties, and transactions.
Replication triggers must be defined in the Avocet database.
HFI Manager and Avocet HF Store The HFI manager through its AvocetHFSync service automatically synchronizes the
database updates with the Avocet HF Store. It also passes calculation inputs from the
database to the Avocet HF Store.
Avocet HF Store and Desktop The Avocet desktop client defines the alarms, tag maps, and calculations; connects with
Client the Avocet HF store through a connection manager instance; and sends the data to the
Avocet HF store through an OPC UA data feed.
The Avocet desktop client does not display real-time data updates.
Avocet HF Store and Corporate Through tag mapping definitions, the Avocet HF store and corporate historian exchange
Historian OPC UA data updates.
Avocet HF Store|Corporate Through the Avocet SCADA load process, high frequency data from the Avocet HF store
Historian|SCADA Load|Avocet and the corporate historian is converted to low frequency and sent to the Avocet database.
Database
Note: The Avocet database does not store high frequency data. High frequency
data must be aggregated at low frequency intervals for it to be stored in the Avocet
database.
Avocet HF Store|Corporate The OPC UA client can be a custom or third-party client that is OPC UA compliant. Both
Historian|OPC UA Client the Avocet HF store and corporate historian send high frequency data to the OPC UA
client connection through an OPC UA data feed. An OPC UA client, such as a visualization
tool, can display real-time updates. For secure connections, you must manually copy the
client certificate to the trusted folders of the Avocet HF store and the corporate historian
instance.
Note: The HFILicensing service is installed along with the Avocet HF store instance and applies
the requisite license to all Apis components.
If your OPC UA historian is not OPC UA compliant, you can use a software wrapper to complete the
connection to the Avocet HF store: for example, the Matrikon wrapper for the PI data historian.
The Avocet HF store manages the data through tag mapping between the corporate historian's tag
definitions and the matching Avocet item or transaction and its related property in the Avocet database.
The tag mapping is maintained through a synchronization process.
The synchronization process is performed automatically by the HFI manager's AvocetHFSync service.
The Avocet HF store can set alarm ranges and clamping values on the data received from the corporate
historian. It can perform calculations on high- and low-frequency data. Using OPC UA protocol, the
Avocet HF store passes the high-frequency data, including units of measure, alarm ranges, and
calculation outputs, to the corporate historian and SCADA load process.
To set up the Avocet HF store, you must install and configure the APIS Foundation package. The
Avocet HF store must coexist on the same system as the HFI manager. In a fresh install of the Avocet
HF store, security settings are automatically applied and security certificates are installed.
Item link chain
The Avocet HF store requires that the item links which make up its organizational hierarchy be populated
with data so that the calculations are applied to specific item types.
A default item link template is found in the installationDirectory\AvocetVM\Config\HFConfig_base.xml
file.
<ItemLinkChain Id="HFConfig_ILC_base">
<LinkType SourceIdLocation="FROM" Id="BATTERY_ITEM" />
<!--ITEM -> BATTERY-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!--BATTERY -> ORG_UNIT4-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!--ORG_UNIT4 -> ORG_UNIT3-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!--ORG_UNIT3 -> ORG_UNIT2-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!--ORG_UNIT2 -> ORG_UNIT1-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!--ORG_UNIT1 -> COMPANY-->
<LinkType SourceIdLocation="FROM" Id="SCADA_ORG" />
<!--COMPANY -> SCADA-->
</ItemLinkChain>
The default item link chain definition maps the Avocet item types under the BATTERY_ITEM link down
to the SCADA item, which is the data historian instance. By default, the data historian instance is the
Avocet HF store.
The item link chain uses the ORG_ITEM link to traverse the Avocet organizational hierarchy down to
the COMPANY item. The From and To connections are shown in this excerpt from the Type Editor:
59
The SCADA_ORG link then links the COMPANY item with the SCADA item.
In this way, a SCADA item is linked with specific Avocet item types. The SCADA item data properties
are applied to specific Avocet item types in the Avocet database. A representative item hierarchy is
shown below:
You can customize your item types based on your business needs. For example, you can substitute
or add other item links, such as WELL_ITEM, BORE_ITEM, and so forth. Your organization units can
reflect your business structure by using different labels, such as country, region, and other geographic
or organization labels.
The default item link chain supports one or more Avocet HF store instances that are assigned to the
COMPANY item level in the specified Avocet organization hierarchy. If your Avocet HF store is assigned
to the COMPANY level in the same organization structure, you do not need to modify this stanza.
Note: For most deployments, it is recommended that you use Schlumberger as the client
company instance.
Corporate historian
The corporate historian is a data historian software component that records the process data of an
external mechanism: for example, a meter. For high frequency data collection, the interval is in the
range of one sample per one second to one sample per 15 minutes.
This data is communicated in the form of tags. The tags are data elements that consist of time-stamps,
values, and sample quality information. These tags are passed to the Avocet HF store using the OPC
UA protocol. In the Avocet HF store these tags and their values are mapped to and synchronized with
matching Avocet transactions or items and their properties. The corporate historian passes raw data
directly to the OPC UA client.
You can use any data historian that uses the OPC UA protocol. If using a protocol other than OPC
UA when connecting with a data historian, you will have to create a software wrapper to adapt the
other protocol to OPC UA.
In Avocet, you can select the corporate historian as a data source and use the SCADA load process
(Interfaces > Measurement > SCADA Load) to load the historian's tags directly into the Avocet
database. During the load process, the specified aggregation method and interval are applied to the
high-frequency data, resulting in low-frequency sample values that are stored in the Avocet database.
Avocet database
The Avocet database stores low frequency or historical data.
The low frequency data can be the result of aggregation sampling intervals applied to high frequency
data from the corporate historian during the SCADA load process.
The Avocet database provides low frequency or historical production management data to the Avocet
native client in the desktop implementation.
All client connections to the Avocet database are defined by connection strings.
61
The HFI manager uses the OLE DB interface to process log rows to communicate with the Avocet
database.
In most implementation scenarios, you create and maintain the Avocet database on its own database
server.
The Tools > Configure OPC UA menu option allows you to manually set security options, such as
security policies and message security modes, and copy certificates to the respective trusted folders
of the OPC UA servers.
The Apis Management Studio allows you to customize module properties, verify connectivity, observe
tag values, adjust cache settings, and so forth.
63
• If you are installing on top of an existing high frequency implementation with the Avocet HF store,
the installation routine automatically detects it and upgrades it to the latest version of Apis Foundation.
During the upgrade, your existing settings, modules, and items are preserved and carried forward.
However, to be on the safe side, save all your Apis instances, custom configuration files, and data.
• Uninstall the AvocetUAServer service because it is deprecated. (Use the sc delete command.)
• If you were running an HF store on a separate system, uninstall the application server/IIS setup. The
application server/IIS setup is no longer required for the HF store.
• Save your non-Apis historian configuration and data.
Install Schlumberger Licensing Server 2015.1
Follow the instructions for setting up and configuring the server. Note the system name, domain, and
port number for the server. The license path is stored under the system variable
SLBSLS_LICENSE_FILE. You will enter the license path when installing the other components.
Install Avocet
After a successful installation, do the following:
• Verify that all custom Avocet configuration files are deployed to their respective folders. The Avocet
Installer should have copied the custom files to the correct locations.
• Make sure replication triggers are created.
• Restore an existing application ID or define a new application ID that references the database which
contains the high frequency implementation.
• Remove references to deprecated features.
Install Avocet HF Store
After installing the Avocet HF store and rebooting the system, do the following:
• Verify that all Apis-related services are installed and running.These include ApisHive, ApisHoneyStore,
and ApisOPCHDA.
• Verify that the security settings and certificates are correctly applied and installed. In the Certificate
Manager of the Apis Buddy Utility Tool, you should see two certificates:
ApisHive@fullyQualilfiedDomainName and Avocet.
Note: If this is an upgrade, you will need to manually set the security and message encryption
settings for your ApisHive instance.
• Verify through the Apis Buddy Utility Tool that the Apis components have obtained their license.
Add a corporate historian instance
Adding a corporate historian instance at this stage is optional. You can either add
• an Apis-based corporate historian
• a non-Apis OPC UA corporate historian
Define a Connection Manager instance
Log into the application ID that references the database that hosts the high frequency implementation
and define a secure Connection Manager with the Avocet HF store instance and, optionally, an OPC
UA corporate historian instance. Refer to the Help topic How to set up your OPC UA data sources for
high frequency implementation.
Install HFI Manager
Install the HFI manager on the target system where Avocet HF store is installed along with a defined
secure Connection Manager instance that includes an Avocet HF store instance.
Note: However, unlike a fresh install, where security settings are automatically applied, you
have to manually configure your security settings after an upgrade.
The Avocet HF store files are installed in a predefined path and folder. The installation routine ignores
the deployment location specified in the Installer GUI.
The HFILicensing service, which is installed with the HF store, applies the requisite license to the Apis
components.
65
5. At the HFI Manager - Application ID prompt, enter the application ID (AppConfig_projectlayer.xml
file) that references the database you are using for the high frequency implementation, and click
OK.
Upon completion of the installation, the PowerShell window displays status messages and any
errors.
6. Exit Windows PowerShell by typing Exit at the directory prompt.
The installation routine results in the following:
• The HFILicensing service is installed and started.
• Licensing is automatically applied to the Apis components.
• Apis services ApisHive, ApisHoneyStore, and ApisOPCHDA are installed.
• Two security certificates are generated and installed in the trusted folder of the ApisHive instance:
one for the ApisHive (HF store) component and the other for the Avocet client.
1. Launch the Apis Buddy Tool Utility, and choose the Tools > Configure OPC UA menu option.
2. In the Apis OPC UA Configuration dialog, select the ApisHive instance, and click Edit... .
The Endpoint Definition dialog is displayed with the Endpoint tab selected.
3. Verify and complete the following properties:
Endpoint URL A URL with the OPC.TPC protocol and a unique port number
Security policy De-select the None check box, and select the Basic 128 RSA 15 and Basic 256
check boxes.
Message encryption Select the Sign and Encrypt and Sign check boxes.
4. Click the Certificates tab, and verify the public key infrastructure (PKI) settings for the ApisHive
security certificate, as shown in the following screenshot:
1. In the Navigation Tree, select Wells and Facilities and the item, such as completion, well, bore,
and so forth, and complete its Item Edit screen.
2. Proceed to Wells and Facilities > Organization, and complete the Item Edit screens for your
organizational units.
3. After adding the company or companies, in the Navigator list of the Company Item Edit screen,
select the company item to which the Avocet HF store instance is linked.
The corresponding Company Item Edit screen is displayed.
4. Select its Links tab
5. Locate the SCADA Organization Association link for the company item, and click New to display
the Select Item window for the data historian selections.
6. Select the Avocet HF store instance, and click OK to close the window and link the instance to the
SCADA Organization Association.
67
7. Choose Home > Actions > Save to save the updated record.
In this example, all certificates have check marks, meaning that they are in the trusted folder of the
selected ApisHive instance. The following security certificates are listed:
• ApisHive@FullyQualifiedDomainName for the Avocet HF store
• Avocet for the Avocet client
• Avocet Realtime Client for the HFI Manager
• CorporateHistorian for the Apis corporate historian (an ApisHive instance)
Each ApisHive instance has a security certificate file in the following format: instanceName.der. For
example, if you choose to implement the default ApisHive instance, a security certificate named
ApisHive.der is generated. If you registered an instance called CorporateHistorian1, its certificate
name would be CorporateHistorian1.der.
Note: The .der extension (Distinguished Encoding Rules) denotes a binary encoded certificate.
Once validated, these security certificates are stored in the respective trusted folders of the ApisHive
instances defined in this file path: C:\Program Files\APIS\Config\instanceName , as in this example:
The certificate files are stored in the trusted folder of the following directory path: C:\Program
Files\APIS\Config\instanceName\pki\trusted. For example, the following security certificates for the
Avocet HF store, the HFI Manager, the Avocet client, and the corporate historian or historians are
stored under the ApisHive instance for the Avocet HF store:
The ApisHive.der is for the Avocet HF store, the Avocet Realtime Client [nnn].der is for the HFI
Manager, the bfc nnn.der is for the Avocet client, and the CorporateHistorian n.der is for the historian
instance that is linked with the ApisHive instance.
Similarly, for a corporate historian instance called CorporateHistorian1, the following security certificates
are stored in its trusted folder:
69
ApisHive.der is for the HF Store to which the historian connects, CorporateHistorian1.der is for the
data historian, and bfc nnn.der is for the Avocet client. The respective .der certificates should also
reside in the Schlumberger certs subfolder: for example,
C:\ProgramData\Schlumberger\CertificateStores\Client\Trusted Peers\certs.
In addition, a private key certificate (PEM or privacy enhanced mail) should be generated for the
corporate historian and stored in the private subfolder: for example, C:\Program
Files\APIS\Config\instanceName\pki\private\CorporateHistorian1.pem.
In production environments, the corporate historian typically resides on a separate system from that
of the Avocet HF store and HFI Manager. In this case, you copy the respective certificates to and from
the trusted folders of the two systems.
In the Apis Management Studio on the system where the Avocet HF store resides, you have to manually
enter the name of the corporate historian certificate in the ServerCertificatePath property of the
TF_Corporate Historian module of the Avocet HF store ApisHive instance, as in this example:
In addition, verify that the following TF_Corporate Historian module properties are populated:
Property Name Value
MessageSecurity the security for the connection string, such as Signed and
encrypted
1. In the Avocet client, access the Connection Manager window by selecting Administration >
Interfaces > Measurement > Connection Manager in the Navigation Tree.
2. Define an OPC UA Connection Manager with the ApisHive instance of the Avocet HF store and,
optionally, a corporate historian instance.
3. Enter secure connection strings as your connection strings, as in this example for an ApisHive
instance of the Avocet HF store:
Data Source=opc.tcp://SystemName:4850/?0:Objects/
2:ApisHive:ApisHive;SecurityMode=SignAndEncrypt;
SecurityPolicy=Basic128Rsa15
Option Action
New installation If you are prompted to install any prerequisites, accept the prompt and continue with the
installation.
Existing installation You receive a prompt asking whether you want to overwrite the existing installation. Click
OK to continue with the installation routine. Windows Powershell is displayed. You are
prompted to install any prerequisites.
71
5. At the HFI Manager - Application ID prompt, enter the application ID of the
AppConfig_projectlayer.xml file that connects with the high frequency database, and click OK.
6. At the AvocetHFSync prompt, which asks whether you have defined a connection manager with
an Avocet HF store instance, make one of the following selections:
• Click Yes if you have defined the connection manager instance for the Avocet HF store.
• Click No if you have not defined the instance.
The AvocetHFSync service is installed.
7. When the installation completes, exit the PowerShell window.
The installation routine
• adds the specified application ID to the ApplicationId key of the HFIManager.exe.config file
and to the appId key of the HFILicensing.exe.config file.
• updates the relative path of the ConfigDir key to point to the AppConfig.xml file stored under
HFIManager\Config
• adds the specified license path to the <licenseFilePath> element of the
HFIManager\Config\AppConfig.xml file
• installs and starts the AvocetHFSync service. If you have configured an OPC UA corporate
historian instance and added it to a Connection Manager, the AvocetHFSync service populates
the following properties in the TF_Corporate Historian module of the Apis Management Studio:
CertificatePath, CertificateStorePath, MessageSecurity, and PkiType.
Note: The HFI manager installation automatically captures the application ID and modifies the
relative path value of the ConfigDir key.You must update other settings manually, such as buffer,
retry count, polling, and logging parameters.
The configuration files, including the AppConfig.xml and your AppConfig_ProjectLayer.xml, should
reside in the installDirectory\HFIManager\config subfolder. You may need to maintain duplicate
3. Verify that the installation routine populated a relative path to the AppConfig.xml file in the ConfigDir
key.
You can specify an absolute path to the AppConfig.xml file in the ManualConfigDir key. However,
a relative path entry is preferred.
Option Description
Relative path Enter the relative path value against the ConfigDir key.
Absolute path Enter an absolute path value against the ManualConfigDir key.
Key Value
ApplicationId the name of the application ID that connects to the Avocet database for your high frequency
implementation
ConfigDir the relative file path to your deployment's Config folder where the AppConfig.xml file,
AppConfig_ProjectLayer.xml, and other configuration files reside. The default value
..\..\config\AppConfig.xml assumes that your working Config directory is
installDirectory\AvocetVM\config and that the HFIManager.exe.config file which
points to it is located under installDirectory\HFIManager.
If you are using a different path structure in your deployment folder, adjust the relative path
indicator accordingly. You can refer to this non-Schlumberger website for more information
about relative paths.
ManualConfigDir If not using the relative path, you can use the ManualConfigDir to specify the absolute path
to your project's Config subdirectory: for example,
c:\installDirectory\AvocetVM\Config.
HFStoreFilterKeys Applies to the Avocet HF store instance or instances that are defined in the database. It
contains a semi-colon delimited list of possible key values to verify against the Avocet HF
73
Key Value
store connection string in the Connection Manager. This list can include a computer name,
an IP address, a load balancer domain name system (DNS) entry, and so forth.
The default values are localhost; 127.0.0.1. By default this key is commented out.
HFStoreFilterIncludeDns When set equal to true, which is the default value, this key appends the computer name
of the system where the HFI manager's AvocetHFSync service is executing to the filter list
of the HFStoreFilterKeys property.
HFStoreFilterIncludeIpAddresses When set equal to true, which is the default value, this key appends the IPv4 IP address
of the system where the HFI manager's AvocetHFSync service is executing to the filter list
of the HFStoreFilterKeys property.
LocalHostMode a Boolean True/False indicator. When set equal to True, it tells the HFI manager service to
replace the machine or domain name with the local host name in the Avocet HF store's
connection string in the Connection Manager instance.
If LocalHostMode is set equal to False, then the high frequency infrastructure manager
service uses the connection string as-is.
SystemCulture denotes the culture (language) to use for displaying messages. Valid values include
• en-US
• en-GB
• es-CO
• es-EC
• es-MX
• es_VE
• ru_RU
• custom cultures
RunSyncOnConfigFileChange a Boolean True/False indicator. The default is true, meaning that the high frequency service
automatically performs a full synchronization whenever a configure change occurs to the
HFIManager.exe.config file. If the property is set equal to false, then synchronization does
not automatically occur.
SystemUser Avocet user account through which the high frequency infrastructure manager service logs
into the Avocet database
SyncRefreshRate The interval in minutes between full synchronizations of the high frequency infrastructure
service
You can enable logging by uncommenting the following entries under the <listeners> element in the
<system.diagnostics> section:
<listeners>
<!--<add name="logFilegGlobal" type="System.Diagnostics.
TextWriterTraceListener" initializeData="..\..\HFIManager.log"
traceOutputOptions="DateTime,Timestamp" />
75
The following flow chart outlines the steps for configuring an Apis corporate historian when it is located
on a separate server:
77
Add an Apis corporate historian instance to the local system
This task shows how to set up and register an APIS corporate historian instance on the same system
where you have installed Avocet, Avocet HF Store, and HFI Manager. This scenario describes a typical
test environment. In a production environment, the corporate historian is typically installed on a separate
server.
You must have administrator privilege to execute this task, specifically running the PostInstall.ps1
script.
Windows PowerShell 3.0 or later should be installed. (Windows Powershell 3.0 or later is required by
the Avocet Installer program, so it should already be installed.) The PostInstall.ps1 script runs under
Windows PowerShell.
The HFI Manager is installed. The HFI Manager is required because its subfolder ..HF\Apis contains
the PostInstall.ps1 script.
At the end of the Avocet HF store installation routine, the Avocet Installer applies security settings and
installs certificates for the HF Store and any existing corporate historian instances. If you add a corporate
historian after you have installed the Avocet HF store, you apply security settings and install certificates
by running the HFIManager\HF\Apis\PostInstall.ps1 script under Windows PowerShell.
Create a Connection Manager definition with the Avocet UA server and your Avocet HF store for the
application ID that connects to your high frequency implementation database. After you create the
3. In the Enter name of new APIS Hive instance text box, enter and note the name of your corporate
historian.
If you intend to use the HF Player data simulator, it is preprogrammed to use the instance name
CorporateHistorian1.You can choose to enter CorporateHistorian1 as the name of your instance.
4. Select the Run As Service check box, and click OK.
A toolbar item with the name of your corporate historian instance is displayed in the APIS Buddy
GUI.
5. Choose Tools > Configure OPC UA to verify the URL entry in the Apis OPC UA Configuration
dialog.
a) If registering the corporate historian on the same system as the Avocet HF Store, specify a port
number other than 4850 (the Avocet HF Store default value) to avoid conflicts: for example,
4851.
The localhost designation is 0.0.0.0 for the opc:tcp endpoint.
b) Close the dialog.
6. Execute the installDirectory\HFIManager\HF\Apis\PostInstall.ps1 script to apply the security settings.
a) Go to installDirectory\HFIManager\HF\Apis\PostInstall.ps1, and right click PostInstall.ps1 to
display the flyout menu.
b) Choose Run with PowerShell.
If your system execution policy permits it, then the script automatically executes in a PowerShell
window where the output is displayed. If you receive an error, you will need to execute the
Get-ExecutionPolicy at the command line.
7. Verify the security settings in the Apis Buddy Tool.
a) Choose Tools > Configure OPC UA to open the Apis OPC UA Configuration dialog.
b) Verify the security settings:
79
Security The security level is set automatically by the Avocet Installer or the execution of the PostInstall.ps1
script. The default settings are
• Basic 128 Rsa 15 (Sign or Sign and Encrypt)
• Basic 256 Rsa (Sign or Sign and Encrypt)
Certificates You should see the ApisHive and the two Avocet client certificates already assigned to the trusted
folder of the ApisHive HF Store instance. The ApisHive certificate is for the Avocet HF Store. The
Avocet certificate is for the Avocet client. The Avocet RealTime Client certificate is for the HFI
Manager component.
Select the ApisHive corporate historian instance, and verify that its certificate is installed and in the
trusted folder.
8. In the Avocet client, add the corporate historian to the secure Connection Manager definition for
the Avocet HF store defined in the application ID pointing to the database supporting the high
frequency implementation.
9. Browse the namespace of the corporate historian node.
An Avocet client certificate is generated for the corporate historian node.
10. In the Apis Buddy Tool Utility, verify that the Avocet client certificate is installed for the ApisHive
corporate historian instance.
11. Manually move the Avocet client certificate to the trusted folder of the ApisHive corporate historian.
12. In the APIS Buddy GUI, restart the ApisHive and corporate historian instances.
After the AvocetHFSync process is run, the following properties are populated in the TF_Corporate
Historian module of the Apis Management Studio:
• CertificatePath - name of ApisHive HF Store certificate (ApisHive.der for example)
• CertificateStorePath - path to the ApisHive HF Store certificate
• MessageSecurity - Signed and encrypted
• PkiType - OpenSSL
13. Open the Apis Management Studio on the system where the Avocet HF store resides, connect
with the Avocet HF Store to display the TF_CorporateHistorian module, and manually enter the file
path of the server certificate in the ServerCertificatePath property.
In the Data Flow screen, add the tag mapping entries linking items and transactions to the Avocet HF
store and corporate historian instances.
Execute Get-Execution Policy
Before running the Apis PostInstall.ps1 PowerShell script, you may need to execute and set the
execution policy. This requirement varies depending on your environment settings.
If you are unable to launch the PostInstall.ps1 PowerShell script from the flyout menu, you will need
to set your execution policy to RemoteSigned.
Note: Having an execution policy Unrestricted is not recommended because it possibly exposes
the system to malicious scripts.
Note: You have to repeat this procedure for each Avocet HF store and corporate historian
instance that you add.
The Avocet client certificate does not display in the Certificate Manager of the Apis Buddy Utility Tool
until the specified node (HF store or corporate historian) has been browsed through a connection
manager link. When the Avocet client certificate first displays, it is marked as untrusted.
To install the Avocet client certificate to the trusted folder, follow these steps:
1. Launch the Apis Buddy Utility Tool, and choose Tools > Configure OPC UA.
2. In the Apis OPC UA Configuration dialog, select the ApisHive instance (HF store or corporate
historian) and click Edit... .
3. In the Endpoint Definition dialog, click the Certificates tab and choose Manage Certificates.
4. In the Manage Certificates dialog, select the Avocet client certificate, and click Trust.
The certificate is added to the trusted folder, and a green checkmark displays next to its name.
5. Close the Manager Certificates and Endpoint Definition dialogs to return to the Apis OPC UA
Configuration dialog.
6. In the Apis OPC UA Configuration dialog, choose the corporate historian instance, and click Edit...
.
7. Repeat steps 3 and 4 to add the Avocet client certificate to the trusted folder.
8. Follow this procedure to add the client certificate of each connected OPC UA client to the trusted
folder of the respective ApisHive instance.
81
Add historian certificate to the ServerCertificatePath property
After creating a corporate historian and applying security settings to its configuration, you manually
enter the name of its server certificate in the ServerCertificatePath property of the TF_CorporateHistorian
module instance in the Apis Management Studio.
You perform this task on the system where the Avocet HF store and HFI Manager are installed.
The AvocetHFSync service should be running, as well as all Apis services.
If the corporate historian resides on a separate system, you must have already copied its server
certificate to the trusted folder on the local system.
Review the Apis Management Studio Help for additional details.
The ServerCertificatePath property references the server certificate for your data historian. You will
need to specify the server certificate name for each corporate historian instance in your implementation.
1. To view the server certificate for the corporate historian, do the following:
a) In the Apis Buddy Utility Tool, choose Tools > Configure OPC UA.
b) Select the corporate historian instance, and click Edit... .
c) Click the Certificates tab, and choose Manage Certificates to display the Certificate Manager
dialog.
d) Select the instanceName@FullyQualifiedDomainName entry, and click View Certificate... .
2. To verify the name of the server certificate for the corporate historian, go to the following file path:
C:\Program Files\APIS\Config\instanceName\pki\trusted.
The certificate name is instanceName.der.
3. Launch Apis Management Studio.
4. Connect to your HF Store (hive://hostName).
Its modules are displayed.
5. Open the TF_CorporateHistorian module, and locate the ServerCertificatePath property.
6. Enter the name of the certificate in the ServerCertificatePath property, and click Apply.
The update is automatically synchronized.
Note: If the Avocet HF store and recently added corporate historian do not connect, in Apis
Management Studio, right click the TF_Corporate Historian module entry, choose Restart.
With an Apis corporate historian on a separate system, you do not run the PostInstall.ps1 script to
apply security settings. Instead, you manually apply the security settings and copy the secure certificates
between the trusted folders of the two systems.
1. On the source system where you have already installed the components, locate the
Installer\Software\Apis subfolder and copy the Apis subfolder.
2. Paste the Apis folder to a local drive of the target system where you intend to set up your Apis
corporate historian.
3. Open the Apis folder and launch the APIS Foundation x64 Setup.exe executable to manually
install Apis.
4. Launch the APIS Buddy Utility Tool.
The default ApisHive instance is an OPC UA server and can function as the corporate historian
when linked with the Avocet HF store. You can use the default ApisHive instance as the corporate
historian. You do not need to register a new instance.
If you use the default ApisHive instance, it generates a security certificate named ApisHive.der.
5. Ensure that the ApisHive instance is running and the Apis services (ApisHive, ApisHoneyStore,
and ApisOPCHDA) have started.
83
6. Choose Tools > Configure OPC UA to verify the URL entry in the Apis OPC UA Configuration
dialog.
a) Specify the URL of the system where the ApisHive corporate historian instance resides.
b) Specify the port number through which the ApisHive corporate historian instance will communicate
with the Avocet HF store that resides on the separate system.
c) Close the dialog.
7. Manually set the security settings of the ApisHive instance in the Apis Buddy Utility Tool.
a) Choose Tools > Configure OPC UA to open the Apis OPC UA Configuration dialog.
b) Specify these security settings:
8. On the source system, add the corporate historian to the secure Connection Manager definition
for the Avocet HF store on the application ID pointing to the database supporting the high frequency
implementation.
Refer to the Help topic How to set up your OPC UA data sources for high frequency implementations.
9. Follow these guidelines to copy certificates between the two systems:
Note: If the certificates have the same name, for example ApisHive.der, you must first copy
the certificate to a temporary folder, rename it (ApisHive1.der for example), and then copy
it to the instanceName's trusted folder. Do NOT overwrite an existing certificate.
a) On the system where the corporate historian resides, export the corporate historian's secure
certificate and copy it to the system where the Avocet HF store resides in the following directory
path: C:\Program Files\APIS\Config\ApisHive\pki\trusted.
b) On the system where the Avocet HF store resides, copy the Avocet client and the ApisHive
certificates and paste them to the C:\Program
Files\APIS\Config\CorporateHistorianInstanceName\pki\trusted folder on the system where the
corporate historian resides.
10. Open the Apis Management Studio on the system where the Avocet HF store resides, add the
historian certificate to the ServerCertificatePath property:
a) Connect with the Avocet HF store to display the TF_CorporateHistorian module.
b) Open the corresponding TF_CorporateHistorian module, and locate the ServerCertificatePath
property.
c) Enter the name of the certificate (instanceName.der) in the ServerCertificatePath property, and
click Apply.
The update is automatically synchronized.
Note: If the Avocet HF store and recently added corporate historian do not connect, in Apis
Management Studio, right click the TF_Corporate Historian module entry, choose Restart.
After the AvocetHFSync process is run, the following properties are populated in the TF_Corporate
Historian module of the Apis Management Studio for the Apis corporate historian:
• CertificatePath
• CertificateStorePath
• MessageSecurity
For the next major step, go to the Data Flow screen, and add the tag mapping entries linking items
and transactions to the Avocet HF store and corporate historian instances.
Endpoint URL A URL with the OPC.TPC protocol and a unique port number
Certificates ApisHive, Avocet, and Avocet Realtime Client. The ApisHive certificate is for the Avocet
HF store. The Avocet certificate is for the Avocet client. The Avocet RealTime Client
certificate is for the HFI manager. (The Avocet client certificate is displayed only after the
connection manager instance is defined and browsed.)
You have to use your vendor's security guidelines for your historian.
1. Follow your vendor's procedure for defining the corporate historian instance and its endpoints.
2. Configure your historian's OPC UA settings for your connection endpoints and security settings.
3. Following the vendor's instructions, create secure certificates for your historian and install them in
the trusted folder.
4. On the system where your Avocet client resides, add your corporate historian instance to the secure
Connection Manager definition for the application ID that points to the database where the high
frequency implementation resides.
5. If your corporate historian resides on a different system from that of the Avocet HF store, follow
these guidelines to copy certificates between the two systems:
Note: If the certificates have the same name, for example ApisHive.der, you must first copy
the certificate to a temporary folder, rename it (ApisHive1.der for example), and then copy
it to the instanceName's trusted folder. Do NOT overwrite an existing certificate.
a) On the system where the corporate historian resides, export the corporate historian's secure
certificate and copy it to the system where the Avocet HF Store resides in the following directory
path: C:\Program Files\APIS\Config\ApisHive\pki\trusted.
b) On the system where the Avocet HF Store resides, copy the Avocet client and the ApisHive
certificates and paste them to the C:\Program
85
Files\APIS\Config\CorporateHistorianInstanceName\pki\trusted folder on the system where the
corporate historian resides.
6. Open the Apis Management Studio on the system where the Avocet HF store resides, add the
historian certificate to the ServerCertificatePath property:
a) Connect with the Avocet HF store to display the TF_CorporateHistorian module.
b) Open the corresponding TF_CorporateHistorian module, and locate the ServerCertificatePath
property.
c) Enter the name of the certificate (instanceName.der) in the ServerCertificatePath property, and
click Apply.
The update is automatically synchronized.
Note: If for some reason the Avocet HF store and recently added corporate historian do not
connect, in Apis Management Studio, right click the TF_Corporate Historian module entry,
choose Restart.
After the AvocetHFSync process is run, the following properties are populated in the TF_Corporate
Historian module of the Apis Management Studio for the Apis corporate historian:
• CertificatePath
• CertificateStorePath
• MessageSecurity
• PkiType
In the Data Flow screen, add the tag mapping entries linking items and transactions to the new Avocet
HF Store and corporate historian instances.
Use the Windows Event Viewer to monitor and archive the event log for a few days.
Use the Apis Management Studio to verify that tags are being populated with data and that calculations
and alarms are functioning correctly.
Horizon The number of days that events are stored in the historian
database. The default is 365.
6. For more advanced configuration options, refer to the Help topic Event Historian in the Apis
Management Studio Help.
Note: For a test client, you can download the UaExpert OPC UA client from this
non-Schlumberger website.
87
In APIS Management Studio, you can search its Help for Event Historian to learn details about the
event historian and its configuration.
How to set up your OPC UA data sources for high frequency implementations
This section provides guidelines for configuring your Connection Manager definitions for high-frequency
and visualization. It assumes that you are familiar with the Connection Manager feature.
If you are using high frequency data collection, define the following three data sources:
• Avocet UA server
• Avocet HF store
• Corporate historian
Note: The Avocet UA server feature is deprecated in this release. However, its node is required
in the hierarchy when defining the high frequency implementation. The entry Avocet UA server
acts, in effect, as a placeholder.
The following diagram outlines the data flow in a high frequency implementation that includes the
Avocet HF store:
Before defining the data source connections, make sure that the corresponding components—ApisHive
(Avocet HF store) and corporate historian -- are running. The AvocetHFSync process does not have
to be running. If it is running, however, it actively monitors the connections once they are defined and
updates data if changes occur.
As a reminder, the following components are required for the Avocet high frequency connection
manager definition:
• Avocet UA server (as placeholder in node hierarchy)
• Avocet HF store
• corporate historian
1. Access the Connection Manager window through the Administration > Interfaces > Measurement
> Connection manager node.
2. In the ribbon toolbar, choose Home > Tools > New > Avocet UA Server to open a blank record.
3. Complete the following fields in the top section of the Connection Manager – Avocet UA Server
window:
Field Description
Tag Mapping Color The color used to indicate which fields have been mapped to tag values
Data Source Level The data source value is Avocet (the Avocet database). Select Avocet from the
drop-down list if it is not already displayed.
Read by Disabled for Avocet UA Server. The Read by selection serves to link SCADA data
originating from a historian with Avocet items.
4. Select OPC UA as the data access type in the Historian Data Access Type field.
The actual value you select is irrelevant to the definition, but you must select an entry to maintain
the hierarchy.
5. Accept the default data connection string.
While the data connection string has no significance to the implementation, you must still make an
entry. You cannot leave the field blank.
6. Choose Home > Tools > Save.
1. In the Avocet client, access the Connection Manager window by selecting Administration >
Interfaces > Measurement > Connection Manager in the Navigation Tree.
2. In the ribbon toolbar, choose Home > Tools > New > Avocet HF Store to display a blank record.
3. Complete the following fields in the top section of the Connection Manager – Avocet HF Store
window:
Field Description
Tag Mapping Color The color used to indicate which fields have been mapped to tag values
Data Source Level For the Avocet HF Store, the data source is itself, so select Avocet HF Store.
89
Field Description
Read by Choose the placeholder node Avocet UA Server to maintain the data hierarchy.
• browsing the namespace of the Avocet HF store and connecting with a specific node
6. For the initial setup, accept the default values for the Tag List Source and Data loading options
fields.
7. In the ribbon toolbar, choose Home > Tools > Save.
The Avocet HF store's Connection Manager instance is created.
Caution: When you delete your Avocet HF store's Connection Manager instance, you also
delete its tag mapping definitions. You have to recreate the tag maps when you re-enter the
Avocet HF store's Connection Manager configuration.
1. In the Avocet client, access the Connection Manager window by selecting Administration >
Interfaces > Measurement > Connection Manager in the Navigation Tree.
2. In the ribbon toolbar, choose Home > Tools > New > Corporate Historian to display a blank
record.
3. Complete the following fields in the top section of the Connection Manager – Corporate Historian
window:
Field Description
Tag Mapping Color The color used to indicate which fields have been mapped to tag values
Data Source Level For the Corporate Historian, the data source is itself, so select Corporate Historian.
4. Select the data access type in the Historian Data Access Type field.
In a high-frequency implementation that includes the Avocet HF store, choose OPC UA.
91
Other valid values depend on the type of connection. They include
• ODBC
• OleDb
• OPC HDA
• Oracle
• SQL Server
5. Specify the secure data connection string by which the historian client connects with the server.
Use the system name or IP address in this data connection string whether the corporate historian
resides on the local or a remote system. Do not use localhost or the fully qualified domain name
(FQDN) in the corporate historian connection string.
You obtain the secure data connection string by
• manually entering the data connection string with the security parameters, as in this example:
• Data Source=opc.tcp://systemName:4851/?0:Objects/
2:CorporateHistorian1;SecurityMode=SignAndEncrypt;
SecurityPolicy=Basic128Rsa15
browsing the namespace of the Avocet HF store and connecting with a specific node
6. For the initial setup, accept the default values for the Tag List Source and Data loading options
fields.
7. In the ribbon toolbar, choose Home > Tools > Save.
The corporate historian Connection Manager instance is created.
Caution: When you delete your corporate historian's Connection Manager instance, you
also delete its tag mapping definitions. You have to recreate the tag maps when you re-enter
the corporate historian's Connection Manager configuration.
Run script to grant non-administrative or standard user rights to Avocet HF store and
HFI manager
You can execute the HFIManager\HF\Apis\NonAdmin\ApisNonAdmin.ps1 script to grant a
non-administrative or standard user rights to run and configure the Avocet HF store, Apis corporate
historian, and HFI manager and its AvocetHFSync service.
You must have the HFIManager folder to gain access to the ApisNonAdmin.ps1 script. You must
have the administrative privilege to execute the script.
Create a new or select an existing non-administrative or standard user to which you want to grant
permission.
All Apis services and the AvocetHFSync service must be installed and working.
Windows Powershell 3.0, which is required for the Avocet Installer, should be installed.
93
8. Log in using the non-administrative user credentials to verify that the APIS and AvocetHFSync
services start under the updated non-administrative account.
In the next scenario, three Avocet HF store instances are defined across two systems, each requiring
an HFI manager instance to monitor the respective Avocet HF store instances. In this example, each
HFI manager reads the default values of the HFStoreFilter keys. The default values tell each HFI
manager to accept the domain names of the HF stores on the system it resides on. When the Avocet
HF store data source connection string specifies the domain name (ACME or COYOTE in this example),
the HFI manager knows to manage the specified Avocet HF store instance.
The following example shows a domain name system load balancer defined in the HFStoreFilterKeys
property instead of its default value. The other HFStoreFile keys contain the default values, meaning
that the HFI manager instance can accept either a domain name or an IP address, if either is specified
in the HF store's data connection string. However, in this case, the domain name system load balancer
defined in the HFStoreFilterKeys property is specified.
95
Because this is a load balancing scenario, the two HF store instances are managed as a single logical
instance. Consequently, in their respective Connection Manager definitions, each physical instance
is assigned the identical logical instance name.
The HFI manager service AvocetHFSync must be co-located on the same system as the Avocet HF
store instance or instances.
Each Avocet HF store instance must have a SCADA Organization Association link to a unique
COMPANY item.
Note: A single HF store instance can be connected with one or more corporate historians.
However, a corporate historian instance cannot be shared by more than one HF store.
A unique Connection Manager definition (Avocet UA Server > Avocet HF Store > Corporate Historian)
must exist for each Avocet HF store instance.
Note: Multiple Avocet HF store instances cannot connect to the same corporate historian.
97
1. Launch the APIS Buddy Tool, and choose Tools > Register New Instance... .
The Register New Apis Hive Instance dialog is displayed.
2. Enter the name of the new instance of the Avocet HF store in the Enter name of new APIS Hive
Instance text field.
3. Ensure that the Run as Service check box is selected, and click OK.
4. Choose Tools > Configure OPC UA.
The APIS OPC UA configuration dialog is displayed.
5. Select the Avocet HF store instance you just registered, and click Edit.. .
The Endpoint Definition dialog is displayed.
6. Adjust the endpoint parameters as required.
Tab Description
Endpoint Ensure that the URL points to the correct system and the connecting port is available. Select
the security policies Basic 128 RSA 15 and Basic 256. Select the secure message modes
Sign and Sign and Encrypt.
Certificates The PostInstall.ps1 script will create and install the certificates.
7. In the Apis Buddy Took, click Close, start the new Avocet HF store instance, and restart all other
APIS instances. In the Services window, restart the AvocetHFSync service.
8. Execute the PostInstall.ps1 script to apply the security settings.
a) Go to installDirectory\HFIManager\HF\Apis\PostInstall.ps1, and right click PostInstall.ps1 to
display the flyout menu.
b) Choose Run with PowerShell.
If your system execution policy permits it, then the script automatically executes in a PowerShell
window where the output is displayed. If you receive an error, you will need to execute the
Get-ExecutionPolicy at the command line.
Upon completion of the script, a certificate is generated and installed for the new ApisHive instance
and the Avocet and Avocet Realtime Client certificates are duplicated in the Trust folder.
1. Log into the application ID where your Connection Manager instance is defined.
2. In the Avocet client, access the Connection Manager window by selecting Administration >
Interfaces > Measurement > Connection Manager in the Navigation Tree.
3. In the ribbon toolbar, choose Home > Tools > New > Avocet HF Store to display an Avocet HF
store record.
4. Verify the following fields in the top section of the Connection Manager – Avocet HF Store window:
Field Description
Name Name that you assign to this HF store connection manager instance. For
convenience sake, this should be the same name you assigned to the instance
when you registered it in the APIS Buddy Tool.
Tag Mapping Color The color used to indicate which fields have been mapped to tag values
Data Source Level For the Avocet HF store, the data source is itself, so select Avocet HF Store.
Read by Choose the placeholder node Avocet UA Server to maintain the data hierarchy.
Note: The Browse feature can help you to determine if you have a valid connection. If
you do not see the Avocet HF store entry when you browse the address space, you should
recheck your Apis installation and configuration.
7. Modify the configuration URI entry by substituting the name of your registered Avocet HF store
instance.
The default Avocet HF store instance name is 1, as in
localhost:progid=Prediktor.ApisLoader.1
99
Append the name of your new Avocet HF store instance after the ApisLoader. entry, as in
localhost:progid=Prediktor.ApisLoader.
NewAvocetHFStoreInstance
8. For the initial setup, accept the default values for the Tag List Source and Data loading options
fields.
9. In the ribbon toolbar, choose Home > Tools > Save.
The new Avocet HF store Connection Manager instance is created.
Add your corporate historian instance to the Connection Manager definition for this application ID.
In the Data Flow screen, add the tag mapping entries linking items and transactions to the new Avocet
HF store and corporate historian instances.
Note: A corporate historian instance or instances are read by a single HF store instance. You
cannot connect a single corporate historian instance to more than one HF store instance.
1. Log into the application ID where your Connection Manager instance is defined.
2. In the Avocet client, access the Connection Manager window by selecting Administration >
Interfaces > Measurement > Connection Manager in the Navigation Tree.
3. In the ribbon toolbar, choose Home > Tools > New > Corporate Historian to display a corporate
historian record.
4. Verify the following fields in the top section of the Connection Manager – Corporate Historian
window:
Field Description
Name Name that you assign to this corporate historian connection manager instance.
For convenience sake, this should be the same name you assigned to the instance
when you registered it in the APIS Buddy Tool.
Tag Mapping Color The color used to indicate which fields have been mapped to tag values
Data Source Level For the Corporate Historian, the data source is itself, so select Corporate Historian.
Read by Choose the Avocet HF store instance that it will connect with. This connection is
unique to the specified HF Store instance.
5. Select the data access type in the Historian Data Access Type field.
In a high frequency implementation that includes the Avocet HF store, choose OPC UA.
Note: The Browse feature can help you to determine if you have a valid connection. If
you do not see the Corporate Historian entry when you browse the address space, you
should recheck your corporate historian installation and configuration.
If your corporate historian and Avocet HF store reside on the same system, ensure that they
do not share the same port number.
7. For the initial setup, accept the default values for the Tag List Source and Data loading options
fields.
8. In the ribbon toolbar, choose Home > Tools > Save.
The corporate historian Connection Manager instance is created.
In the Data Flow screen, add the tag mapping entries linking items and transactions to the new Avocet
HF store and corporate historian instances.
Note: The Avocet HF store is built on the ApisHive and Honeystore components.
Refer to the Apis Management Studio Help for specific information about these options.You can search
on the term "ApisBare," which is the name of the API. This topic provides summary descriptions and
guidelines for their use.
101
The default backup and restore commands act on configuration settings, alarm and event data, historical
data files, UA certificates, and other data. The backup data includes the following files:
.cfg A JSON text file that contains general information about the backup, configuration entries defined in
the Windows Registry, and the content of the different configuration files that support Apis modules
and Honeystore databases
.chr a customized file format that contains event and alarm data. For example, the ApisHive.chr is the
backup for the event historian.
.bin Honeystore metadata stored in a SQLite3 database, which you can view with a SQLite3 browser. It
contains item, property, and attribute tables.
.bin.blockdata a customized file format containing raw data in a compressed format that is exported from the
Honeystore database. You can import this data into a target Honeystore database that contains the
same items as the source database. To do the import, you can use APIS Management Studio or the
Microsoft Management Console (MMC) for the Honeystore database.
certificates Private, trusted, and rejected certificates are stored in subdirectories under the backup directory.
/Wait exits the completed backup or restore action only after you press a key on the keyboard
/ConfigOnly backs up or restores configuration settings only. This option applies to the ApisHive and the Honeystore.
/DataOnly backs up or restores data only. This option applies only to the Honeystore component.
/Yes restores all backup data and overrides existing data without a confirmation prompt. It applies only to
the restore option. If the /Yes option is omitted, the restore task behaves more interactively, printing
out attribute values that you can override.
/Incremental backs up configuration settings that have changed or event data that has been added since the last
backup. For configuration settings, each backup folder is incremented by one. For the restore action,
you specify the sequence number of the incremented backup folder you wish to restore.
For event and alarm data, a chronicle file (.chr) is used to store the events and alarms. Incremental
data is appended in data blocks to the existing chronicle .chr file. The .chr file is not numerically
incremented. The restore operation restores each data block one after the other.
When restoring an Apis configuration and data on a different system, the restore operation automatically
adjusts certain configuration parameters. (See the Apis Help topic for a list.) However, on the new
system you must generate new security certificates for the UA servers. In addition, you check all
service endpoints for any port conflicts. Also, you should verify the overridable values that are printed
out during an interactive restore session.
Back up ApisHive
You can back up the data and the configuration settings or only the configuration settings of the
ApisHive component. However, you cannot back up only the data of the ApisHive component.
Create a target backup folder where you intend to save the ApisHive data. You will need to be able
to run the Windows Command Prompt as administrator to perform this task.
Use the /Hive key in the command syntax to specify the ApisHive.
Note: The default backup operation saves both data and configuration settings.
/Hive points to the target component. When used by itself, it is the Bare Backup /Hive
default option. The default option backs up data and configuration "PathName\FileName.cfg"
settings. Be sure to user the forward slash (/) for the key hive
and include the .cfg suffix as the filename extension.
/Configonly This option restricts backup to the component's configuration Bare Backup /Hive /configonly
settings. "PathName\FileName.cfg"
/Incremental This option backs up only the data and configuration settings that Bare Backup /Hive /Incremental
have changed or have been added since the preceding backup. "PathName\FileName.cfg"
Backup .cfg files are numerically incremented. Backup .chr files
are appended.
/wait This option forces the backup script to wait for user input, such Bare Backup /Hive /Wait
as pressing a key, to exit. "PathName\FileName.cfg"
5. View the output in the Command Prompt to which file or files are being created.
6. Navigate to the file path where the backup files are being saved.
You should see the .cfg file that stores the configuration settings, a folder named ApisHive.Hive
that has a .pem file holding the certificate, files containing trusted certificates, a Logger.HS file,
and an ApisHive.chr file for the APIS event historian.
Back up Honeystore
You can back up the data only, the configuration settings only, or both data and configuration settings
of the Honeystore component.
Create a target backup folder where you intend to save the Honeystore data. You will need to be able
to run the Windows Command Prompt as administrator to perform this task.
Use the /honeystore key in the command syntax to specify the Honeystore.
Note: The default backup operation saves both data and configuration settings.
/honeystore points to the target component. Used by itself, it is the default Bare Backup /honeystore
option. The default option backs up data and configuration "PathName\FileName.cfg"
settings. Be sure to user the forward slash (/) for the key
honeystore and include the .cfg suffix as the filename
extension.
/configonly This option restricts the backup to the component's Bare Backup /honeystore /configonly
configuration settings. "PathName\FileName.cfg"
103
Option Description Syntax
/dataonly This option restricts the backup to the component's data files. Bare Backup /honeystore /dataonly
"PathName\FileName.cfg"
/Incremental This option backs up only the data and configuration settings Bare Backup /honeystore /Incremental
that have changed or have been added since the preceding "PathName\FileName.cfg"
backup. Backup .cfg files are numerically incremented. Backup
.chr files are appended.
/wait This option forces the backup script to wait for user input, Bare Backup /honeystore /Wait
such as pressing a key, to exit. "PathName\FileName.cfg"
5. View the output in the Command Prompt to which file or files are being created.
6. Navigate to the file path where the backup files are being saved.
You should see the .cfg file and one folder for each database that is backed up.
Restore ApisHive
You can restore the ApisHive configuration and data files that you backed up to the same or different
instance of the Avocet HF Store.
Before trying to restore your ApisHive instance on an existing installation, remove the Chronical folder
at C:\ProgramFiles\Apis\Chronical\ApisHiveInstance.
The configuration and data files that you restore override any existing data in the instance. By default,
a confirmation prompt asks whether you want to override the existing data. The data is copied to their
default Apis directories.
/hive points to the target component. When used by itself, this Bare Restore /hive
is the default option. The default option restores data and "PathToBackupFolder\BackupFileName.cfg"
configuration settings. Be sure to use the forward slash (/)
for the key hive and include the full path to the backup file.
/configonly This option restores only the configuration settings to the Bare Restore /hive /configonly
Avocet HF Store. "PathToBackupFolder\BackupFileName.cfg"
/yes This option initiates the restore action without the Bare Restore /hive /yes
confirmation prompt. "PathToBackupFolder\BackupFileName.cfg"
/incremental This option restores the incremental or appended backup Bare Restore /hive /incremental
file that is specified in the command line. "PathtoBackupFolder\BackupFile"
4. If you do not use the /yes option, press Y at the prompt to restore the backed-up data, thereby
overriding any existing data in the Avocet HF store instance.
If the target instance is running, it is stopped.
Restore HoneyStore
You can restore the Honeystore data, the configuration settings, or both data and configuration settings
to the same or different instance of the Avocet HF store.
The configuration and data files that you restore override any existing data in the Avocet HF store
instance. By default, a confirmation prompt asks whether you want to override the existing data. The
data is copied to their default Apis directories.
/honeystore points to the target component. Used by itself, this is the Bare Restore /honeystore
default option. It restores data and configuration settings "PathToBackupFolder\BackupFileName"
to the Avocet HF store instance. Be sure to user the
forward slash (/) with the key honeystore and include the
full path to the backup file.
/configonly This option restores only the configuration settings to the Bare Restore /honeystore /configonly
Avocet HF store instance. "PathToBackupFolder\BackupFileName"
/dataonly This option restores only the data to the Avocet HF store Bare Restore /honeystore /dataonly
instance. "PathToBackupFolder\BackupFileName"
/yes This option initiates the restore action without the Bare Restore /honeystore /yes
confirmation prompt. "PathToBackupFolder\BackupFileName"
/incremental This option restores the incremental or appended backup Bare Restore /honeystore /incremental
file that is specified in the command line. "PathtoBackupFolder\BackupFile"
4. If you do not use the /yes option, press Y at the prompt to restore the backed-up data, thereby
overriding any existing data in the Avocet HF store instance.
If the target Avocet HF store instance is running, it is stopped.
1. Identify the source Avocet HF store instance whose configuration and data you want to back up
and the target Avocet HF store instance that you want to import the information to.
2. Use the appropriate backup command options to back up the configuration and data of the source
Avocet HF store instance.
3. Using the appropriate restore options, restore the desired data and configuration settings to the
target Avocet HF store instance.
Note: In APIS Management Studio, you can search its Help for the following terms:
• CertificatePath
105
• CertificateStorePath
• MessageSecurity
• PkiType
1. Launch APIS Management Studio, and connect with your Avocet HF Store instance
(hive://hostName) to which the corporate historian is connected.
2. Display its modules, and select TF_Corporate Historian.
3. In the ApisOpcUa TF_Corporate Historian property list, make the following security entries:
Property Value
CertificatePath ApisHive.der
CertificateStorePath File path relative to the Apis configuration folder. The default is PKI.
MessageSecurity Signed or Signed and encrypted
PkiType OpenSSL
3 Assign the non-administrative user Full Control to the Apis Configuration subfolder. (This is optional, depending
on whether you want the non-admin user to update APIS configuration settings.)
4 Grant the non-administrative user Full Control to the Apis registry entries.
The following table outlines the workflow of the non-administrative user running on a non-domain or
domain member computer:
4 Grant the non-administrative user Full Control to the Apis registry entries.
5 Assign the non-administrative user account to the DCOM object APIS service.
If the non-administrative user runs under a domain member computer, then keep in mind that the
computer's security settings are controlled through domain controllers. Ensure that the domain policy
does not override the user settings. After you complete the configuration of the non-administrative
user who runs under a domain member computer, restart the computer. The restart prevents the
domain policy from overriding the user settings.
1. In the Control Panel, choose User Accounts > Give other users access to this computer to
launch the Advanced User Accounts Control Panel program.
Note: Depending on your access path, you may also need to select Manage User Accounts
to launch the panel.
Note: If the user is assigned to a non-domain or domain member computer, select the
Password never expires check box.
c) Save and close New User dialog and the Users and Groups window.
d) To check the permission of the newly created user, in the User Accounts window select the
user name, click Properties, and click the Group Membership tab to verify that the Standard
user option is selected.
107
5. Launch the Services window.
6. For the ApisHive, ApisHoneyStore, and ApisOpcHda services, grant log-on permission for the
standard user:
a) Right-click the service name to display the flyout menu, and choose Properties.
b) In the Properties dialog, choose the Log On tab.
c) Specify a log-on account type.
• If the services run on a local system account, select Local System account.
• If the services run on the non-administrative account, select This account, and choose Browse.
Next, in the Select User dialog, specify the non-administrative account, and click OK. Then
enter and confirm a password for the non-administrative account, and click OK.
1. Enter dcomcnfg.exe in the search field of the Windows Start menu to locate the dcomcnfg.exe
executable file.
2. Double-click dcomcnfg.exe to launch the Component Services window.
3. In the Component Services window, open the Component Services node to display the Computers
folder.
4. Open the Computers folder to display the My Computer icon.
5. Right-click the My Computer icon to display the flyout menu, and choose Properties.
6. Select the COM Security tab.
Note: If the Edit Limits... button is grayed out, update your security policy, specifically the
DCOM: Machine Access Restriction in Security Descriptor Definition Language (SDDL)
syntax policy.
7. Click Edit Default... for Access and Launch and Activation Permissions, and make your
computer-wide default security settings for the non-administrative user or group.
Option Description
Access • If the Apis services are accessed from the local computer, select Local Access.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select both Local Access and Remote Access.
Launch and Activation • If the Apis services are accessed from the local computer, select Local Launch and Local
Activation.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select Local Launch, Remote Launch, Local Activation, and Remote Activation.
8. Click Edit Limits... for Access and Launch and Activation Permissions, and make your security
settings for the non-administrative user or group. These settings apply to applications that enforce
their own permissions.
109
Option Description
Access • If the Apis services are accessed from the local computer, select Local Access.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select both Local Access and Remote Access.
Launch and Activation • If the Apis services are accessed from the local computer, select Local Launch and Local
Activation.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select Local Launch, Remote Launch, Local Activation, and Remote Activation.
9. In the COM Security tab, click Apply and OK to save the settings.
1. Open the My Computer node to display the directory folders, and select the DCOM Config folder
to display the DCOM objects.
2. Right-click the ApisHive object and choose Properties from the flyout menu. The ApisHive
Properties dialog is displayed. Click the Security tab.
3. Click Edit.. for Launch and Activation Permissions to open the Launch and Activation Permission
dialog. Select the user group Everyone, and then choose the appropriate launch and activation
permissions. Click OK.
4. Click Edit.. for Access Permissions to open the Access Permission dialog. Select the user group
Everyone, and then choose the appropriate access permissions. Click OK.
8. Repeat steps 3 through 6 and then click OK to close the <name of corporate historian> dialog.
1. Locate the Apis installation folder, and display the Configuration or Dbs subfolder: C:\Program
Files\APIS\Configuration or C:\Program Files\APIS\Dbs.
2. Right-click the Configuration or Dbs subfolder to display the flyout menu, and choose Properties
to display the Properties dialog.
111
3. Click the Security tab, and then click Edit to display the Permissions dialog.
4. Click Add to display the Select Users, Computers, Service Accounts, or Groups dialog, specify the
non-administrative user or group, and click OK.
5. In the Permissions tab, select Full Control, click Apply, and click OK.
The user or group can access the Configuration or Dbs subfolder and make updates to the APIS
configuration files.
Note: If you do not see the non-administrative user or group in the list, then click Add... to
open the Select Users, Computers, Service Accounts, or Groups dialog, locate the user
or group, and then click OK to add it.
1. Enter dcomcnfg.exe in the search field of the Windows Start menu to locate the dcomcnfg.exe
executable file.
2. Double-click dcomcnfg.exe to launch the Component Services window.
3. In the Component Services window, open the Component Services node to display the Computers
folder.
4. Open the Computers folder to display the My Computer icon.
5. Unfold the DCOM Config subfolder, locate the ApisHive instance.
6. Select the ApisHive instance, right-click to display the flyout menu, and choose Properties.
The Properties dialog is displayed.
7. In the Properties dialog, change the user account selection from System account to This user.
8. Click Browse to open the Select User dialog, specify the non-administrative user, and click OK.
The user name is copied to the Properties dialog.
9. Enter and confirm the password for the non-administrative user, and click OK.
The specified non-administrative user account is assigned to the APIS service.
1. In the Component Services console, open the My Computer node to display the directory folders,
and select the DCOM Config folder to display the DCOM objects.
2. Right-click the ApisHive instance and choose Properties from the flyout menu. The ApisHive
Properties dialog is displayed. Click the Security tab.
3. Determine whether you want to apply custom or default permissions to the selected service.
Option Description
Custom Click Edit to launch the dialog for the selected permission.
Default The Edit button is greyed out. The default values are taken as defined on the COM Security
tab on the My Computer Properties dialog.
113
a) Click Edit next to the permission type: launch and activation, access, or configuration.
b) In the corresponding Permission dialog, select the non-administrative user or group.
Note: If you do not see the non-administrative user or group in the list, then click Add...
to open the Select Users, Computers, Service Accounts, or Groups dialog, locate the
user or group, and then click OK to add it.
Option Description
Launch and Activation • If the Apis services are accessed from the local computer, select Local Launch and Local
Activation.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select Local Launch, Remote Launch, Local Activation, and Remote Activation.
Access • If the Apis services are accessed from the local computer, select Local Access.
• If the Apis services are accessed from a remote computer by the non-administrative user or
group, select both Local Access and Remote Access.
Configuration Your selection here depends on your company's IT and security policies. For special
permissions or advanced settings, click Advanced to display Advanced Security Settings for
Registry Value dialog. From this dialog, you can add users and edit permissions for each user
or user group.
5. Save and close the dialogs until you return to the DCOM Config subfolder of the Component
Services console.
6. Repeat steps 2 through 5 for the Apis service instances ApisHoneystore and ApisOPCHDA.
7. If your non-administrative user is running under a domain member computer and you have completed
all configuration procedures, restart the computer to prevent the domain group policy from overriding
your user settings.
1. Go to the APIS subfolder to locate the executable APIS Foundation x64 Setup.exe.
2. (Optional) Before launching the executable, review the documentation.
3. Double-click the APIS Foundation x64 Setup.exe executable file to start the installation wizard.
1. In the search field of the Windows Start menu, enter Environment Variables to open the
Environment Variables dialog.
2. In the System variables pane, click New… to open the New System Variable dialog.
3. In the Variable name field, enter SLBSLS_LICENSE_FILE.
4. In the Variable value field, enter the port number and fully qualified domain name of your licensing
server. Alternatively, you can enter the full path to the licensing file.
5. Click OK to return to the Environment Variables dialog.
6. Click OK to close the Environment Variables dialog.
To stop the services manually, right-click the entry and choose Stop from the flyout menu.
Save all customized Apis configuration files and data.
115
Whenever you upgrade your APIS Foundation installation, you must also upgrade and reinstall your
Avocet files. The APIS application has dependencies on certain Avocet files, which must be maintained
for the upgrade to succeed.
1. Open Windows Control Panel > Programs and Features, right-click the APIS Foundation x64
7.n entry, choose Uninstall.
The Uninstall wizard is launched.
2. Click Next.
3. At the Permanent removal of ApisHive instances screen, accept the default option (Keep all
instances) or choose Remove all instances.
If you are upgrading to a new version, choose the default Keep all instances option.
By removing all instances, you delete all entries related to the APIS Foundation installation.
Caution: Before deleting any configuration or historical data files, consider saving them to
a backup media device or different location on the local system.
4. Click Next.
5. At the confirmation screen, click Confirm to launch the uninstallation process.
If APIS instances are not completely removed, you can run the regedit.exe executable file to launch
the Registry Editor. Delete the following registry key:
• HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis
Active Directory The Windows Active Directory domain service is the preferred method. It supports Lightweight
Directory Access Protocol (LDAP) and the Kerboros V5 protocol.
Public key certificates Certificates from a certificate authority are another option, but they are not recommended
because they have expiration dates, meaning they are valid only for a set period of time.
Constantly renewing certificates can become costly if you purchase them from a security vendor.
Performance sometimes drags because data encryption can be slow.
Preshared key The preshared key is shared among the different systems and is secret. It does not require the
Kerboros protocol or a public certificate. All users who use the preshared key must manually
configure their IPsec settings to support the preshared key. The preshared key can be encrypted
through a Diffie-Hellman key exchange.
You also encrypt the data using the preferred encryption tool (IPsec is used as an example). Your IT
administrator should approve both the authentication method and encryption tool.
117
On the client side, you specify an outbound rule that blocks unsecured communication originating from
the client's IP address and that is destined to the IP address of the server.
2. Right click IP Security Policies on Local Computer to display the flyout menu, and then choose
Create IP Security Policy... to launch the IP Security Policy Wizard.
119
Note: Do not select the default rule because it only applies to earlier Windows versions.
1. In the New IP Security Policy Properties dialog, click Add... to launch the Security Rule Wizard,
and then click Next to display the Tunnel Endpoint dialog.
121
3. Choose All network connections, and click Next to display the IP Filter List dialog.
Add an IP filter
IP filters and filter actions are inclusive filters. That is, you filter for the specified property; you do not
filter out.
1. At the IP Filter Wizard , click Next to display the IP Filter Description and Mirrored property
dialog.
2. Enter a description of the filter, and choose the Mirrored check box. Then click Next to display the
IP Traffic Source dialog.
3. In the IP Traffic Source dialog, choose Any IP Address from the Source address drop-down list,
and click Next to display the IP Traffic Destination dialog.
4. In the IP Traffic Destination dialog, choose My IP Address from the Destination address
drop-down list, and click Next to display theIP Protocol Type dialog.
5. In the IP Protocol Type dialog, choose Any from the Select a protocol type drop-down list, and
click Next.
6. Click Finish to close the wizard and return to the IP Filter List dialog.
123
7. Review the entries, and click OK to display the New IP Filter List entry.
1. In the IP Filter List dialog, click Next to display the Filter Action dialog, and then click Add to
launch the Filter Action Wizard.
2. In the Filter Action Wizard, click Next to display the Filter Action Name dialog.
3. In the Filter Action Name dialog, choose Negotiate Security, and then click Next to display the
Communicating with computers that do not support IPsec dialog.
125
5. Choose the Integrity and encryption security method.
6. Click Next and then click Finish to complete the Filter Action Wizard.
You are returned to the Filter Action dialog, with the just created filter action listed.
7. Next, you specify an authentication method.
1. In the Filter Action dialog, select the filter action entry you want to enable, and click Next to display
the Authentication Method dialog.
1. Launch the Local Security Policy window, and double-click the IP Security Policies on Local
Computer folder to display the available policy or policies, as shown in the following example:
1. Launch the Local Security Policy window, open the Windows Firewall with Advanced Security
folder, and then expand the Windows Firewall with Advanced Security - Local Group Policy
Object.
The Inbound Rules entry is displayed.
127
2. Right click Inbound Rules to display the flyout menu, and choose New Rule... to launch the Rule
Type dialog of the New Inbound Rule Wizard.
3. Select the rule type (in this example, Custom), and click Next to launch the Program dialog.
5. Choose the Allow the connection if is secure action, and click Customize... .
The Customize Allow if Secure Settings popup dialog is displayed.
129
6. Choose the Require the connections to be encrypted setting, but do not select the Allow the
computers to dynamically negotiate encryption. Then click OK to return to the Action dialog.
7. Click Next to display the Users dialog, but do not make any selections. In the Users dialog, click
Next to display the Computers dialog, but do not make any selections. Finally, click Next to display
the Profile dialog.
131
Note: You can select which properties (columns) of the rule to display by choosing View >
Add/Remove Columns... from the right-click flyout menu of Inbound Rules in the Local
Security Policy window.
1. To complete the firewall rule, verify in the Local Security Policy window that the following properties
(columns) have the corresponding values assigned to them.
Property Value
2. To update a rule property, right click in the property column display the flyout menu, choose
Properties.
The Test Rule Properties dialog is displayed with the General tab selected.
To block unsolicited inbound packets... Click the Advanced tab, and in the Edge traversal panel, choose Block
edge traversal from the drop-down menu.
4. After you have verified your changes, click Apply and then OK to close the Test Rule Properties
dialog.
133
The new property values are displayed in the corresponding columns.
1. Follow the guidelines as described from Establish the security policy to Assign the IPsec policy,
but note the following exceptions in Add an IP Filter:
a) Refer to the following example of an IP Filter Properties dialog that depicts values for the
client's source and destination addresses:
b) For the client's Source address, specify My IP Address instead of the server's Any ID Address.
c) For the client's Destination address, specify the actual IP address of the server. (The server
uses the value My IP address to point to its own location.)
2. In the Local Security Policy window, define and assign outbound firewall rules using the guidelines
in Define the inbound firewall rule and Complete the inbound firewall definition.
3. After defining the security policy and firewall rules on the server and client, test your security settings.
Note: The HF Player utility is reserved for use by the Avocet deployment team.
The HFPlayer is designed to run on the same system where your corporate historian is installed.
To see the results of the data load and simulation run, you should have access to and be familiar with
the Apis Management Studio feature.
Folder/File Description
Data This folder contains the data files (CSV format) from different modules.
Player This folder contains the executable and APIS and OPC modules that are required to
launch the player and load the data.
Run.bat The batch file that loads the modules and starts the data run. Its script is as follows:
Tip: To ensure the batch file works correctly, maintain the folder structure exactly as packaged
in the zipped file.
3. (Optional) To modify the batch file Run.bat, review the following information.
The batch file Run.bat script is shown below:
@ECHO OFF
IF "%1"=="" GOTO USAGE
Player\HFPlayer.exe /create /dir:Data /frequency:15 /url:opcda://Prediktor.ApisOPCServer.%1
/progid:Prediktor.ApisLoader.%1
135
GOTO EOF
:USAGE
ECHO Usage: Run.bat ^<InstanceName^>
ECHO Example: Run.bat CorporateHistorian1
PAUSE
:EOF
Use the following table as guidelines in determining which properties to edit.
Property Description
Frequency Determines the refresh rate, in seconds, in which the simulated data points are initiated
4. Before launching the batch file, verify that the following components are running:
• High frequency infrastructure manager service
• Avocet HF Store
• corporate historian
6. Because the simulated data only runs during the open session, execute the batch file for each
session you want to run the simulated data.
In addition to running the simulated data, the batch file creates modules and accompanying items,
both of which you can display in the Apis Management Studio, as shown in this extract from the Apis
Management Studio after the data has been loaded:
137
Each item contains tag mapping definitions for different transaction properties, as seen in this Excel
excerpt of a CSV file for an item taken from the Data subfolder:
You can also open the same data file in Notepad and view its contents, as seen in this example:
Appendix 6: Troubleshooting
Problems in the high frequency implementation can result from connectivity issues, sync issues,
licensing issues, and so forth.
You can check for connectivity issues by installing an OPC client like the UaExpert to check security
and browse the nodes of the Avocet HF store and the corporate historian. You can check connectivity
with the corporate historian through the Apis Management Studio.
You can monitor the synchronization process through the messages that the AvocetHFSync service
logs in the Windows Event Viewer console. You can monitor tag values dynamically through the Apis
Management Studio.
139
• ApisHive.Calcs
• Prediktor LicenseManager
1. To launch the Event Viewer, type event viewer in the Start menu’s search field and press Enter.
The Event Viewer console is launched, as shown in this screenshot example:
2. Scroll the event category, typically Administrative Events, until you find the event source and
message associated with the issue.
The Avocet HF Store can then read the system variable and start up successfully.
1. If you receive the error message that no Avocet HF store is defined, then try the following:
• Verify in your Connection Manager that you have an Avocet HF store instance with a valid
connection string.
• Browse the ApisHive node in the Connection Manager and/or in the UaExpert OPC client.
• Check whether the connection's security settings are compatible.
2. If you receive the error message regarding the license server, then try the following:
3. If you receive the error message Authentication failed for user userName, then try the following:
• Open the HFIManager.exe.config file, and check whether the SystemUser and SystemPass keys
match the credentials used to log into the application ID.
• In the HFIManager.exe.config file, ensure that the ConfigDir key points to the correct path of the
AppConfig.xml.
4. If you receive the Error 5: Access is denied message, then try the following:
• Verify that the user account is defined on the system and has the proper privilege (typically
administrator privilege).
• In the HFIManager.exe.config file, verify that the correct ApplicationId key is defined and that the
ConfigDir key points to the correct Config path.
• Verify that the AppConfig_projectLayer.xml file resides in the Config directory specified by the
ConfigDir key.
1. Launch the Apis Management Studio and connect with your ApisHive instance (Avocet HF Store).
2. Select the corresponding TF_CorporateHistorian module instance to display the list of items.
3. Locate the items TF_CorporateHistorianinstance.#Session-State# and
TF_CorporateHistorianinstance.#Subscription-State#.
4. Verify that their values read is_connected.
1. Launch the Apis Management Studio and connect with your ApisHive instance (Avocet HF Store).
2. Select the corresponding TF_CorporateHistorian module instance to display the list of items.
3. Locate the tag whose value you want to monitor.
It is displayed in the Adaptive Items List, as shown in this example screenshot:
141
4. Monitor the value as it changes dynamically to note any unusual changes.
Data flow configuration applies to any Avocet item type that is subject to tag mapping. You can select
these item types from the Wells and Facilities node in the Navigation Tree. The item types that are
143
subject to tag mapping extend to organizational units, geographical units, routes and stops, subsystems,
and desks.
Note: If you are loading SCADA data from an OPC UA source system other than a corporate
historian or if you are not interested in the Avocet HF Store features, then use the Tag Mapping
screen to define and load the tag maps that bind values to selected transactions and properties.
In the Navigation Tree, see Administration > Interfaces > Measurement > Tag Mapping.
Note: Depending on your system’s processor (32-bit or 64-bit), you may need to run the 32-bit
version of the Avocet client (AvocetVM32.exe) or the Avocet Configuration Tools utility
(ConfigTools32.exe) to use the loader functions in the Avocet client or Avocet Configuration
Tools utility.
• Ensure that you have the proper privileges to run the synchronization process and other APIS-related
services. You must be logged into the Avocet client with administrator privilege. Alternatively, if you
do not have administrator privilege, adjust your DCOM security settings so that you can run
synchronization and other APIS-related services. See the High Frequency Infrastructure Manager
Service help topic for more information.
• Define the Avocet HF Store and the corporate historian in the Connection Manager of the Avocet
client. See the Connection Manager documentation.
• Verify that the Avocet HF Store, corporate historian, and the high frequency infrastructure manager
service (HFIMS) are running.
1. To access the Data Flow screen for an Avocet item, go to the Wells and Facilities node, select
the item to reveal its Item Edit screen.
Note: The Data Flow screen is not available to all items listed under the Wells and Facilities
node.
2. In the ribbon toolbar under Home > Linked Screens, select Data Flow.
The Data Flow screen for the item type is displayed.
145
Although they share similar features, the Data Flow screen addresses a specific high-frequency
workflow that uses the Avocet HF Store. If your data sources include a data historian or some other
OPC UA source, but you are not using the Avocet HF Store, you specify and load tag data in the
Administration > Interfaces > Measurement > Tag Mapping screen. See the Connection Manager
documentation.
Note: Tag mapping is not required if your data source is the Avocet database only.
In this example, the tag map relation from physical data source (meter) to the database destination is
as follows:
Source real-time value Corporate historian tag Avocet HF Store tag Database property
147
These items include the ones listed in the following screenshot:
1. In the Navigation Tree, under Wells and Facilities, select the Avocet item type whose transactions
and properties will be mapped to the corporate historian tag.
When you select Well and Facilities > <itemType>, the corresponding Item Edit screen is displayed.
In this example, a completion item is selected and its Item Edit screen is displayed.
The Tag Mapping Tools tab in the ribbon toolbar contains the common menu options that apply
to the data flow configuration. The Linked Screens tab contains the link to the various Alarms
screens where you define alarm limits for selected transaction types and properties. The Templates
tab lets you apply existing .XML template files to the data flow configuration or save the current
configuration as its own template. .
You can click the Show details check box to display the full range of data columns, denoted by
check marks in the following extract:
149
How to map tags manually
This section shows how to map tags manually for high-frequency implementation without a data loader
and pre-existing tag mappings.
If you are entering new tag mappings for a high-frequency implementation, without a data loader and
pre-existing tag mappings, you typically enter the tag maps manually row by row.
Your workflow in the Data Flow screen looks similar to the one depicted in this following diagram:
If you want to create a high-frequency implementation for a corporate historian that uses the OPC UA
protocol and has its tag mappings already defined through the Administration > Interfaces >
Measurement > Tag Mapping interface, see How to add previously defined tag mappings to the Data
Flow Configuration screen.
Specify transaction and property in the Avocet database and populate HF Store tags
This task shows how to select the transaction and property in the Avocet database to map to a particular
corporate historian tag. The Avocet HF Store automatically generates a placeholder tag.
1. In the Navigator list, select the item to which the tag will be mapped.
2. In the ribbon toolbar, click Home > Tag Mapping Tools > New to open a blank row.
3. In the Transaction Type drop-down list, select the transaction type to which you are mapping the
corporate historian tag.
If a transaction type does not display, verify your database connection.
4. Select the specific transaction property of the transaction type for which the tag value is returned.
As soon as you specify a transaction property, the Name field for the Avocet HF Store is
automatically populated with a tag having the following format:
<targetItemName><transactionType>< transactionProperty>
Map corporate historian tags with Avocet item and transaction properties
This task shows how to map a corporate historian tag with the Avocet item and transaction properties.
1. Under the Corporate Historian heading, click the Name field to display the Tag Browser window.
A summary view of the Tag Browser window is shown below. The top-level view presents the item
categories and corresponding browse node categories.
2. To view the available tags for an item, click the plus sign (+) next to the item category to reveal the
list of tags and associated browse nodes.
You can drill down into the nested categories of the individual tag definition to see its components
and their properties by clicking the remaining plus signs.You can use the Name and Node ID filters
to search for specific criteria.
151
3. Select an appropriate tag for the item, transaction type, and transaction property. Ensure that it is
identified with the particular item whose transaction property to which you are mapping it. Click OK
to copy it to the Tag Name field under the Corporate Historian heading.
4. In the Unit Of Measure drop-down list, select the unit of measure that the corporate historian
records for the transaction property.
The listed units of measure should have corresponding Avocet storage units of measure. If an
Avocet storage unit of measure does not exist for the unit of measure recorded by the corporate
historian, then the Avocet administrator or deployment engineer should create one in the
implementation layer through the Type Editor in the Avocet Configuration Tools utility (Configuration
Editor Tools > Type Editor).
If no unit is selected from the display list, then a system default UOM is applied.
The Unit of Measure drop-down list is blank if the item’s transaction property does not have a unit
of measure code list associated with its property class. As a general reference, you can check the
property classes and their UOM lists in the Avocet Configuration Tools utility (Configuration Editor
Tools > UOM Editor options).
5. In the Tag Map Access drop-down column, choose Read or Read/Write.
The Tag Map Access selection indicates whether the specific tag mapping can be updated by the
setpoint API. A Read assignment means that the tag map cannot be modified, while a Read/Write
assignments means that the setpoint API can change the tag map. The default value is Read.
6. In the ribbon toolbar, you can click Home > Tools > Save to save the row, or if specifying additional
data-loading options, continue to the next topic.
• Node ID
• Time Offset
• Load to Avocet
• Tag Map Type
• Event Aggregation interval(s)
The corporate historian displays the following field: Node ID.
Complete detail data fields for Avocet HF Store and corporate historian
This task shows how to update the Time Offset field, use the Load to Avocet option, select the
aggregate computation method to apply, set how often the data from the HF Store is copied to the
Avocet database, and save the results.
The Node ID field refers to the node ID that stores the corresponding tag value from the corporate
historian. It is populated automatically after you select the corporate historian tag, save the record,
and the AvocetHFSync process is run. The node ID enables the Avocet HF Store to acquire the tag
data from the corporate historian.
The Node Id field for the corporate historian is populated automatically. The Node Id is written in the
format <namespace index>; <string identifier>: for example, ns=2;s=V|MPFM-2349.VX_Meter.VX_qo_lc.
1. In the Time Offset field, enter the time (in seconds) that you want to adjust the timestamps of the
incoming data from the corporate historian. The default value is zero.
To adjust the timestamp forwards, enter the positive numeric value without the sign. To adjust the
timestamp backwards, enter the numeric value with the negative sign (-).
To illustrate, if the data from the corporate historian originates in a different time zone, you can
enter an appropriate time offset value for loading it to the Avocet HF Store. For example, assume
your local time zone is US Central Standard Time and the corporate historian is located in a US
Mountain Time Zone. When preparing the incoming data for loading, you can enter the offset value
3600 to account for the time zone difference. Similarly, if the data originates from US Eastern
Standard Time, you would enter the offset value -3600 to account for the time zone difference.
2. Select the Load to Avocet option if you want to load the tag data received from the corporate
historian to the Avocet database.
3. You can specify an aggregation method to apply to the raw data received from the Avocet HF Store
over a period of time, usually to store it at a lower frequency in the Avocet database.
In the Tag Map Type drop-down list, select the aggregate computation method to apply to the
different values sent by the Avocet HF Store across multiple time intervals. The selected aggregation
method generates a single value from the multiple values that are loaded.
153
Choose from among the following methods:
Tag Map Type Description
Average Data is weight averaged (it includes the standard deviation) as per the OPC 2.0 standards
from source frequency to the destination aggregation interval. For example, 60 records at 1
minute intervals would be aggregated to an hourly record using the weighted averaging method.
Copy Data is copied directly from the source at its sample frequency if the transaction type is an
event. All the tag values are copied, including the time stamp.
Note: When you choose Copy, leave the Event Aggregation Interval(s) field blank.
First The first data point encountered during data read in the aggregation interval is determined
and written as the destination value.
Last The last data point encountered during data read in the aggregation interval is determined
and written as the destination value.
Max Data is sampled at source frequency, and the maximum value during the interval is written
as the destination value. For example, the maximum value in 60 records would be the value
for the event aggregation per 1 hour.
Maximum Actual Time Data is sampled at source frequency, and the maximum value at the particular time is written
as the destination value.
Median Data is sampled at source frequency, and the median value is determined. The median is the
middle value of a set of data containing an odd number of values, or the average of the two
middle values of a set of data with an even number of values.
Min Data is sampled at source frequency, and the minimum value during the interval is written as
the destination value. For example, the minimum value in 60 records would be the value for
the event aggregation per 1 hour.
Minimum Actual Time Data is sampled at source frequency, and the minimum value at that particular time is written
as the destination value.
Value at Period End The value at the start of the aggregation interval is determined by interpolation and written as
the destination value. The difference between this and the First aggregation method is that
the final value depends on the sample value before the aggregation period begins and the
next sample value the application reads. In the case of the First method, it simply reads the
next sample value it encounters.
Value at Period Start The value at the end of the aggregation interval is determined by interpolation and written as
the destination value. The difference between this and the Last aggregation method is that
the final value depends on the next value after the aggregation ends and the last sample value
the application reads. In the case of the Last method, it simply reads the last sample value it
encounters.
4. In the Event Aggregation Interval(s) field, accept the default value (in seconds), or enter a different
interval value.
The Event Aggregation Interval(s) field indicates how often the data from the HF Store is copied
to the Avocet database.You can think of it as the destination frequency because it may be a different
value from the frequency at which the corporate historian transmits values.
It defaults to the value associated with the selected transaction type. For example, for the Daily
Meter Read transaction, it is 86,400 seconds (24 hours).
If you have chosen the Copy tag map type, leave this field blank.
5. Choose Home > Tag Mapping Tools > Save to save the record.
1. In the Navigation Tree, select the item type under the Wells and Facilities node that has the tag
mappings from the corporate historian.
2. Access the Data Flow Configuration screen (Home > Linked Screens > Data Flow).
The tag mappings from the corporate historian should populate with their corresponding transaction
types and properties for the selected item. The Avocet HF Store tag Name column is blank.
3. To populate the Avocet HF Store Name column, choose Home > Tag Mapping Tools > Fill HF
Store.
The corresponding Avocet HF Store tags for the transaction types and properties should be filled
for every tag map entry of the item.
4. Choose Home > Tag Mapping Tools > Save.
Note: The XML markup that supports the template processing is in the
<implementationFolder>\AvocetVM\Config\HFConfig_base.xml file under the
<TransactionTemplateDefinition> node.
1. In the Data Flow Configuration screen, open the item record containing the Transaction Type,
Transaction Property, and Avocet HF Store Tag Name entries that you want to save as a template.
155
2. Choose Home > Templates > Save As Template to open the Save As dialog.
3. Specify a template name and directory location for the template, and click save it with the .xml
extension.
1. In the Navigation tree of the Data Flow screen, select the item that you wish to apply the existing
tag mapping entries to.
2. Click New to open a new record.
3. Choose Home > Templates > Apply Template to display the Open dialog.
4. Browse for and select the XML template that you want to apply, and click Open.
The relevant tag map entries are copied to the new record.
5. In the Data Flow screen, click Home > Tag Mapping Tools > Save to save the new record with
the template entries applied.
Note: The notification feature applies to high-frequency alarms. It is not enabled for alarms on
low-frequency or historical data.
One email or messaging recipient can belong to multiple groups. The relation between the groups and
the recipients is many-to-many.
157
<connectStringForSsas>[Connection string that allows SSAS to connect
to Avocet DB> </connectStringForSsas>
</database>
<mailSettings>
<!-- For details, see http://msdn.microsoft.com/en-us/library/ms164240(v=vs.110).aspx -->
<smtp from="[Specify the from address for outgoing e-mails]">
<network host="[Specify the hostname of the SMTP mail server to use for SMTP transactions]"
/>
<!-- Optional parameters, see: http://msdn.microsoft.com/en-us/library/ms164242(v=vs.110).aspx
1. In the Navigation Tree, select Administration > Notifications > Mail Recipient to display the Mail
Recipient Item Edit screen.
2. Choose Home > Actions > New to open a new record.
3. Adjust the As Of Date, Start date, and End date values as needed.
These dates should correspond with the effective dates of the alarm settings and with any associated
mail group.
The dates in the Date Break column change accordingly.
4. Required. Enter a name for the recipient in the Name field under the Date Break column heading.
5. Required. Enter an email address or SMS or MMS gateway address in the Email address field
under the Date Break column heading.
The typical format for an SMS gateway address is Mobile-Number@ServiceProviderAddress. The
address may include the message format, such as SMS or MMS: for example,
[email protected] (MMS) for T-Mobile account.
You can search for and investigate several websites for a list of SMS gateway addresses.
6. Optional. Click View All Properties to display the Description field, and enter a unique description.
7. Click Home > Actions > Save to save the record.
1. In the Navigation Tree, select Administration > Notifications > Mail Group to display the Mail
Group Item Editscreen.
2. Choose Home > Actions > New to open a new record.
3. Adjust the As Of Date, Start date, and End date values as needed.
These dates should correspond with the effective dates of the alarm settings and any target email
recipients.
4. Required. Enter a name for the group in the Name field under the Date Break column heading.
5. Required. Select the Enabled check box to enable the group.
You can leave it unselected if you are not ready to enable the group to receive email notifications.
6. Optional. Click View All Properties to display the Description and Rate Limit fields, and enter
an informative description of the new mail group.
7. Optional. In the Rate Limit field, enter the frequency in seconds that the group receives active
alarm notifications.
For example, if you specify 300, the group receives the current active alarm notifications every 5
minutes. Alarm notifications that occur during the time span, but are no longer active, are not sent.
If no alarms are active at the interval limit, then you do not receive alarms until they become active
again.
If you leave the field blank, the group receives active alarm notifications as they occur.
8. Choose Home >Actions > Save to save the record.
159
Link mail group with recipients
After you have defined your mail group, you can link it with individual mail recipients, system roles,
and/or system users.
To link a mail group with one or more recipients, follow these steps:
1. In the Mail Group Item Edit screen, select the mail group from the Navigator list.
2. Click the Links tab to open the Links pane.
3. If the message No active links is displayed, then click View linked only to display the Group-User
Link object. Otherwise, skip to step 4.
4. Click the Add Link icon to open the Select Item window.
5. In the Select Item window, select from among the following recipients to link with this group:
• specified mail or messaging recipients
• system roles such as field supervisor, field operator, read-only, and so forth
• system users who have been defined
6. Click OK. The selected recipient or recipients are added to the Links tab.
7. Click Home > Actions > Save to save the updated record.
1. In the Mail Recipient Item Edit screen, select the mail recipient from the Navigator list.
2. Click the Links tab to open the Links pane.
3. If the message No active links is displayed, then click View linked only to display the Group-User
Link object. Otherwise, skip to step 4.
4. Click the Add Link icon to open the Select Item window.
5. In the Select Item window, select the mail group(s) that you want to link with this specific notification
group.
6. Click OK. The selected group or groups are added to the Links tab.
7. Click Home > Actions > Save to save the updated record.
Note: Email notifications that are transmitted immediately may display on the Mail Queue
Viewer viewer for a second or two.
Alarms
The corporate historian supports the OPC UA limit alarm type, watch dog alarm type, and off normal
alarm type.
Caution: The alarm settings are intended to be informative only. They are not for safety-critical
operations.
You can specify an alarm range to an item for each transaction type and property combination to which
you have mapped a tag.The data source or its frequency does not matter. However, only high-frequency
alarms are stored in the database.
For the OPC UA limit alarm type, the corporate historian supports the exclusive limit alarm. This limit
alarm can be in only one state at a time. That is, if the alarm exceeds the High High limit, then it is
classified in the High High state only, not also in the High state, which it has also exceeded.
The following example assumes a limit alarm type. The Data Flow Configuration screen shows the
rows containing the transaction types and their properties together with their respective tag maps for
the item MPFM-2349. You can assign an alarm range to each Transaction Type and Transaction
Property row.
161
For the limit alarm, clamping restricts the values returned by the HF Store to a defined limit, thereby
excluding values that are outside of an acceptable range and might be deemed unreliable. You have
the option of clamping or restricting the alarm range to a specified high or low value, or to both high
and low values. Values that exceed the specified clamp high or low value are reset to the clamp value
and transmitted. For example, if you clamp the high value of a sensor’s alarm range at 3.00 and a
reading of 3.11 is received, that data point is reset to 3.00 and then transmitted.
Alarm and clamp values are in the same units of measure as the transaction values to which they are
mapped. Specified units of measure are not required for alarm and clamp values.
A watchdog alarm is triggered when a monitored value does not change over a specified time. For
example, if you are monitoring a flow meter that is measuring the flows from multiple links, you expect
the flow rate to change over time. If the flow rate does not change over a specified time, then it suggests
that an error has occurred--perhaps in the meter, in connectivity, or in another component. As with
other alarm types, you assign a notification group to receive the alert when the alarm is triggered.
An off normal alarm monitors an on/off or active/inactive condition or any change from a standard or
normal value. For example, you can set an off normal alarm to alert when a quantity, such as gas
volume, changes from a specified normal value. Like other alarm types, you assign a notification group
to receive the alert when the off normal alarm is triggered.
163
In this example, you can assign alarm limits to completions and multiphase meters. If necessary, you
(or the Avocet administrator) can add additional item references to the VAL_ALM_LIMIT transaction.
You would select Meter Read from the Type Name drop-down list and Gas Volume Rate from
the Property Name drop-down list.
4. Based on industry guidelines and your knowledge of the current state of this transaction property,
use the following guidelines to set the alarm range:
Alarm setting Description
High High Setting for values that exceed a numeric level considered to be close to the maximum for the
transaction property that you are monitoring. If you set a high high alarm, you must also specify
a high alarm.
High Setting for values that exceed a numeric level considered normal for the transaction property
you are monitoring
Low Setting for values that fall short of a numeric level considered normal
165
Alarm setting Description
Low Low Setting for values that fall short of a numerical level considered close to the minimum for the
transaction property you are monitoring. If you set a low low alarm, you must also specify a
low alarm.
Clamp Low The lower limit of returned values that are loaded or acknowledged. Values that fall short of
the Clamp Low value are ignored. Instead they are converted to the specified Clamp Low
value, transmitted, and loaded.
Clamp High The upper limit of returned values that are loaded or acknowledged. Values that exceed the
Clamp High value are ignored. Instead they are converted to the specified Clamp High value,
transmitted, and loaded.
For example, if the Clamp High setting is 101 and the data point is 110, then its instance is
converted to 101 and passed forward.
5. In the Notifications pane, click the ellipse in the Notification Group text box to open the Select Item
window for the Notification group.
Remember that the alarm and clamp values are in the same units of measure as the transaction
values to which they are mapped.
7. In the ribbon toolbar, click Home > Tools > Save to save the alarm settings.
167
You should already be familiar with APIS configuration, OPC UA clients, and SSL trust certificates.
1. If you do not already have an OPC UA client, download the UaExpert OPC UA client from the link
shown below:
https://www.unified-automation.com/products/development-tools/uaexpert.html
2. Follow the instructions in the APIS Management Studio Help topic Event Historian to define and
configure the historian in the Registry Editor.
3. Establish a secure connection between your OPC UA client and the APIS event historian.
Note: To enable the secure connection, verify that APIS has the client certificate of your
OPC UA client in its C:\Program Files\APIS\Config\ApisHive\pki\trusted folder.
4. View the alarms and events in the corresponding window of your OPC UA client.
1. In your alarms screen (Limit, Watchdog, or Off Normal), open the item record containing the
transaction type, transaction property, and alarm settings including the notification group, all of
which you want to save as a template.
The following example shows Limits alarm screen:
1. In the Navigator list of the specific screen (Limit, Watchdog, or Off Normal), select the item to which
you want to apply the alarm settings.
2. Choose Home > Templates > Apply Template to display the Open dialog.
3. Browse for and select the XML template that want to apply, and click Open.
The alarm setting entries are copied to the new record.
4. In the Alarms screen, click Home > Tag Mapping Tools > Save to save the new record with the
template entries applied.
169
<property name='UNIQUE_ID' type='FIXED' value='0' transformType='property'
transformClass='Slb.Avocet.DataAcess.Loader.Transform'
transformMethod='ColumnsToHash'
transformParam='$ITEM_ID,$TYPE_NAME,$PROPERTY_NAME'/>
<property name='START_DATETIME' type='FIXED' value='01/01/2012' />
<property name='END_DATETIME' type='FIXED' value='01/01/9000' />
</row>
</task>
The <row> element specifies the transaction type VAL_ALM_LIMIT. The <property> elements define
the item type (COMPLETION). They also define the alarm settings: CLAMP_LOW, LOW_LOW, and
so forth. Most important, they include the UNIQUE_ID property. Among other attributes, the UNIQUE_ID
property includes the following:
Attribute Description
transformParam Use the variables $ITEM_ID, $TYPE_NAME, and $PROPERTY_NAME in all instances to point
to the columns ITEM_ID, TYPE_NAME, and PROPERTY_NAME in that order. These variables
are required to generate the unique ID for the alarm transaction.
This example loader file connects with alarm transaction data in an Excel spreadsheet through the
OleDB interface:
<sourceConnections>
<sourceConnection id='Data' sourceType='oledb' connectionString=
'Provider=Microsoft.ACE.OLEDB.12.0;Data source=D:\FilePath to
Data.xls;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";'>
</sourceConnection>
</sourceConnections>
The loader calls alarm transactions such as the ones in the following examples captured in an Excel
spreadsheet:
Note the Unique ID attributes of each row. They are in the following format:
Item.TransactionType.TransactionProperty.
You can load these alarm transactions through one of Avocet’s data loader interfaces using the OleDB
interface. For example, you can open the Avocet Configuration Tools utility and choose the Data Tools
> Data Loader node to open the Data Loader screen. Specify your XML loader file, and select the
tasks you want to import, as seen in the following excerpt:
When defining the XML markup for your loader file, you can use the following loader file as an example:
<?xml version="1.0" encoding="utf-8"?>
<task id='TagMappingImport' sourceConnectionId='Data'>
<sourceSelect>
171
<![CDATA[
SELECT * FROM [TAG_MAPPING_IMPORT$]
</sourceSelect>
<row name='Tag Mapping' typeClass='TRANSACTION' type='TAG_MAP'
allowInsert='True' >
<property name='ITEM_ID' type='DATA' colIndex='0' lookupType='SCADA'
lookupProperty='NAME' />
<property name='TARGET_ID' type='DATA' colIndex='2'
lookupType='MPHASE_METER' lookupProperty='NAME' />
<property name='TRANS_TYPE' type='DATA' colIndex='3'/>
<property name='TRANS_PROPERTY' type='DATA' colIndex='4' />
<property name='NAME' type='FIXED' value='0' transformType='column'
transformClass='Slb.Avocet.DataAccess.Loader.Transform'
transformMethod='ColumnsAppendValues' transformParam='$2,$3,$4'/>
<property name='NODE_ID' type='DATA' colIndex='10'/>
<property name='TAG_ID' type='DATA' colIndex='11'/>
<property name='UOM' type='DATA' colIndex='12' />
<property name='START_DATETIME' type='FIXED' value='01-01-1994' />
<property name='END_DATETIME' type='FIXED' value='01/01/9000' />
<property name='ROW_STATUS' type='FIXED' value='RAW' />
</row>
</task>
Under the Name property, its transformParam attribute contains the variables $2, $3, and $4. They
refer to the ITEM_NAME, TRANSACTION_TYPE, and TRANSACTION_PROPERTY.
An example high-frequency tag map definition in Excel spreadsheet format is shown below.
Like the alarm transactions, you can load these tag maps, properly defined, through one of Avocet’s
data loader interfaces using the OleDB interface.
For example, you can open the Avocet Configuration Tools utility and choose the Data Tools > Data
Loader node to open the Data Loader screen. Specify your XML loader file, and select the tasks you
want to import, as seen in the following excerpt:
You can relate the label text to error and status messages displayed in a screen’s status pane or in
the error details.
General guideline
This topic discusses what to check when experiencing connectivity problems.
173
Connectivity problems can be the source of different types of issues. Always verify that the Avocet HF
Store and corporate historian are running.
In the Data Flow Configuration screen, you can choose Home > Tag Mapping Tools > Test
Connection to see the current status of the Avocet HF Store and your corporate historian. If the
components are live and connected, the Test Connection option return messages like the following:
Compare the model with the example from the APIS Management Studio:
A more elaborate tag mapping definition contains a unit of measure, which requires a calculation to
be performed. The unit of measure is assigned during the calculation phase, and the tag is passed
on to its output format.
In the example, the tag originating from the corporate historian does not show a unit of measure, but
Avocet automatically calculates one for it based on the transaction type and property.
Other
This topic shows several diagrams that outline the basic aspects of the Apis Management Studio.
175
176 Avocet High Frequency Infrastructure
177
About calculations
The HFConfig_base.xml file supplies the basic configuration parameters for the Avocet high frequency
(HF) implementation.
It includes configuration data that supports the synchronization of the Avocet HF Store. The
synchronization process enables raw values from corporate historians to be stored in an Avocet-friendly
format in Avocet HF Store tags.
The HFConfig_base.xml file contains six main nodes:
• Historian configuration definition
• Synchronization validation timeout interval
• Calculation validation for custom calculation validations
• Item link chain for applying calculations to the Avocet HF Store
• Framework for and an example of a calculation definition
• Template definition
You can generally leave the historian configuration, item link chain, and template configuration sections
as they are. You would only need to modify these nodes if attempting a special implementation of the
high-frequency workflow or if your organization structure is different from the one specified in the item
link chain.
As an Avocet administrator or deployment engineer, your chief reason to access the HFConfig_base.xml
file is to supply the XML framework for customized calculation definitions.
Extensibility
This topic discusses how you can extend the HFConfig_base.xml file so that it is unique to your
implementation layer
Your implementation layer’s AppConfig_xxx.xml file references the HFConfig_base.xml file and its
out-of-the-box extension HFConfig_OG_STD.xml under an <HFConfig> node.
You can extend the HFConfig_base.xml file so that it is unique to your implementation layer: for
example, you can have an HFConfig_xxx.xml, where xxx denotes your unique implementation layer.
HistorianConfigurations
The <HistorianConfigurations> node contains configuration definitions of each supported historian
type in its unique XML stanza. Another stanza contains the actions, such as alarms and calculations,
that the historian's synchronization process supports. The last stanza in the node contains the filter
criteria for applying the appropriate SCADA items to the historian.
The <HistorianConfigurations> node contains the following stanzas:
• <HistorianConfiguration>
• <AssignedActions>
• <Filters>
The attributes of the default <HistorianConfiguration> are listed in the following table:
Attribute Description
Assembly The .NET unit of deployment (.dll) for the historian. For this
default configuration, it is Slb.Avocet.HFApisHistorian .dll.
The <HistorianConfiguration> definition for APIS also contains custom module definitions defined in
a CDATA section. The custom module definitions are programmed outside the XML markup. Any
additional <HistorianConfiguration> definitions would also contain their unique custom module definitions
in their own CDATA sections.
The <AssignedActions> stanza specifies the items that the historian's synchronization process supports.
They include the following <string> elements:
• Tags
• Alarms
• Calculations
• Logging
The default APIS configuration supports all four items. The OsiSoft PI configuration supports only the
synchronization of tags.
179
The <Filters> stanza defines a single item filter and a regular expression filter. The <SingleItems>
element contains the following subelements:
Subelement Description
ItemType the item to which the filter applies. It always applies to the SCADA item type.
LogicalOperator Options are AND or OR. The operator applies if multiple filter elements are defined under the
<SingleItems> element. For example, you can filter against multiple properties of the SCADA
item type.
Operator the operator specifying the relation between the property and the string value. Choices are
Equal, LessThan, GreaterThan, LessThanOrEqual, GreaterThanorEqual, In, IsNull, and
IsNotNull.
String denotes the filter value to apply to the specified item property
The regular expression filter <FilterRegex> is used to search for values of a specified item type
property. It can be used alone or in conjunction with the <SingleItems> filter. The regular expression
<FilterRegex> contains the following attributes:
Attributes Description
LogicalOperator Options are AND or OR. The operator applies if multiple <FilterRegex> entries are
defined.
Column denotes the item property to which the regular expression filter applies
Validations
The HFConfig_base.xml file supports additional custom calculation validation definitions.
By default, the high-frequency implementation validates each calculation parameter and each calculation
name for uniqueness.You can add custom calculation validations. Custom calculation validations take
two forms:
• Static calculation validation
Static calculation validation is a global validation type. It is a single validation routine that applies to
multiple calculation instances regardless of item type. For example, this validation type can take the
form of an additional calculation parameter, such as one for status reporting, that must be satisfied
before all calculation definitions are validated. You specify a static calculation validation ID in the
HFConfig_base.xml file.
• Ad hoc calculation validation
Ad hoc calculation validation is a validation routine that is specific to an individual calculation class
for a specific item type. Ad hoc calculation validations are applied to calculations that have unique
constraints that must be satisfied. The ad hoc calculation validation is enabled by setting the
SupportsValidation attribute equal to "true" in the <CalculationReference> element.
Both custom calculation validation types share a timeout interval that specifies the duration within
which the validation must occur or otherwise be skipped.
The <SynchronizationValidation> element is provided so that you add a custom validation step before
the high-frequency synchronization occurs. The validation step considers tags, alarms, and calculations
Attribute Description
Timeout the interval in milliseconds for each custom validation to complete. If the validation does not
complete in the specified interval, then the validation is discarded, and the synchronization process
times out.
In the HFConfig_base.xml file, this value is set by default to Never times out. You can change it
to an appropriate interval in your project layer's HFConfig file for your custom calculation parameter.
Assembly the DLL file that supports the deployment of the custom calculation validations
(Slb.Avocet.HFCalculations.dll in the OOB deployment)
The <CalculationValidation> element contains the definition for the static calculation validation. Its
attributes are described in the following table:
Attribute Description
Timeout the interval in milliseconds for each custom validation to complete. If the validation does not
complete in the specified interval, then the validation is discarded.
In the HFConfig_base.xml file, this value is set by default to Never times out. You can change
it to an appropriate interval in your project layer's HFConfig file for your custom calculation
parameter.
Assembly the DLL file that supports the deployment of the custom calculation validations
(Slb.Avocet.HFCalculations.dll in the OOB deployment)
Note: If you specify a custom calculation validation, you must reference it in the
<CalculationReference> element of your <Calculations> definition.
ItemLinkChains
This topic discusses the <ItemLinkChains> node that is defined to link the Avocet HF store with the
specified item types so that the calculations can be properly applied.
The default item link chain supports one or more Avocet HF store instances that are assigned to the
COMPANY item level in the specified Avocet organization hierarchy. If your Avocet HF store is assigned
to the COMPANY level in the same organization structure, you do not need to modify this stanza.
You would need to modify or create a new item link chain if
• your organization structure is different from the one specified in the default chain
• you want to assign the Avocet HF store to a different item level in the default chain
The default item link chain definition maps the Avocet item (MPHASE_METER or multiphase meter
in the example) with the SCADA item (the Avocet HF Store in this case) in the SCADA organizational
tree. The item link chain uses the ORG_ITEM link to traverse the Avocet organizational hierarchy
down to the COMPANY item. The SCADA_ORG link then links the COMPANY item with the SCADA
181
item, as shown in this item link chain definition from the HFConfig_base.xml file (code comments
included):
<ItemLinkChain Id="HFConfig_ILC_base">
<LinkType SourceIdLocation="FROM" Id="BATTERY_ITEM" />
<!-- MPHASE_METER -> BATTERY-->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!-- BATTERY -> ORG_UNIT4 -->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!-- ORG_UNIT4 -> ORG_UNIT3 -->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!-- ORG_UNIT3 -> ORG_UNIT2 -->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!-- ORG_UNIT2 -> ORG_UNIT1 -->
<LinkType SourceIdLocation="FROM" Id="ORG_ITEM" />
<!-- ORG_UNIT1 -> COMPANY -->
<LinkType SourceIdLocation="TO" Id="SCADA_ORG" />
<!-- COMPANY -> SCADA -->
</ItemLinkChain>
The From and To links, which are designated by the SourceIdLocation attribute, for the ORG_ITEM
link are captured below in the following excerpt from the Type Editor in the Avocet Configuration Tools
utility:
The SCADA_ORG link that links the COMPANY item with the SCADA item is depicted below:
In the hierarchy, the chain path starts at the Avocet item type and then proceeds down the hierarchy
to the SCADA item, as shown in this illustration:
Calculations
See Working with calculations.
TransactionTemplateDefinition
This topic discusses the <TransactionTemplateDefinition> node that defines the import value for each
tag mapping or alarm settings field that is incorporated into the template definition.
The Avocet client supplies template definitions for saving tag map settings on the Data Flow
Configuration screen and for saving alarm settings on the Alarms screen. These settings are saved
for later reuse.
For the Data Flow Configuration screen, you can save the tag map definitions as stored in the Avocet
HF Store. This information includes the
• transaction type
• transaction property
• item type
• item name
• data loading options such as aggregation method, sampling interval (frequency), the Load to Avocet
check box
Note: Tag data from the corporate historian is not copied into the template definition.
For the Alarms screen, you can save the alarm setting definition, including the following information:
• item type
• item name
• transaction type
• property type
183
• alarm values
• clamping values
• notification group type and name
The <TransactionTemplateDefinition> node defines the import value for each tag mapping or alarm
settings field that is incorporated into the template definition. It applies a series of tokens to the mapping
process. Each token represents a common Avocet data field that can be applied across items so that
the templates are applied consistently.
Background
This topic discusses a calculation definition that contains one or more input and one or more output
parameters.
Both the input and output parameters are defined in the XML markup framework of your
HFConfig_xxx.xml file, where xxx refers to your implementation layer. The relationship between inputs
and outputs is many-to-many. Depending on how you define the calculation, it can have
• multiple inputs and multiple outputs
• multiple inputs and a single output
• a single input and multiple outputs
Calculations are intrinsically bound with the tag mapping definitions contained in the Data Flow
Configuration screen. Generally speaking, inputs are the equivalent of tags originating from the corporate
historian. Outputs are the equivalent of tags associated with the Avocet HF store (for example,
tagName.output).
The following schematic shows the relation between the input tag, the corresponding output tag, and
the calculation module for a unit of measure calculation, which Avocet supports by default.
Distinguishing features
This topic discusses the distinguishing features of a calculation definition in the XML markup.
In the XML markup, the distinguishing features of a calculation definition are as follows:
• Each definition has a unique name and ID.
• Each definition can have one or more input and output calculations.
• Each input calculation processes historical or real-time data.
• Real-time data is current data. It is either raw, in which all input values are received as is; or it is
cleansed, meaning that the input values are restricted to a range through a clamping calculation.
• Historical data is either aggregated or un-aggregated (un-aggregated data is considered raw data).
• Input calculation parameters have a specified data source, which can be
• Avocet database
• Avocet HF Store
• corporate historian
• Each input or output calculation parameter is associated with either a
• specific Avocet item, transaction type, and transaction property; or
• specific Avocet item and item property (but only for real-time data originating from the Avocet
database data source)
• Support for custom calculation validation parameters is provided. In your project layer's HFConfig_
ProjectLayer .xmlfile, you can specify a timeout interval for synchronization if the validation does not
occur.
185
Out-of-the-box versus custom calculations
The Avocet HF implementation supports clamping calculations and unit of measure calculations
out-of-the-box without the need to manually write XML markup or C# programming. This section
discusses both types of calculations.
Clamping calculation
This topic discusses clamping calculations, what they are, and how to apply clamping values on Alarm
screens.
A clamping calculation defines the
• maximum input value of an alarm
• minimum input value of an alarm
• the clamped input value, which programmatically restricts the input values that exceed the maximum
or minimum value to the specified alarm maximum or minimum
You apply the clamping values on the Alarms screen where you set the alarm range for the specified
transaction type and property.
In addition, you can define your own customized clamping calculation that overrides the out-of-the box
clamping calculation.
3
The UOM calculation automatically converts the volume from mcf to m during synchronization.
Real-time data
This topic discusses real-time data. Real-time data can originate from any data source. It is current
data.
From an end-user perspective it arrives “as is” from the data source. The following diagram outlines
the relation between the data source, the data tag, and the corresponding input parameter.
187
In the XML markup of the input calculation, the value type of real-time data is not specified. The data
is assumed to be raw, unless it is a clamping calculation.
Historical data
This topic discusses historical data. Historical data originates from the Avocet HF store where the
historical data is stored per tag, or from the corporate historian, where logging is automatically enabled.
Historical data refers to a previous set of values, not the current values.
The value type of historical data is raw if the aggregation method is not specified. If the aggregation
method is specified, the value type is noted as historical.
Historical data contains the following unique parameters:
• Aggregation method (AggregationMethod)
• Aggregation resample Interval (AggregationResampleInterval)
• Time span (TimeSpan)
• Offset
• Maximum values to return (MaxValuesToReturn)
The following diagram outlines the relation between the data source and input calculations for historical
data:
These parameters share certain dependencies.You can choose from a range of aggregation methods
or choose none.The AggregationResampleInterval attribute applies only if you specify an aggregation
method. The other attributes apply no matter what the aggregation method is.
The AggregationResampleInterval (aggregation resampling interval) indicates the increments at
which data is retrieved. For example, if you specify a time span of 12 hours and an aggregation
resampling interval of 1 hour, then the calculation retrieves the last 12 hours of historical data in 1-hour
increments, as depicted in the following diagram:
The MaxValuesToReturn (maximum number of values to return) restricts the number of historical
data points that are retrieved. The example of a 12-hour time span with 1-hour resampling intervals
has 12 data points. If the maximum number of values to return is 6, then the calculation starts with the
original data point and proceeds chronologically from there. In our example, it retrieves the first
chronological data point sent 12 hours from the current time and then captures the next 5 data points,
ending at hour 6.
189
The EnableLogging parameter applies to calculation output parameters only. By default it is set equal
to “False.” When set equal to “True,” the output tag is logged in the format
CalculationOutputs.TagName.Output in the Apis Management Studio.
Calculation reference
The <CalculationReference> element identifies the assembly file that deploys the custom calculation
(Slb.Avocet.HFCalculations out of the box) and the class where the specific calculation is instantiated.
Attribute Description
StaticValidationId the unique identifier for the global static calculation validation routine. This is the same value as
denoted by the Id attribute of the <StaticCalculationValidation> element.
If specified, then the specified validation routine can be applied to multiple calculation instances.
SupportsValidation applies to ad hoc custom calculation validations. Its option is a Boolean true or false indicator that
tells whether the calculation invokes the validation interface for the specific calculation instance.
If both static calculation validations and ad hoc custom calculation validations are assigned to the
same calculation, then the static calculation validations are processed first.
Filtering criteria
The filtering criteria under <Calculations> focus on the item that is the subject of the calculation. The
criteria are arranged from the specific to the general. Its descriptive elements begin with the name of
the item type, proceed to its subtypes, and then specify the type to which the calculation applies.
• Boolean • Sbyte
• Byte • Int16
• UInt16 • Int32
• UInt32 • Int64
• UInt64 • Float
191
• Double • String
• DataTime • Number
• Integer • UInteger
• Duration
Aggregation methods
This topic describes the different aggregation methods.
The following table lists the OPC HDA and DA aggregation methods that historical calculations support.
For more information about these methods, see the OPC Historical Data Access Specification, Version
1.20, which you can download from the OPC Foundation website as well as other websites. The
descriptions herein are derived from the specifications.
None No sampling is applied to the raw data from the historian. The as-is raw data is retrieved.
Interpolative zero order Samples an incoming value at given interval, holding the value until the next interval, at
(Zero-order hold interpolation) which time a new value sample is taken. Basically, one sample is taken per time interval.
Interpolative (First-order hold A linear interpolation method in which a sampling value is derived from the two nearest
interpolation) input samples (bounding values) over a specified interval
Average The sum of values over a given interval divided by the number of data points
Minimum The minimum raw value within the sampling interval, with the interval start time as the
timestamp
Time average Time-weighted average of raw values at the beginning and end of an interval
Maximum Actual Time Maximum raw value within the interval with that value’s timestamp
Maximum Maximum raw value within the interval, with the interval start time as the timestamp
Standard deviation Square root of the average of the squared differences of raw values from their average
values divided by the random sampling n-1: 1n(x-Avgx)2n-1
Range The difference between the raw maximum and raw minimum values in the interval. If only
value occurs during the interval, then the range is zero.
Minimum actual time Minimum raw value within the interval with that value’s timestamp
Start Retrieves the first raw value within the interval with its timestamp
End Retrieves the last raw value within the interval with its timestamp
Median Retrieves the median of raw values within the interval. The median is the middle value in
the range of lowest to highest values. If there is an even number of values in the range,
then the median is the mean of the two middle values: m1 +m2/2.
Total The total aggregate is calculated by dividing the time-weighted average divided by the
interval length.
Percent Good The Percent Good calculation divides the Duration Good by the interval.
Percent Bad The Percent Bad calculation divides the Duration Bad by the interval.
Worst Quality Retrieves the worst quality OPC DA value in the interval
Calculation examples
This section describes three example calculations: generic, clamping, and percent change.
193
Type="MPHASE_MTR_VX"
Property="INPUT_24VDC" />
</CalculationParameters>
</CalculationDefinition>
This section parses the XML markup of this sample calculation. It examines its elements and attributes.
CalculationDefinition
This topic defines the following elements: CalculationDefintion, HistoricalTimeInterval, and Supersede.
The CalculationDefinition element has its unique name and ID. Note that the name and ID can be
the same, but they must be unique to the definition.
The HistoricalTimeInterval attribute is set equal to 5, meaning that the calculation parameters are
automatically set to run every 5 seconds even if the values have not changed.
The Supersede attribute refers to the calculation parameter MPHASE_MTR_VX.NEG_12VDC. By
specifying the Supersede attribute, you ensure that the latest value of this specified parameter is
returned as the output value for the respective tag in the Avocet client.
CDATA
The CDATA section contains any string type character data not considered part of the XML markup.
It is passed to the calculation when it is instantiated.
Calculation Reference
The CalculationReference element points to the programming assembly (.dll) and class (.cs), both
of which implement the calculation in the C# code project of the calculation definition.
CalculationItemFilters
This topic discusses the CalculationItemFilters element that specifies the filtering level or levels
applied to the item that is the subject of the calculation.
In this example, the high-level filter <Types> is specified as MPHASE_METER. You could apply more
detailed filtering criteria, down to the actual name of the item.
CalculationParameters
In this example, the <CalculationParameters> element contains two input and two output calculation
parameters. One input is raw historical data and the other is raw real-time data.
• The first input, MPHASE_MTR_VX.POS_12VDC, applies to the property POS_12VDC for the
multiphase meter transaction MPHASE_MTR_VX, shown here in this excerpt from the Type Editor
screen:
Attributes Description
AggregationMethod None. Indicates that the historical data is not aggregated. It is raw historical data.
Attributes Description
• Two output calculation parameters are defined for two properties of the MPHASE_MTR_VX
transaction: MPHASE_MTR_VX.HART_24VDC and MPHASE_MTR_VX.INPUT_24VDC. When the
calculation is run, the output tag for each property is generated, and the current values are stored in
the Avocet HF Store.
195
Custom clamping calculation: walkthrough
This walkthrough example of a real-time custom calculation looks at its customized XML markup and
its accompanying C# project and code content. It then describes the procedure for implementing the
calculation in Avocet after you have compiled the code.
The following chart outlines the main stages in the creation of a custom calculation:
The purpose of this calculation is to implement the following equation for vibration control:
|Vibration|=vibrationx2+ vibrationy2+vibrationz2. The values on the right side of the equation are the
inputs, and the value on the left side of the equation is the single output.
XML framework
The XML markup in this topic is an example of a real-time custom calculation definition. It has three
input parameters and a single output. You can formulate the XML markup before or after you have
created the C# project.
<Calculations>
<!-- Vibration Control Calculation -->
<CalculationDefinition Id="VibrationControl_Calculation_ABC"
Name="VibrationControl_Calculation_ABC" HistoricalTimeInterval="5" >
<![CDATA[
<CalculationReference Assembly="Slb.AvocetVM.ABCSharedInterfaces"
TypeToInvoke="Slb.AvocetVM.ABC.HF.Calculation.Cal_VibrationControl_ABC" />
CalculationDefinition ID Unique ID for this calculation. Each calculation definition must have
a unique ID. In this example the ID is
VibrationControl_Calculation_ABC.
Name Unique name for this calculation. Each calculation definition must
have a unique name. The ID and name can share the same value,
as they do in this example, but they must be unique to the definition.
Historical Time Functions as a timer that fires the input calculation at the successive
Interval interval (measured in seconds). As a result, the input calculation is
run even if its value has not changed.You can use the historical time
interval to generate simulated data. In this example, the interval is 5
seconds.
Calculation Reference Assembly Name of the DLL file that the calculation references. After you compile
the code, you will need to copy this particular DLL file to the following
subfolder:
implementationFolder\AvocetVM\HF\Apis\Calculations
TypeToInvoke Refers to the namespace and the public class that the calculation
invokes. In this example, the name of the public class is
Cal_VibrationControl_ABC.
CalculationParameter Name Name of the calculation parameter. The calculation parameter name
follows this convention: transactiontype.transactionproperty.
197
Element Attribute Description
SourceLevel The source of the input data. In this example, it is real-time data from
the corporate historian. The options are
CalcType Indicates the type of calculation. The options are input or output.
Property The transaction type property that the calculation is linked with
The output parameter, ABN_READ.VIBRATION.COM, provides the value to the output tag in the
Avocet HF Store.
C# project
This topic discusses defining your custom project in Visual Studio when programming your calculation
in C#.
When programming your calculation in C#, you need to define your custom project in Visual Studio.
The folder structure of an example custom project is shown below:
The project folders contain class definitions that support the custom project. The high-frequency
calculation is contained in the HF folder. A summary description of the other folders follows:
Folder Description
Calculation Contains calculations that apply in contexts other than high frequency
Config Contains classes for various configuration rules, actions, and extensions
DomainDefs Class definitions for a specific domain. In this case, it is the well test transaction.
HF Class definitions for the high-frequency calculations are stored in this folder.
Properties Contains identifying information for the assembly file. In this example, it is
Slb.AvocetVM.ABCSharedInterfaces.
The sample C# class referenced in the XML markup (highlighted in the attribute
TypeToInvoke="Slb.AvocetVM.ABC.HF.Calculation.Cal_VibrationControl_ABC") is shown below:
using Slb.Avocet.HF.Interfaces;
using Slb.Avocet.HF.Configuration;
using Slb.Avocet.HF.Calculations;
namespace Slb.AvocetVM.ABN.HF.Calculation
{
public class Cal_VibrationControl : HighFrequencyCalculationBase
{
protected override ICalculationStatus OnCalculate(ICalculationInputs inputs, ICalculationOutputs
outputs)
{
var result = new CalculationResult { Success = true, Description = "Success" };
try
{
if (inputs.Inputs.Count < 1 || outputs.Outputs.Count < 1)
{
result.Success = false;
result.Description = "The cleansing calculation expects three inputs and one output.
The first being the tag to cleanse.
The second the Lo Clamping value.
The Third the Hi Clamping value.
The output will be the cleansed value.";
}
var index = 0;
ICalculationInput vibrationxValue = null;
ICalculationInput vibrationyValue = null;
ICalculationInput vibrationzValue = null;
// TODO: support IList on inputs
foreach (var input in inputs.Inputs.Values.ToList())
{
switch (index)
{
case 0:
vibrationxValue = input;
break;
case 1:
vibrationyValue = input;
break;
case 2:
vibrationzValue = input;
199
break;
}
index++;
}
var vibrationx = Convert.ToDouble(vibrationxValue.Value);
var vibrationy = Convert.ToDouble(vibrationyValue.Value);
var vibrationz = Convert.ToDouble(vibrationzValue.Value);
var output = outputs.Outputs.First().Value;
output.Value = (Math.Sqrt(vibrationx * vibrationx) +
(vibrationy * vibrationy) + (vibrationz * vibrationz));
outputs.Outputs[outputs.Outputs.Keys.FirstOrDefault()] = output;
}
catch (Exception ex)
{
Logger.LogException(ex, "TestCalulation Failed", true);
result.Success = false;
result.Description = ex.Message;
}
return result;
}
}
}
As the code comments indicate, the input parameters reflect the three data points of a clamping
calculation.
• tag (transaction and property) whose value is the target of the clamping calculation
• low alarm limit
• high alarm limit
Whenever the clamp value exceeds either the low or high alarm limit, its value is calculated as the low
or high alarm limit value. So the clamped value equals the low alarm limit or high alarm limit, and the
respective data point is stored in the Avocet HF Store. This is the cleansed value that is captured by
the output calculation parameter.
Note: Because the output parameter is defined for the cleansed value, you do not specify a
Supersede attribute. In a clamping calculation consisting only of input parameters, the Supersede
attribute points to the input parameter whose transaction and property contain the value to be
clamped.
1. Right-click the Windows PowerShell shortcut to display the flyout menu, and choose Properties.
201
2. In the Shortcut tab of the Windows PowerShell Properties dialog, choose Advanced… .
3. In the Advanced Properties pop-up, select the Run as administrator check box.
203
Type="WELL_READ"
Property="CASING_PRESS3" />
</CalculationParameters>
</CalculationDefinition>
This calculation definition consists of two inputs, both aggregated, and a single output tag that captures
the calculated values.
The first input takes a casing pressure reading of the WELL_READ transaction of the COMPLETION
item type. It aggregates the data points over a sampling interval of 30 minutes, taking the minimum
raw value returned during the sampling interval and applying the interval start time as the time stamp
of the aggregated value. The calculations are applied for a period of 12 hours before the current time,
without an offset.
The MaxValuesToReturn attribute is specified. It caps the number of returned values at 22 within the
time span. The value count begins chronologically 12 hours before the current time and continues
through 22 data points, ending one hour before the current time.
The second input takes a second casing pressure reading from the WELL_READ transaction and
applies the maximum aggregation method over the same sampling interval and time span.The maximum
aggregation method returns the maximum raw value of the sampling interval, using the interval’s start
time as its time stamp.
The single tag output value in the Avocet HF Store depicts a third casing pressure value for the
WELL_READ transaction.
205
{
result.Success = false;
result.Description = "No input for the discharge pressure";
return result;
}
//Output Parameter Validation: Delta Pressure
ICalculationOutput output;
if (!outputs.Outputs.TryGetValue("ESP_READ.DELTA_P", out output))
{
result.Success = false;
result.Description = "No output for the delta p";
return result;
}
//Parameters to Decimal
decimal intakePressureValue =
Convert.ToDecimal(intakePressure.Value);
decimal dischargePressureValue =
Convert.ToDecimal(dischargePressure.Value);
//Calculation: DP=Discharge Pressure - Intake Pressure
output.Value = dischargePressureValue - intakePressureValue;
output.Quality = Quality.Good;
}
catch (Exception ex)
{
result.Success = false;
result.Description = ex.GetType().FullName + ": " + ex.Message;
}
return result;
}
}
}
207
PI Historian configuration
You can configure the PI System historian to communicate with the Avocet HF store much as you
would other historians, except that it has its unique configuration file. After you complete the
configuration tasks, you can automatically populate the PI System historian with tags.
To configure the PI System historian, you edit the CDATA section in the implementationFolder
\HFIManager\Config\HFConfig_PIHistorian.xml file.
The following diagram depicts the data flow at the back end of a high-frequency implementation of the
PI historian:
You can refer to the topic High frequency infrastructure: components and implementation for details
about the component relationships.
HFConfig_PIHistorian.xml
The implementationFolder \HFIManager\Config\HFConfig_PIHistorian.xml file contains the configuration
information for your PI historian implementation. Its CDATA section contains the PI configuration data
that the corresponding C# assembly code implements.
PISystem DefaultServer, Name, DefaultServer is a Boolean True/False indicator that says whether a
Host default PI system server is available. The default value is false. Name is
the name assigned to the PI system server. Host is the name of the
machine where the PI system server resides.
PIServer Name, Host, Force Name is the name of the PI server, the system that receives the data from
the PI historian. Host is the name of the machine where the PI system
server resides. Force is a Boolean True/False indicator that forces the
connection to the PI server.
Database Default, Name Default is a Boolean True/False indicator showing whether the default
database is used. Name is the name of the database instance.
TagManagement UseElements UseElements should be set equal to true. It identifies the PI system tag
naming format in the OPC UA address space: collective name, element,
delimiter, and element attribute (point). In Avocet, this syntax is equivalent
to Avocet HF Store, item, transaction, and property.
Elements AutoCreateMissing When its value is set equal to true, AutoCreateMissingAttribute enables
Attributes the automatic creation of tags in the PI historian during synchronization.
You should keep the value as true to enable tag autocreation.
ElementTemplateMapping SourceType, Name SourceType identifies the Avocet item. Name refers to the name assigned
to the template.
1. In the CDATA section, enter the PI configuration data for your implementation.
2. Save the file.
Component Description
209
ns=7 namespace qualifier. The numeric value is unique
s=i address qualifier for the node ID. Values are s (string), i (integer), or g (GUID
identifier).
Vx_Meter Transaction
VX_12Volt Property
1. In the Navigation Tree, choose the item for which you want to create tags in the PI historian.
2. In the ribbon toolbar, choose Home > Linked Screens > Data Flow to open the Data Flow
Configuration screen for the item.
3. Select the Show Details check box to display all the data columns.
4. In the Navigator list, select the item that you want to synchronize.
Its tags are displayed under the data columns.
5. Select the entries for which you want to create tags in the PI historian.
6. In the ribbon toolbar, choose Home > HF Store > Synchronize to populate the PI historian with
the properly formatted data tags you defined.
1 Determine how to share configuration files between the AvocetVM package and the AvocetWebService package.
3 Add the license file path to the AppConfig.xml in the Config folder referenced by the Web.config file.
4 Define Active Directory users and roles, and enable pass-through authentication in the
AppConfig_ProjectLayer.xml file that resides in the Config folder referenced by the Web.config file.
7 Add the <webApiServer> tag to the AppConfig_ProjectLayer.xml file in the Config folder referenced by the
Web.config file.
8 In the Avocet Configuration Tools utility, apply security constraints to user roles and HTTP request methods.
10 Configure SignalR scale out parameters for high frequency alarm notifications and data support.
211
The following guidelines are descriptive, not prescriptive. However, each specifies a workable solution.
Note: It is important that you track your configuration changes to make sure that they are copied
to all relevant /Config subfolders in your project.
Edit the Web.config file and verify the license file path
Before installing Internet Information Services, in the Web.config file, specify the relative or absolute
path to the Config folder where your AppConfig.xml file, AppConfig_ProjectLayer.xml file, and all
other related configuration and layer files reside. In your AppConfig.xml file, specify the Avocet license
file path.
1. Open the ..\AvocetWebService\Web.config file in a text editor, and look for the <avocet.config>
element:<avocet.config appId="AvocetDev Passthru (MSSQL)" appConfigPath="..\..\config"/>.
Note: The default out-of-the-box appConfigPath attribute value contains relative path
indicators ..\..\.
Do not specify an application ID. You only need to point to the Config folder that contains the
AppConfig.xml file and the other configuration files that you intend to use, such as your
AppConfig_ProjectLayer.xml files and their dependent files.
2. Assuming your AppConfig.xml file resides under the installDirectory\AvocetWebService\bin\config
folder, for the appConfigPath attribute, remove the relative path indicators to point to the underlying
Config folder, as in this example:
<avocet.config appId="MyAppId"
appConfigPath="config"/>
If your Config folder resides at a different location, adjust the path definition accordingly. You can
use an absolute path, such as c:\installDirectory\AvocetVM\config.
3. Save the updated Web.config file.
4. In a text editor, open the AppConfig.xml file in the Config subfolder that your Web.config file
points to.
5. Locate the <licenseFilePath> element under the <Global> node.
Note: Your license file or license server should contain all requisite licenses, including the
Avocet_Web license.
Note: The Avocet Mobile client requires basic authentication (user name and password).
Nevertheless, in a Mobile deployment, the web services server requires Windows pass-through
authentication.
Ensure that the authenticated user account has been defined in the System User screen accessed
through the Administration > Users and Roles > System User node.
Before adding the XML markup to your AppConfig_ProjectLayer.xml file, you must define your Active
Directory users and roles. The procedure differs depending on whether you are defining separate
users or importing multiple users. If importing multiple users, you need to perform an Active Directory
synchronization after performing the initial configuration.
Note: For a detailed procedure describing how to set up pass-through authentication, see the
Security Help topic.
You add the pass-through XML markup to your project layer’s AppConfig_ProjectLayer.xml file. Ensure
that your project layer’s AppConfig_ProjectLayer.xml file containing the pass-through definition resides
in the Config folder specified in the Web.config file.
This topic provides summary guidelines for those already familiar with the steps.
1. In your AppConfig_ProjectLayer.xml file of your project layer, locate the <application id> node of
the database to which you are connected.
2. Under the <application id> node, enter the <authenticationType> definition at the same level as
the <description> and <database> entries. Assign the value passthru to the <authenticationType>
element.
<application id="MyAppID">
<description>MyAppID</description>
<authenticationType>passthru</authenticationType>
<database>
......
3. Verify that your <connectString> is appropriate for your database server authentication type.
213
For example, if you connect to your MS SQL Server or Oracle database server using Window
authentication, the corresponding connection strings should display as in the following examples:
• MS SQL Server
<connectString>Network Library=DBMSSOCN;Data Source=DatabaseServer,1433;
Initial Catalog=DatabaseName;User ID=your_username; Password=your_password;
Application Name=AVM</connectString>
Do not use the Integrated Security keyword in the web service connection string.
• Oracle
<connectString>Data Source=MyOracleDB:1521;User Id=myUsername;
Password=myPassword;Integrated Security=no</connectString>
Note: Refer to the non-Schlumberger website for more information on connection strings.
215
In the AppConfig_ProjectLayer.xml file under the appropriate <database> node, enter the
<cryptoConnectString> element at the same level in the XML hierarchy as the original <ConnectString>
.
Copy the encrypted text from the Encrypted Text field to the corresponding element definition in the
AppConfig_ProjectLayer.xml file under the <database> node, as shown in the following example:
<database>
<driver>SQLSERVER</driver>
<sqlsyntax>SQLSERVER</sqlsyntax>
<cryptoConnectString>OiVYcCGovU952p11uCN
FawipR98pAYLEqMA42U5R36ZgoAjArZxzM3dl4EPg2CXWJYi/dtYT
24Pmlgr869RL9CToot3K0jboHMk4n4Ug+j38rBD2uUCxdlPx+EyqQN
z38j+Qwif4sWm</cryptoConnectString>
1. In the Avocet Configuration Tools utility, access the Security and Auditing Tools > Encrypt String
node to display the Encrypt Stringpane.
2. In the Text to Encrypt panel, type or paste the unencrypted password of your database connection
string.
3. Click Encrypt.
The encrypted password is displayed in the Encrypted Test panel.
7. Save the AppConfig_ProjectLayer.xml file, and start or restart Avocet to initialize the change. If
IIS is already active, then restart it as well.
217
• Microsoft Access Database Engine Redistributable 2010
1. On your Windows Server 2012 R2 system, launch Server Manager through the Server Manager
icon.
219
4. In the Select destination server window, select the server that you want to configure for the web
services API.
In the majority of cases, it will be the host system on which you have deployed the web services
package.
221
Note: Be sure that you do not select WebDAV Publishing because it conflicts with some of
the web services API features.
1. In Server Manager, select IIS from the tree to display the Servers panel.
The newly defined IIS web server should display.
2. Right-click the IIS server entry in the Servers panel in the All servers list to display the flyout menu,
and select Internet Information Services (IIS) Manager.
The Internet Information Services (IIS) Manager window is displayed, listing the Internet Information
Services 8 Application Server Manager page. It initially opens to the Start Page. Its node is
highlighted in the Connections tree.
223
3. In the Connections tree, select the Sites folder to display the default website’s status, and ensure
that the website’s HTTP binding is enabled.
4. In the Sites panel, right-click the Default Web Site entry to display the flyout menu, and choose
Manage Website > Browse *: <portNumber> (http) to check the status of the HTTP connection.
If the HTTP connection is successful, the IIS 8 launch page is displayed.
1. In the IIS Manager console, select your Avocet web services application, and choose IIS > HTTP
Response Headers.
The HTTP Response Headers panel is displayed. By default, it might display an inherited header
called X-Powered-By.
2. In the Group by drop-down, choose Entry Type.
3. Under the Actions... panel, choose Add... .
The Add Custom HTTP Response Header dialog is displayed.
4. Add the following four response headers, repeating the add action and clicking OK for each entry.
Enable HTTPS
This section shows how to enable the HTTPS service, which includes getting the SSL certificate.
To enable the HTTPS service, perform the following steps:
• Obtain an SSL (secure sockets layer) certificate with a trust level appropriate for your environment.
• Create the SSL bindings for the default website.
• Customize the SSL settings for your website.
• Verify the SSL connection to your website.
225
5. Complete the corresponding wizard for the selected certificate type. Refer to the steps outlined in
the corresponding websites listed in the preceding table.
Your server certificate is listed in the Server Certificates pane.
Note: To manage your certificates, you may need to enable the Certificates plug-in in the
Microsoft Management Console.
SSL certificates
The following table lists the different types of SSL certificates that are available.
Self signed Create Self-Signed Certificate… useful in creating a secure, private channel between your
web server and a small group of known users, as in a test
environment. See the following non-Schlumberger websites
for more information:
Self-Signed Certificate
Domain Create Domain Certificate… used to protect a single domain (website). It does not
necessarily have to be issued by an external certification
authority (CA). See the following non-Schlumberger website
for the IIS procedure:
Issued by external CA Create Certificate Request… Many types of digital certificates are issued by certificate
authorities: wildcard, full-authentication, extended validation,
and so forth. You can review various SSL websites for more
information.
1. Launch the Microsoft Management Console by entering mmc in the Run dialog.
The Console Root window is opened.
2. With the Console Root node selected in the tree, choose File > Add/Remove Snap-in... .
1. In the Connections tree of IIS Manager, select the select Default Web Site under the Sites node.
If you created an application under the Default Web Site, then select Default Web Site.
2. Right-click to display the flyout menu, and choose Edit Bindings… to open the Site Bindings dialog.
227
3. In the Site Bindings dialog, click Add to open the Add Site Binding dialog, and complete the following
steps:
a) Select https in the binding Type drop-down list.
b) Leave the IP address drop-down list as All Unassigned.
c) Specify the default secure port number 443 in the Port field.
You are restricted to port number 443 in the current implementation of the web services API.
d) In the SSL certificate drop-down list, select the SSL certificate you want to apply.
Note: If you do not have a certificate ready, you can choose to use the system's certificate.
e) Click OK.
4. Choose Default Web Site again, right-click to display the flyout menu, and choose Manage Web
Site > Advanced Settings... .
The Advanced Settings dialog is displayed.
5. For Enabled Protocols, specify HTTPS to restrict access only to secure HTTPS protocols.
6. Click OK to close the dialog.
HTTP No
HTTPS Yes
Because the Avocet web services API requires an HTTPS connection, SSL security is required.
1. In the IIS Manager console, choose Application Pools in the Connections tree to display the
application pools. If .NET v4.5 (integrated mode) is not present, then do the following:
a) Select Actions > Add Application Pool... .
The Add Application Pool dialog is displayed.
b) Complete the following:
Note: Avocet web services can run under the default application pool settings. However,
you may need to reset certain settings depending on which application pool your website is
using. For example, you may need to reset the Enable 32-bit applications property to False
to resolve certain issues.
3. Select the server node in the Connections tree, and choose IIS > ISAPI and CGI Restrictions.
The ISAPI and CGI Restrictions panel is displayed. The Restriction column for each ASP.NET
should read Allowed.
4. If necessary, change the Restriction setting to Allowed by selecting the ASP.NET entry and choosing
Actions > Allow.
229
<sqlsyntax>SQLSERVER</sqlsyntax>
<connectString>Network Library=DBMSSOCN;
Data Source=localhost,1433;Initial Catalog=[DatabaseName];
User ID=userName;Password=yourDatabasePassword;;
Application Name=AVM</connectString>
<connectStringForSsas>[Connection string that allows SSAS to
connect to Avocet DB]</connectStringForSsas>
.........
</database>
1. Return to the Internet Information Services (IIS) Manager window, and choose Application Pools
in the Connection tree to display the Application Pools panel.
2. Select the .NET v4.5 entry, and choose Edit Application Pool > Advanced Settings... .
3. In the Advanced Settings dialog, choose Process Model > Generate Process Model Event Log
Entry > Identity ... to open the Application Pool Identity dialog.
4. From the Built-in account drop-down list, you can choose from the following account types:
Option Description
NetworkService Choose NetworkService if the Integration Security attribute is set equal to true,
SSPI, or yes.
ApplicationPoolIdentity Choose ApplicationPoolIdentity if the Integration Security attribute is set equal to
false or has been omitted from the string.
For Windows authentication in Avocet non-mobile clients, you can also define dedicated active
directory user accounts and configure the application pool to use them. The Avocet Mobile client
uses basic authentication, so active directory accounts do not apply.
5. Click OK on the open dialog boxes to return to the Application Pools panel with the updated Identity
value.
1. Right-click on the Default Web Site node to display the flyout menu, and choose Add Application…
.
2. In the Add Application dialog, complete the following fields:
Field Description
Alias Enter the display name of your Avocet web service instance. Do not include spaces in the display
name.
Application pool Select .NET v4.5 from the Select Application Pool drop-down list.
Physical path Browse the physical path to the AvocetWebService or to the Avocet Mobile web service folder:
for example, driveletter:\installationFolder\AvocetWebService.
Enable Preload Optional. This option sends a warm-up request to the Avocet web services. The IIS Application
Initialization module must be implemented to support the preload. Refer to this non-Schlumberger
website for more information.
3. Click OK.
In the Connections tree, the application node for the Avocet web services or the Avocet Mobile
web service should display:
1. In the Connections tree of the IIS Manager console, select the top-level server to display its Home
page.
231
2. Choose IIS > Compression icon to display the Compression pane.
3. Optional. Increase the maximum amount of space (in MB) that the server uses when compressing
static content in the Per application pool disk space limit text field.
The value that you enter depends on your available resources and your requirements.
4. Go to the Actions panel in the right-hand side pane, and click Apply.
1. From the Connections tree in IIS Manager, select the web service node.
2. Under the Actions panel, choose Manage Application > Browse Application > Browse
*:portNumber (https).
The URL of the web server address is displayed in the address bar of the browser. It points to the
web service node.
3. Add the resource name /Swagger to the end of the URL string in the address bar, and press Enter.
The Swagger UI document displays the controllers available to the web services API. Each controller
manages a data flow. The available controllers depend on whether you are implementing an Avocet
Mobile or a standard non-mobile deployment. A partial listing of the available controllers for the
non-mobile deployment is displayed in the following screen shot:
The Avocet Mobile deployment contains an additional set of controllers to support communication
with the mobile device. Some of the Avocet Mobile controllers are highlighted in the following
screenshot:
233
Other Avocet Mobile controllers include OfflineSaving, RoutesAndStops, and UIConfigCache.
4. If, when attempting to link to the server, you get an exception such as Target not created
Slb.AvocetVM.Resources.ResourceCache, verify that the configuration files AppConfig.xml and
AppConfig_ProjectLayer.xml are in the directory path that the appConfigPath key points to in
the Web.config file.
3. Enter the URL of your Avocet Web Service folder that you specified in IIS.
Note: Do not leave any spaces between the URL string and the opening and closing <url>
tags.
<webApiServer>
<url>https://HostName.Domain1.Domain2.com/AvocetWebService</url>
</webApiServer>
Restart IIS after a configuration change in the Avocet web service configuration
In the Avocet web services deployment, whenever you make a change to any configuration file, such
as the AppConfig.xml or AppConfig_ProjectLayer.xml file, you must restart IIS to initialize the change.
This task shows how to restart IIS from the command line and from the Internet Information Services
Manager window.
1. Select the website name in the Connections tree. If the application resides under the Default Web
Site node, select Default Web Site.
2. In the Actions panel on the right-hand side, select Manage Website > Restart.
235
By default, all user roles have execute permission for the operations.You must specify which operations
are disabled for each user role.
1. Launch the Avocet Configuration Tools utility (ConfigTools.exe), and navigate to the Security and
Auditing Tools > Security Editor node.
The Security Editor interface displays the available user roles, both default and customized, under
the securityRoot node.
Note: If you just added a role, you may need to select Sync Roles from the ribbon toolbar.
Notifications
The web services API routes notifications for the high frequency infrastructure.
Avocet's native HFI manager and high frequency implementation is not dependent on web services.
However, the web services API, among other options, provides the resource to create a custom,
web-based notifications server that supports high frequency data. As a prerequisite to using the web
services API in a high frequency implementation, you have to install and configure the Avocet HF store
and HFI manager. Refer to the Help topic High Frequency Infrastructure Manager installation and
configuration.
Note:
237
6. Access the installDirectory\HFIManager\HFIManagerPlugins folder and verify that the plug-in
assembly Slb.Avocet.HFNotificationPlugin.dll is there.
Note: The notification feature applies to high frequency alarms. It is not enabled for alarms on
low frequency or historical data.
One email or messaging recipient can belong to multiple groups. The relation between the groups and
the recipients is many-to-many.
Before you define groups and recipients, define your SMTP mail settings for the notification destination.
239
<network host="gateway.mail.companyName.com" />
</smtp>
</mailSettings>
...........
</application>
You can contact your system administrator if you need additional help.
4. Save the updated appConfig_projectLayer.xml file in both locations if necessary.
5. Restart Avocet.
1. In the Navigation Tree, select Administration > Notifications > Mail Recipient to display the Mail
Recipient Item Edit screen.
2. Choose Home > Actions > New to open a new record.
3. Adjust the As Of Date, Start date, and End date values as needed.
These dates should correspond with the effective dates of the alarm settings and with any associated
mail group.
The dates in the Date Break column change accordingly.
4. Required. Enter a name for the recipient in the Name field under the Date Break column heading.
5. Required. Enter an email address or SMS or MMS gateway address in the Email address field
under the Date Break column heading.
The typical format for an SMS gateway address is Mobile-Number@ServiceProviderAddress. The
address may include the message format, such as SMS or MMS: for example,
[email protected] (MMS) for T-Mobile account.
You can refer to external websites for a list of SMS gateway addresses.
6. Optional. Click View All Properties to display the Description field, and enter a unique description.
7. Click Home > Actions > Save to save the record.
1. In the Navigation Tree, select Administration > Notifications > Mail Group to display the Mail
Group Item Editscreen.
2. Choose Home > Actions > New to open a new record.
3. Adjust the As Of Date, Start date, and End date values as needed.
These dates should correspond with the effective dates of the alarm settings and any target email
recipients.
4. Required. Enter a name for the group in the Name field under the Date Break column heading.
5. Required. Select the Enabled check box to enable the group.
You can leave it unselected if you are not ready to enable the group to receive email notifications.
6. Optional. Click View All Properties to display the Description and Rate Limit fields, and enter
an informative description of the new mail group.
1. In the Mail Group Item Edit screen, select the mail group from the Navigator list.
2. Click the Links tab to open the Links pane.
3. If the message No active links is displayed, then click View linked only to display the Group-User
Link object. Otherwise, skip to step 4.
4. Click the Add Link icon to open the Select Item window.
5. In the Select Item window, select from among the following recipients to link with this group:
• specified mail or messaging recipients
• system roles such as field supervisor, field operator, read-only, and so forth
• system users who have been defined
6. Click OK. The selected recipient or recipients are added to the Links tab.
7. Click Home > Actions > Save to save the updated record.
1. In the Mail Recipient Item Edit screen, select the mail recipient from the Navigator list.
2. Click the Links tab to open the Links pane.
3. If the message No active links is displayed, then click View linked only to display the Group-User
Link object. Otherwise, skip to step 4.
4. Click the Add Link icon to open the Select Item window.
5. In the Select Item window, select the mail group(s) that you want to link with this specific notification
group.
6. Click OK. The selected group or groups are added to the Links tab.
7. Click Home > Actions > Save to save the updated record.
241
You have the option to
• send an alarm notification immediately
• cancel an alarm email transmission
• resend an alarm notification
Note: Email notifications that are transmitted immediately may display on the Mail Queue
Viewer viewer for a second or two.
1. In the Navigation Tree, access Administration > Notifications > Mail Queue to display the Mail
Queue Viewer grid report.
2. In the list, select the email you wish to send.
3. Choose Home > Actions > Send Immediately.
The selected email is sent to its group and recipient.
4. To cancel a send action, choose Home > Actions > Cancel Sending.
5. To resend an email, choose Home > Actions > Repeat Sending.
Note: In your IIS configuration, be sure that you have installed the WebSocket Protocol
application development feature. SignalR uses web sockets for communication. Refer to this
non-Schlumberger website for more information.
1. Open the AvocetWebService\Web.config in a text editor, and locate the <signalR.webserver> node.
2. Make the following changes:
a) Set the messageBusType attribute equal to "ServiceBus".
b) Create a <serviceBusScaleOut> subelement within the <signalR.webserver> element.
c) Include a connectionString attribute within the <serviceBusScaleOut> subelement.
3. Restart IIS.
1. Open the AvocetWebService\Web.config in a text editor, and locate the <signalR.webserver> node.
2. Make the following changes:
a) Set the messageBusType attribute equal to "Redis".
b) Create a <redisServerScaleOut> subelement within the <signalR.webserver> element.
c) Add a server attribute within the <redisServerScaleOut> subelement.
d) Set the server attribute equal to the Redis server name.
e) Create a port attribute within the <redisServerScaleOut> subelement, and set it equal to the
port number of the Redis server.
f) Within the <redisServerScaleOut> subelement, create a password attribute to contain the Redis
server password.
g) Also within the <redisServerScaleOut> subelement, create an appName attribute to point to the
SignalR communication type.
The signalR.webServer stanza should display as in this example:
<signalR.webServer messageBusType=”Redis”>
<redisServerScaleOut server=
”xxxx.redis.cloudapp.net” port=”6379”
password=”XXXXXXXX” appName=”AvocetRealtime” />
</signalR.webServer>
3. Restart IIS.
1. Open the AvocetWebService\Web.config in a text editor, and locate the <signalR.webserver> node.
2. Make the following changes:
a) Set the messageBusType attribute equal to "SqlServer".
243
b)Create a <sqlServerScaleOut> subelement within the <signalR.webserver> element.
c)Include a connectionString attribute within the <sqlServerScaleOut> subelement.
d)Point the connectionString attribute to the SQL Server database.
e)Include the Integrated Security property at the end of the connection string, and set it equal
to True.
The signalR.webServer stanza should display as in this example:
<signalR.webServer messageBusType=”SqlServer”>
<serviceBusScaleOut connectionString
Server=(localdb)\v11.0;Database=<YOUR-DATABASE>;
Integrated Security=True;” />
</signalR.webServer>
3. Restart IIS.
Alarm Manages the high frequency limit, offnormal, and watchdog DELETE, GET, POST, PUT
alarms
Constants Retrieves constants and their values that are defined in the GET
controller
Item Retrieves, adds, and uploads data for items, item types, GET, POST, PUT
and item IDs
Realtime (Deprecated) Retrieves and adds high frequency methods GET, POST
Scheduler Retrieves and adds data for the Avocet scheduling server GET, POST
service
1. In the Swagger UI, expand the Authentication controller, and select the GET
/avocet/v1/Authetication/AppIds request.
The model schema is displayed.
2. Click Try it out!.
The response body retrieves a list of application IDs that it finds in the Config folder specified in
the Web.config file.
3. Scan the list to verify that your target application ID is listed and note its exact spelling and
capitalization.
4. Select the GET /avocet/v1/Authentication/Login request.
The model schema is displayed.
5. Under the Parameters heading, enter the application ID exactly as it is spelled and capitalized.
6. Click Try it out!.
If you authenticate successfully, you should receive the response code 200.
245