dOPC Client Toolkit Help file
dOPCGUI.FinddOPCItem Function
C++
TdOpcItem FinddOPCItem(
    tdOPCServer OpcServer, 
    AnsiString Groupname, 
    AnsiString Itemname
);
C#
TdOpcItem FinddOPCItem(
    tdOPCServer OpcServer, 
    String Groupname, 
    String Itemname
);
Visual Basic
Function FinddOPCItem(
    OpcServer As tdOPCServer, 
    Groupname As String, 
    Itemname As String
) As TdOpcItem

dOPCGUI

search in OPC Group for the OPC Item and returns an dopcitem object. If not found the result is NIL 

search in OPC Group for the OPC Item and returns an dopcitem object. If not found the result is NIL 

FinddOPCItem scans the passed OPCServer for the also passed Groupname and Itemname and returns the result as a TdOPCItem.

If no match is found the result will be nil.

var
  opcItem : tdOPCItem;
begin
  Item :=  FinddOPCItem(OPCServer,'MyOPCGroup','Random.String');
  if Item <> nil then   // if Item exists
    Item.WriteSync('New Value')
  else
   ShowMessage('OPC Item not found');
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.