Introduction

In a real-time computing environment, a real-time database is the core of the entire system. It is a dynamic data structure residing in the computer that supports the major data types such as real, integer, digital, string, etc. In industrial process control and management applications, a real-time database such as ONSPEC incorporates the following features:

  • Data Integrity
  • Connectivity
  • Inter-operability
  • Redundancy

An I/O Template supports the data connectivity functions in ONSPEC. It is the input/output interface program that makes data communication connections between the ONSPEC Real-time Database and the process field.

The I/O Template collects real-time data from and sends real-time data to the field instruments such as DCS, PLC, Controllers, Data Acquisition Equipment, I/O Cards/Boards. The data communication is usually accomplished through serial ports, network or direct memory access (DMA).

The Technology Package for ONSPEC Win32, Tech Pack 32 for short, running under the Microsoft Windows 95 or NT operating system is an add-on product in the ONSPEC Win32 product series. It is a set of tools which assist the programmer in creating a software interface driver between a device and ONSPEC Win32.

Even though the Tech Pack 32 has been developed to greatly minimize programming time (2-4 weeks), extensive programming may be required. Therefore, it is only recommended for programmers familiar with Microsoft Visual C++. No object-oriented features of C++ are used.

The package includes C functions that have been developed over a period of several years, and source code for a generic I/O template. Examples of the functions that can be called are:

  • sendToOnspec
  • getFromOnspec
  • initialize

The functions sendStr and getBuffer provide simple RS-232 communications with either COMM1 or COMM2 port on the computer, or one of the serial ports provided by a DEC terminal server.

The sample source code included in the package uses these functions to set up polling lists, send polling commands, and receive data from and transmit data to ONSPEC. It does not include the device-specific code. Therefore, the programmer must write the code for the data conversion routines, and the protocol-specfic routines needed for a particular device.

This package does not let a non-programmer create an I/O Template for ONSPEC Win32, as extensive programming is required. The user must be skilled in C data structures, pointers, and the use of functions in structured programming code. The user must also have extensive knowledge of the protocol, addressing scheme, capabilities, etc. of the device to be interfaced.

Because of the variety of applications and the immense difficulty of supporting code over the phone or by mail, we regret that we cannot provide support for the Technology Package. We will however, provide a day of hands-on support with one of our software engineers at our Sacramento, California, office for $1000.

This manual is intended to aid the programmer who is writing a program to interface ONSPEC with a peripheral device, such as a data acquisition unit or a programmable controller. These interfaces will be referred to as I/O templates.

The C source code (DEVICE.C) provided gives an example of an I/O template with a simple protocol. This example was built so that minimal changes could make it support other protocols. However, some devices may require a number of changes to be made.

The object file, DRIVER.OBJ, contains all the tools you will need for communication through a serial port and to ONSPEC. A full description of the functions provided are explained later in the manual.

The Technology Package for ONSPEC Win32, Tech Pack 32 for short, running under the Microsoft Windows 95 or NT operating system is an add-on product in the ONSPEC Win32 product series. It is a set of tools which assist the programmer in creating a software interface driver between a device and ONSPEC Win32.

The algorithms and suggested coding methods in the following passages are examples from existing I/O templates. Some of the examples serve only as guidelines; every individual application will have variations. However, in the interest of standardization to make the code easier to maintain and to insure that our I/O templates do not operate in conflict, all the standard conventions given here should be adhered to.

This manual will not cover in any detail the operation of ONSPEC as that information is documented elsewhere. It is recommended that the programmer have the following documents on hand.

  • ONSPEC Tutorial
  • Microsoft Visual C++ User's Guide
  • Microsoft Visual C++ Language Reference

Contact us

Feel free to contact us!

Give us a call or drop us an email to schedule a visit!