Chapter 17. Working With Data

Table of Contents

17.1. Data Points
17.1.1. Creating New Points
17.1.2. Deleting Points
17.1.3. Viewing Data Points
17.1.4. Point Size Limits
17.2. Data Communication Concepts
17.2.1. Send and Receive Data
17.2.2. Client - Server
17.2.3. Synchronous and Asynchronous Communication
17.3. Data Exchange Protocols
17.3.1. OPC Protocol
17.3.2. OPC Items and Properties
17.3.3. DDE Protocol
17.3.4. TCP and Tunnelling
17.3.5. The DataHub API
17.4. Data Organization
17.4.1. Data Domains
17.4.2. Assemblies, Subassemblies, Attributes, and Properties
17.4.3. Attributes and Types
17.4.4. Example 1: Attributes and Types
17.4.5. Example 2: Private Attributes

This chapter gives an overview of how the OPC DataHub handles data and the various protocols it works with.

17.1. Data Points

Each value stored in the OPC DataHub is called a point. A point has the following attributes:

    Name: a character string. Currently the only limit on length is internal buffer size, about 1000 bytes by default.

    Value: an integer, floating-point number, or character string.

    Time: the date and time of the last significant change to the point's value, confidence, quality or other status information.

    Quality: the quality of the connection, assigned by the OPC DataHub for this point, such as Good, Bad, Last known, Local override, etc.

    Confidence: a value from 0 to 100 that indicates as a percentage the probability that the value shown for the point is actually its true value. This feature can be accessed and changed only by using the API. the OPC DataHub never uses confidence itself, but carries it for use by client applications.

17.1.1. Creating New Points

The OPC DataHub automatically creates a point whenever a connecting program tries to read, write, or create a point that doesn't exist. When the point is created, the OPC DataHub assigns its value, time, quality, and confidence.

It is possible to have the OPC DataHub create points and assign values to them at startup. Sometimes referred to as seeding, this is done with supplemental configuration files. Please refer to Appendix B, Configuration Files for more details.

17.1.2. Deleting Points

It is not possible to directly delete points from the OPC DataHub. Should a point no longer be in use by any of the participating programs, when the DataHub is shut down and restarted, the point will no longer appear.

17.1.3. Viewing Data Points

You can view the values of all data points with the Data Browser.

17.1.4. Point Size Limits

The OPC DataHub itself does not limit the size of a point data message. The only limits are those imposed by the operating system, and in Windows there are no such limits. If, however, you intend to share data between with Linux or QNX computers, there is a limit of 64000 bytes for QNX and 128000 bytes for Linux. In any case, bear in mind that very large values will take some time to be transmitted over a network.