dOPC Client Toolkit Help file
dOPC.TOnOPCDataChangeEvent Type
C++
(Sender: TObject; ItemList: TdOPCItemList) ( TOnOPCDataChangeEvent)();
C#
TOnOPCDataChangeEvent
Visual Basic
TOnOPCDataChangeEvent

dOPC

TOnOPCDataChangeEvent is generated when a value or the quality of a value for an item has changed.

This event will not be triggered before the group update. Therefore item values will be buffered by the server until the next update, which is defined by UpdateRate. Only values of items that are active and whose groups are active will be sent to the client in this event.

procedure TForm1.OPCServerDatachange(Sender: TObject; ItemList: TdOPCItemList);
var
  i: integer;
  Item : TdOPCItem;
begin
  for i := 0 to ItemList.Count-1 do //more than one item possible
  begin
    Item := ItemList[i];
    Memo1.Lines.Add(format('Item %s Value %s', [Item.ItemId,Item.ValueStr]));
  end;
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.