TiVCLComponent.OPCItemActivate

TiVCLComponent

Used to instantiate a connection between the specified OPC Item and the OPC Server.

procedure
OPCItemActivate(Index: Integer);

Description

Use the OPCItemActivate to manually instantiate a connection between the specified OPC Item and the OPC Server. 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.

Example

Delphi

iComponent.OPCItemActivate(0); //Connect 1st OPC Item

C++ Builder

iComponent->OPCItemActivate(0); //Connect 1st OPC Item

Note: The Index value is 0 based.

Contents | Index | Previous | Next