Delphi - Reading Tags
Home Product
Details Free 
Demo Pricing &
Ordering Related
Products Support About Us

Please use our Code Center to obtain source-code and example projects/solutions:

http://codecenter.softwaretoolbox.com

 

Simple Read Example

The following example builds upon the Tutorial - Getting started with Delphi.

Reading a Single Tag:

Place the following code within the Button click event handler as follows:

var
       VTQ, Value: Variant;
       strPC, strOPC, strTag, strAccess: string;
begin
     strPC := '';
     strOPC := 'OPCLabs.KitServer.2';
     strTag := 'Simulation.Random';
     strAccess := '';

 try
       VTQ := EasyDA1.ReadItem(
           strPC,
           strOPC,
           strTag,
           strAccess,
           0);

       form1.Caption := VTQ.Value;
  except
  end;

Copyright Software Toolbox, Inc., 1996-2004, All Rights Reserved Worldwide.
148A East Charles Street, Matthews, North Carolina, USA 28105
Phone: 704-849-2773 or 1-888-665-3678 (US), Fax: 704-849-6388
sales@softwaretoolbox.com | support@softwaretoolbox.com