PURPOSE
The purpose of UNIDB is the collection and storage of control flow data.
PROGRAM SCOPE
UNIDB allows to efficiently read data from an arbitrary number of OPC Data Access servers and save
them to OPC Historical Data Access or OPC Data Access servers.
To optimize data saving, you can specify the set value, boundaries and aperture for every parameter that is
being archived. Using UNIDB HDAServer, you can send the data to MS SQL, Firebird or Interbase DBMS.
It can be used as part of any SCADA system supporting OPC HDA for efficient archive storage in MS SQL,
Firebird or Interbase DBMS.
COMPONENTS
- UNIDB HDAServer is a standalone OPC Historical Data Access server for MS SQL, Interbase and Firebird DBMS. The address space of the server tags and database connection settings are configured arbitrarily by UNIDB HDAServer Config. This server can be used as a separate OPC HDA server, as well as with other UNIDB products.
- UNIDB HDAServer Config - a visual configuration utility for UNIDB HDAServer.
- UNIDB Collector is a service that allows to organize a reliable and efficient data retrieval from OPC DA servers and their archiving to OPC HDA servers or transfer to OPC DA servers. UNIDB HDAServer or any other server can be used as an OPC HDA server. UNIDB Collector "connects" the tags of one OPC server with those of another.
- UNIDB Collector Config is a visual configuration utility for UNIDB Collector.
- UNIDB Collector Manager is a visual tool for UNIDB Collector. It allows to configure, start and stop the Collector.
SYSTEM REQUIREMENTS
- Windows NT4/2000/XP/2003 OS
- Pentium CPU or faster
- 128 MB RAM or more
- One or several DBMS required for data storage: MS SQL Server, Interbase, Firebird
Using UNIDB HDAServer
UNIDB HDAServer is a standalone OPC Historical Data Access (OPC HDA) server for MS SQL, Interbase and Firebird DBMS.Using this server allows to unify the process of saving and retrieving technological and other data. The server can be integrated into any information system employing the OPC HDA format.
Setting the database writing criteria for each parameter (OPC tag) allows to optimize system resource usage, reduce the system workload and decrease the database size.
The high performance of UNIDB HDAServer makes it possible to use it for archiving real-time data in large information systems.
Program scope
- configurable tag address space;
- parallel work with several DBMS;
- parallel work with an arbitrary number of databases;
- parallel work with an arbitrary number of client applications.
Supported DBMS
- Microsoft SQL Server;
- InterBase SQL Server;
- Firebird Server.
Implemented OPC interfaces
- OPC Common 1.00;
- OPC Historical Data Access 1.20.
Implemented OPC HDA functions
- synchronous tag reading over time intervals;
- synchronous tag reading at specified times;
- synchronous reading of tag average values;
- saving tag values (InsertReplace);
- tag deletion over a specified interval;
- tag deletion at a specified point of time.
Utilities
- UNIDB HDAServer Config for server configuration.
Server address space
The hierarchical address space of the server tags and the database connection settings are configured
using UNIDB HDAServer Config. The top level of the hierarchy is occupied by an arbitrary number of databases.
Each of them contains tags, which can be directly read/written by client application, or folders. Folders can
contain other folders and tags.
A tag can represent either a discrete or an analog parameter. The tag type (discrete/analog) defines the method
of saving it in a database. The values of discrete tags are stored as 4-byte integers and the values of analog
tags - as 4-byte floating point numbers. Each tag has a parameter number assigned to it - a number unique at least
within the given database. This is necessary for database integrity.
Besides common tags, the UNIDB HDAServer address space can contain tag sequences. A tag sequence is an arbitrary
number of tags of the same type (discrete or analog) that has sequentially numbered parameters and names containing
the tag parameter number. For instance, tags Tag001, Tag002 and Tag003 with the corresponding parameter numbers 1, 2
and 3 can be joined into a sequence. The names of all tags in a sequence are defined by a formatted string. For
the example above the tag names will be defined by the Tag$NNN string.
Sequences allow to quickly add large numbers of single-type tags to the UNIDB HDAServer address space.
Database format
UNIDB HDAServer requires one of the supported DBMS and a database (or several DBMS and databases) to operate.
If necessary, HDAServer will create the database tables, which will store the incoming data.
The values of analog tags received during the day are stored in a separate table. The same kind of table is created
for discrete tags. This approach helps optimize the database indices and makes database administration easier.
The database names have the following format: TDDMMYYYY,
| where | T | - 'A' for the analog tag values table, 'D' - for the discrete tag values table; |
| DD | - day of month; | |
| MM | - month; | |
| YYYY | - year. |
Table records have the following fields:
|   | N | - tag parameter number; |
| T | - tag time stamp; | |
| V | - tag value; | |
| S | - status used inside UNIDB; | |
| XS | - quality attribute (OPCHDA_QUALITY). |
Restrictions
When using Interbase or Firebird DBMS:
- gds32.dll library required in the Windows\System32 folder;
- Only local databases are supported.
Using UNIDB Collector
UNIDB Collector is a service that allows to organize a reliable and efficient data retrieval from OPC DA servers and their archiving to OPC HDA servers or transfer to OPC DA servers. UNIDB HDAServer or any other server can be used as an OPC HDA server. UNIDB Collector "connects" the tags of one OPC server with those of another.
Program scope
- transfer of an arbitrary number of OPC DA server tags to an arbitrary number of OPC HDA or OPC DA servers;
- flexible data collection and transfer configuration;
- optimization of the process of data writing to OPC HDA, writing aperture, set value and value boundaries settings for each tag;
- each value can be interpreted as an analog, discrete or any other parameter.
- support of nearly all COM data types;
- high reliability, restart of any of the connected OPC servers after a connection failure or a critical error on an OPC server;
- high performance, optimized for interacting with many OPC server simultaneously.
Supported OPC interfaces
- OPC Common 1.00;
- OPC Data Access 1.00;
- OPC Data Access 2.05a;
- OPC Data Access 3.00;
- OPC Historical Data Access 1.20.
OPC functions implemented
- synchronous reading for OPC DA1, OPC DA2 or OPC DA3 servers;
- synchronous or asynchronous reading for OPC DA2 or OPC DA3 servers;
- synchronous data writing to OPC DA1, OPC DA2 or OPC DA3 servers;
- synchronous or asynchronous data writing to OPC DA2 or OPC DA3 servers;
- synchronous data writing to OPC HDA servers;
- correct OPC servers shutdown requests processing.
Utilities
- UNIDB Collector Config setting up the service;
- UNIDB Collector Manager for starting/stopping the service and the choice of operating mode (WindowsNT service/application)
Configuration
The UNIDB Collector configuration process is essentially a series of transfers of item arrays.
A "transfer" describes a connection between two OPC servers.
A transfer item describes a connection of a source OPC server tag to a destination OPC server tag. The element type (analog, discrete or general) can be specified for each element - it defines the method of transferring tag values from the source to the destination.
For elements of the general type, the value of the source tag will not be saved in the destination tag until its value or quality changes. The type of data coming from the source tag may by arbitrary (integers or real numbers, boolean values, strings, dates, variables of type Variant, etc.).
The same relates to discrete elements, but the source tag values are interpreted as integers (although the actual data type can different). This peculiarity determines the algorithms of processing the incoming values.
Write aperture, set values and boundaries can be specified for analog elements. The possible criteria of writing a tag to a destination OPC server for analog elements may be:
- change of tag quality in the source OPC server;
- change of tag value in the source OPC by aperture value;
- crosscutting of a tag value in the source OPC server with one of the set values;
- a tag value in the source OPC server exceeding the boundaries of a specified range of values.
If a tag in the source OPC server goes out of range, it will not be sent to the destination tag until its value settles within the range of its quality changes.
If the aperture of an analog element has not been set specified, the decision about sending the source values to the destination elements will be based upon set values, boundaries and quality. It is essential for the correct processing of analog values that the values coming from an OPC DA server are integer or real numbers (although the real data type may be arbitrary, for instance a string representing a real number).
To configure UNIDB Collector, use UNIDB Collector Config. <> UNpIDB Collector can work both as a standard Windows application, and as a WindowsNT service. You can choose the UNIDB Collector operational mode and start/stop the program using the UNIDB Collector Manager tool.
Restrictions
- When using Interbase or Firebird DBMS, UNIDB Collector should be started as an application, not a service;
- Collector ignores regional settings when working with OPC servers; in some extremely rare occasions it may result in incorrect data conversion (dates or real numbers to strings, or vice versa).
 
Copyright © 2006-2007 "Complex Systems" Research and Development Center
 

