QuickOPC User's Guide and Reference
Examples - OPC Data Access - Read a single item
View with Navigation Tools

.NET

// This example shows how to read a single item, and display its value, timestamp and quality.

using System;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;

namespace DocExamples.DataAccess._EasyDAClient
{
    partial class ReadItem
    {
        public static void Main1()
        {
            // Instantiate the client object.
            var client = new EasyDAClient();

            DAVtq vtq;
            try
            {
                vtq = client.ReadItem("", "OPCLabs.KitServer.2", "Simulation.Random");
            }
            catch (OpcException opcException)
            {
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
                return;
            }

            Console.WriteLine("Vtq: {0}", vtq);
        }
    }
}

COM

// This example shows how to read a single item, and display its value, timestamp and quality.

$Client = new COM("OpcLabs.EasyOpc.DataAccess.EasyDAClient");

try
{
    $Vtq = $Client->ReadItem("", "OPCLabs.KitServer.2", "Simulation.Random");
}
catch (com_exception $e)
{
    printf("*** Failure: %s\n", $e->getMessage());
    Exit();
}

printf("Vtq: %s\n", $Vtq);
See Also

Conceptual

Examples - OPC Unified Architecture

Examples - OPC DA Layered Extensions