TiVCLComponent.OPCItemActivateSend
TiVCLComponent
Used to instantiate a connection between the specified OPC Item and the OPC
Server while immediately sending the first piece of data.
procedure OPCItemActivateSend(Index: Integer);
Description
Use the OPCItemActivateSend to manually instantiate a connection between the
specified OPC Item and the OPC Server while immediately sending the first packet
of data. If you have not already setup the OPC item with the SetOPCItemComputerName, SetOPCItemServerName, SetOPCItemItemName, and OPCItemPropertyName procedures or have not setup the item through the built-in property editor,
then a connection will not be made.
If you need automatic control over when the connections are made and
disconnected between the Component and the OPC Server, use SetOPCItemAutoConnect procedure to set the AutoConnect property to TRUE so that a connection to the
OPC Server is made automatically during streaming/loading of the component.
However the automatic will not send out the first piece of data immediately upon
connection, but will wait until the item's update rate has gone through one
cycle.
Example
Delphi
iComponent.OPCItemActivateSend(0); //Connect 1st OPC Item and immediately sends data
C++ Builder
iComponent->OPCItemActivateSend(0); //Connect 1st OPC Item and immediately sends data
Note: The Index value is 0 based.
Contents | Index | Previous | Next