dOPC Client Toolkit

SyncWrite performs a synchronous write of the value, quality and timestamp information for all items either in the group or, if it is not nil, in the parameter aItemList.

function SyncWrite(aItemList: TdOPCItemList = nil): boolean;
__fastcall boolean SyncWrite(TdOPCItemList aItemList = null);

The result will be True on successful execution, otherwise False. The function runs to completion before returning because the values are written directly to the physical device. So the function should not return until it is verified that the device has actually accepted or rejected the data. Writing to the device is not affected by the Active state of the group or item.

var ItemList : TdOPCItemList; begin ItemList := TdOPCItemList.Create(OPCServer.OPCGroups[i]); //we want to write new values to all Items of the first Group for i := 0 to ItemList.Count-1 do ItemList[i].WantValue := random(100); OPCServer.OPCGroups[i].SyncWrite(ItemList); //write values to OPC server ItemList.CheckOPCErrors('Write Items...',false); //show errors ItemList.Free; end;
Kassl GmbH Copyright © 2023. All rights reserved.