Example: NI Demo OPC Client

NI DataSocket

Example: NI Demo OPC Client

Uses DataSocket to connect to data on OPC servers.

Description

This example connects to a single OPC item on the National Instruments Demo OPC Server. You can change the hostname, server, and item fields to work with other OPC servers installed on your computer or browse for available OPC items.

Controls, Properties, Methods, and Events

This example demonstrates the following controls, properties, methods, and events:

CWDataSocket

ConnectTo, Update, Disconnect, OnDataUpdated, OnStatusUpdated

CWData

Value, GetAttribute

Example Location

Samples\DataSocket\OPC

See Also

OPC Quality and Timestamp Attributes Example

Multiple OPC Items Monitor Example