public: __fastcall boolean SyncWrite( TdOPCItemList aItemList = nil );
public boolean SyncWrite( TdOPCItemList aItemList );
Public Function SyncWrite( aItemList As TdOPCItemList = nil ) As boolean
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.
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;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.