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 surprises 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 Saia PCD®, including the S-Bus communication driver, is based on the principle of process data permanently refreshed in the Saia PCD® and over the communication network. The notion of buffering, time-stamping and transfer of sequencial data packages is not part of the Fbox libraries and not obvious with IL instruction set.
This document attempts 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 starts on a different base and will lead to more or less performances, flexibility and reliability. The three first solutions use only Saia FBox libraries, while the last three are Engiby solutions.
- Using the DB Logger FBox
- Using the Data buffer FBox family
- Using the Data buffer for the Web Server
- The NG-Dump software
- The NG-Trace software
- The NG-Server 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 Fupla 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 LAN or modem is very difficult as you have to care at all possible errors with the 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.
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 Saia PCD® program needs to be modified and the application on the client other side also need adaptions / 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 Saia PCD® is simple to realize.
The local pointer is handled by the FBox. Data is identified by the Saia PCD® media 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 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. In most cases, no particular 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 leak of values in case of network failure is not an important point.
NG-Trace software
The NG-Trace is a PG5 Add-On Tool which allows you to quickly configure a data buffer, to download and display the recorded data.
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 with a single 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 an user operation.
NG-Server
The NG-Server package is a much more powerful solution able to get trend data from several PCD systems, grouped in several tables at different intervals and to collct them into an SQL database. The solution includes Fboxes for the data acquisition on PCD side and software modules for the package reception and database handling on server side. The investment is higher than the other solutions but it includes all necessary features to have a powerful and reliable solution with reasonable effort.
The Fboxes for the data acquisition includes time stamping, buffering, data and site identification. The server must be installed once and is always able to accept new sites, new tables and new data points. In other words, the data acquisition is transparent from the PCD signals distributed in several external sites up to the end user interface.
In conclusion, this is the optimal solution for large applications, where data are distributed over several sites. Maintenance and extensions 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.
Additionnal features like Alarm list, SMS and Email alarming are available.
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-Server | 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/Medium | No | No | Yes/Low | 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/Yes | Auto recording on change / With programming |
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 | Yes | 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 SQL database |
Legend:
Reliability = The ability to recover from communication problem without lost of data.
Data queuing = The ability to corectly append several data packages or data files.
N.A. = Not applicable.
If you have further questions, remarks or comments about this document, don't hesitate to contact Engiby. We would be glad to take each opportunity to improve this document.
Last update : 03.09.2014