TiOPCItem.AutoConnect
TiOPCItem
Used to specify whether or not the OPC Item Auto-Connects for this OPC Item.
property AutoConnect : Boolean;
Description
Use AutoConnect to inspect whether or not an OPC connection is automatically
created for this OPC Item when the component is created.
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 Activate to manually 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 Activate and Deactivate procedures.
Example
Delphi
iComponent.OPCItem[0].AutoConnect := True; //Sets the 1st OPC Item's AutoConnect Property
Value := iComponent.OPCItem[0].AutoConnect; //Gets the 1st OPC Item's AutoConnect Property
C++ Builder
iComponent->OPCItem[0]->AutoConnect = True; //Sets the 1st OPC Item's AutoConnect Property
Value = iComponent->OPCItem[0]->AutoConnect; //Gets the 1st OPC Item's AutoConnect Property
Contents | Index | Previous | Next