TiVCLComponent.GetOPCItemAutoConnect
TiVCLComponent
Used to get whether or not the OPC Item Auto-Connects for the specified OPC
Item.
procedure GetOPCItemAutoConnect(Index: Integer ) : Boolean;
Description
Use the GetOPCItemAutoConnect to inspect whether or not an OPC connection is
automatically created for a particular OPC Item specified by the Index
parameter. When AutoConnect is TRUE, when the component is instantiated, a connection
to the OPC server for this item is automatically made. When AutoConnect is
FALSE, you must call OPCItemActivate to create a connection to the OPC Server.
AutoConnect causes a connection to be made to the OPC server anytime streaming
is done with the component. If you use runtime property editors for our
components and the end-user changes properties and clicks on OK or Apply, the
component will re-stream in all properties and reconnect to the OPC Server if
AutoConnect is set to TRUE.
If you need complete control over when the connections are made and
disconnected between the Component and the OPC Server, set AutoConnect to FALSE and then
use the OPCItemActivate and OPCItemDeactivate procedures.
Example
Delphi
Value := iComponent.GetOPCItemAutoConnect(0); //1st OPC Item AutoConnect Setting
C++ Builder
Value = iComponent->GetOPCItemAutoConnect(0); //1st OPC Item AutoConnect Setting
Note: The Index value is 0 based.
Contents | Index | Previous | Next