dOPC Client Toolkit
Close
dOPCGUI.TdOPCGUI.GetdOPCItem

get the orginal dOPCItem from dOPCServer 

GetdOPCItem returns the assigned TdOPCItem for the passed control.

function GetdOPCItem(Control: tdOPCControl; PropName: string = ''): tdopcItem;
__fastcall tdopcItem GetdOPCItem(tdOPCControl Control, AnsiString PropName = '');

If you have only one item assigned to the control, you can omit the PropName parameter.

procedure TForm1.Button1Click(Sender: TObject); var Item : TdOPCItem; begin Item := dOPCGUI1.GetdOPCItem(Edit1); //get OPC item from control if item <> nil then //if item assigned Item.WriteSync('Hello') //write new value to item else ShowMessage('no item assigned'); end;
Kassl GmbH Copyright © 2019. All rights reserved.