dOPC Client Toolkit

self defined group for better handling of your OPC items.

TdOPCGroup = class(TCollectionItem);
class TdOPCGroup : public TCollectionItem;

OPC groups are the way the OPC client tells the OPC server which OPC items it is interested in. They exist mainly for performance reasons. A OPC client have full freedom in how they create the OPC groups, and which items they put into them. You can have the same item in multiple groups; in fact you can even have the same item multiple times in the same group. 

The most important property is TdOPCGroup.OPCItems. With the help of this property you can add OPC items (see also: TdOPCItem) to an OPC group to get the item value from the underlying device.

var Group: TdOPCGroup; begin Group := dOPCClient.OPCGroups.Add('MyGroup',true,rOnDatachange.IsChecked); for i := 0 to 999 do // add 1000 OPC Items begin // Parameter "true" means: no direct add to the OPC server subscription (add later) Group.OPCItems.AddItem(format('ns=6;s=DataItem_%.4d',[i]), true); end; Group.OPCItems.OPCAddAllItems; // Now add all Items with one OPC call end;
Kassl GmbH Copyright © 2021. All rights reserved.