dOPC Client Toolkit
Close
dOPCDA.TdOPCPropertyBrowser.Props

Props contains the TdOPCItemProperties objects which can be accessed via the Index parameter.

property Props [Index: Integer]: TdOPCItemProperties;
__property TdOPCItemProperties Props[int Index];

It is the default property of TdOPCPropertyBrowser.

procedure TForm1.Button1Click(Sender: TObject); var PB : TdOPCPropertyBrowser; Props : TdOPCItemProperties; Prop : TdOPCItemProperty; i,c : integer; begin PB := TdOPCPropertyBrowser.create(nil); //create property browser PB.OPCServer := dOPCServer1; //set server PB.AddItem('Random.Int4'); //add item id PB.AddItem('Random.String'); //add item id PB.Execute; //get properties for item from opc server for i := 0 to PB.Count-1 do begin Props := PB[i]; if Props <> nil then for c := 0 to Props.Count-1 do begin Prop := Props[c]; ShowMessage(IntToStr(Prop.Id)+' -> '+ Prop.Description); end; end; PB.Free; end;

or

procedure TForm1.Button1Click(Sender: TObject); var PB : TdOPCPropertyBrowser; Prop : TdOPCItemProperty; // defined in unit dOPCIntf i,c : integer; begin PB := TdOPCPropertyBrowser.create(nil); //create property browser PB.OPCServer := dOPCServer1; //set server PB.AddItem('Random.Int4'); //add item id PB.AddItem('Random.String'); //add item id PB.Execute; //get properties for item from opc server for i := 0 to PB.Count-1 do for c := 0 to PB[i].Count-1 do begin Prop := PB[i][c]; if Prop <> nil then ShowMessage(IntToStr(Prop.Id)+' -> '+ Prop.Description); end; PB.Free; end;
Kassl GmbH Copyright © 2019. All rights reserved.