dOPC Client Toolkit
Close
dOPCGUI.FinddOPCItem

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

function FinddOPCItem(OpcServer: TdOPCDAClient; Groupname: string; Itemname: string): TdOpcItem;
TdOpcItem FinddOPCItem(TdOPCDAClient OpcServer, AnsiString Groupname, AnsiString Itemname);
Parameters
Description
OpcServer: TdOPCDAClient
The TdOPCDAClient object you want to search
Groupname: string
Name of the OPC Group you want to search.
Itemname: string
Name of the OPC Item tag you want to find

Returns the found TdOPCItem object, if no match is found the result will be nil.

Search in a given OPC Group for the OPC Item and returns an TdOPCItem object. If not found the result is 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;
Kassl GmbH Copyright © 2019. All rights reserved.