Data acquisition with SAIA-PCD

You need to collect history data in a PCD system to create reports, trends, statistics or archive files. This is a typical task knowing when you start but not when you'll finish. You should also expect surprise and difficulties to get a proper and stable solution. You may also run in a endless process if you do not exactly know what you need and what you can do.

A main cause of difficulties is due to the fact that the usual programming of a PCD, including the S-Bus communication driver, is based on the principle of process data permanently refreshed in the PCD and over the communication network. The notion of buffering, time-stamping and transfer of data packages is missing.

This document attempt to help you by making a good choice of the basic functions and tools to use and will show some limits of the various solutions.

To segregate this approach of data acquisition, 6 possible cases are presented. Each of them start on a different based and will lead to more or less performances, flexibility and reliability. The three first solutions uses only SAIA's Fbox libraries, while the last 3 are Engiby's solutions.

1. Using the DB Logger Fbox

2. Using the Data buffer Fbox family

3. Using the Data buffer for the Web Server

4. The NG-Dump software

5. The NG-Trace software

6. The NG-Data package

The aspects to be discussed and compared are like:

·        Investment in money

·        Engineering work

·        Sampling signal

·        Time stamping

·        Data identification

·        Buffer loading

·        Buffer unloading

·        Data package reception

·        Handling of communication errors

·        Stability and reliability of the solution

·        Modifications/Extensions


Using the DB-Logger Fbox

This Fbox is part of the standard S-Fup Fbox families and therefore doesn't need any supplementary investment. A simple test program will work very quickly. You will also reach the same result with a simple IL program using the TFR instructions.

First difficulties will appear to correctly handle the pointers at start up, after power down and when the buffer overflows. Data sampling, identification and time stamping is under your own responsibility. The download of the buffer via modem is very difficult as you have to care at all possible errors with the PSTN network. A correct data queuing in all cases is almost impossible.

The unloading must be fully programmed in a SCADA system or by your own application.

In conclusion, this solution is good and fast for a simple application with low demand on reliability. It assumes that you are ready to make all necessary effort on the reception side to reach the required level of reliability. Maintenance and extensions are not easy because a complex PCD program need to be modified and the application on the other side also need a reprogramming.


Data Buffer Fbox family

This Fbox family is included in the Modem library and bound to a rather low investment. The buffer loading in the PCD is simple to realize.

The local pointer is handled by the Fbox. Data are identified by there PCD address and time stamping is included. The sampling is still under your responsibility. The buffer delivers some useful information like buffer load level, overflow signal and internal errors.

The buffer unloading however, must be realized by the SCADA system or by your self-programmed solution. Two solutions are possible:
- A direct access to the Data block which allows you the unloading of all records in one go.
- The use of the read Buffer Fbox which unload the records one by one via a register block.
Your task would be easy if the S-Bus driver of the SCADA already include the handling of this Data Buffer.

In conclusion, this solution is good to quickly acquire some data in the PCD but you must provide important effort for the data reception and storing. The reliability will depend on your ability to handle the data reception including error handling. This task may be rather complex when modem connections are involved. Maintenance and extensions are simple on the PCD side because you can mix up many variables in the same buffer. An important adaptation on the SCADA side is however required.


Data Buffer of the Web Server

Three solutions exist within this package.
- The Online trending
- The Offline trending
- The Visi+ data transfer

The online trending is not really a data acquisition solution and is not considered in this discussion. The Visi+ solution is limited to Visi+ and therefore also not included in the comparison.

This Fbox family is available for free with PG5 SAIA but the view with the Web editor requires an advanced license. The integration in a PCD is quite simple thanks the availability of Fboxes. A supplementary work is necessary to create the Web pages and establish the correct relation.

A restriction is that the buffer has a limited length and old data will be overwritten or recording is stopped when the buffer is full. The automatic transfer of data over Modem or Ethernet to a PC remains a complex task. The reliability is fully under your responsibility.

As standard solution, the recorded data remains in the PCD memory and you must establish a connection to the Web Server to view the recorded data. It is however possible to manually save a buffer content in CSV file on the PC running the Web browser.

Finally, the solution is a good debugging solution but is not suitable for data acquisition on a central server for long time recording. The main advantage remains the possibility to view the data from any PC on the LAN with a simple Web browser.


NG-Dump software

The NG-Dump is a Windows program created to dump data from a SAIA-PCD system to Excel or CSV-files in a very simple way. The only investment to plan is the license price of the software itself. No special PCD programming is required.

The recording interval, the data addresses and all necessary parameters are set in the software. The data reading and the time stamping is ensured by the software itself. This is a big comfort but the result is that a permanent PCD connection is required to ensure a continuous recording. The PCD has no autonomy, which means that data records are lost in case of connection break down or when the PC is not running.

The data can be read over point-to point, S-Bus, or Ethernet connection. Simply, any PG5 connection can be used. Modem should only be used for single shot reading.

In conclusion, this is a very interesting solution when one can ensure a continuous function of the PC and the PCD connection, or if the data integrity is not an important point.


NG-Trace software

The NG-Trace is a PG5 Add-On Toll that allows you to configure the data buffer, to download and display the recorded data. It allows several type of implementation at different price levels starting from a freeware version.

You don't have to care about sampling signals. Time stamping and data are identified with a clear text. The buffer is a rotary buffer and can be unloaded in real time or at later time over point-to point, S-Bus, modem or Ethernet connection. Simply, any PG5 connection can be used.

The unloaded data can be viewed in a spread sheet, in graphical form or can be exported to an excel file in one click.

In conclusion, the NG-Trace is rather a debugging tool optimized to run in the PG5 environment. Maintenance and extensions are simple because each modification is immediately overtaken on both sides (PCD program and online view). This solution is however not suitable to build long time data storage because the queuing of packages is not included. Reliability is not a point of discussion because the buffer unloading and storing is a user operation.


NG-Data

The NG-Data package is made of Fboxes for the data acquisition on PCD side, and a server program for the package reception and database handling. The investment is higher than the other solutions but includes all necessary functions to have a reliable solution without supplementary effort.

The Fboxes for the data acquisition includes time stamping, buffering, data and site identification, data level survey with alarming and error reporting. The server must be installed once and is always able to accept new sites and new data points. In other words, the data acquisition is transparent from the PCD signals distributed in several external sites up to the database (e.g Access file) in the server computer.

In conclusion, this is the optimal solution for large applications, where data are distributed over several sites. Maintenance and extension can be expected quite every day. All efforts have been made in the basic concept to reach an optimal reliability. Depending on each application the data format, the package transport, the data base type and many other aspects are adapted to suite the specific need.


Overview

The following table shows you an overview of these solutions with the various aspects to be considered.

DB Logger

Data
Buffer

Web Server

NG-Dump

NG-Trace

NG-Data

Aspect

No

No

Low

Low

Medium

High

Investment

High

Medium

Medium

Low

Low

Medium

PCD Programming

Yes/High

Yes/High

N.A.

Medium

Medium

Medium

Transfer to SCADA / Realization work

No

No

Yes/Low

No

No

Yes/High

Web access / Realization work

Low

Medium

High

High

High

High

Flexibility

Low

Medium

N.A.

Low

N.A.

High

Reliability

Yes

Yes

Yes

No

Yes

Yes

Buffering in PCD registers or RAM DB

No

No

Yes

Yes

Yes

Yes

Sampling signal included

No

No

Yes

No

Yes

No

Auto recording on change

No

Yes

Yes

Yes

Yes

Yes

Time stamping

No

No

Yes

Limited

Yes

Yes

Data identification

No

No

No

Yes

No

Yes

Site identification

No

Limited

No

N.A.

No

Yes

Buffer diagnostic

No

Limited

No

N.A.

No

Yes

Error reporting

No

No

No

Yes

Limited

Yes

Long time data storage

No

No

No

No

Yes

Yes

Data list view (even simple view)

No

No

Yes

No

Yes

No

Graphical view (even simple view)

No

No

No

Yes

No

Yes

Data queuing

No

No

No

No

No

Yes

Value limits and alarming

No

No

No

No

Yes

Yes

Optimized data format

No

No

Limited

Yes

No

Yes

Storage in CSV file

No

No

No

Yes

Yes

Yes

Storage in Excel file

No

No

No

No

No

Yes

Storage in Access database

Legend:
Reliability = The ability to recover from communication problem without lost of data.
Data queuing = The ability to append several data packages.
N.A. = Not applicable.

If you have further question, remark or comment about this document, don't hesitate to contact Engiby. We would be glad to take each opportunity to improve this document.

Back to Engiby main page

Engiby / 27.09.2006