QuickOPC User's Guide and Reference
Setting Parameters (OPC Data)
Development Models > Imperative Programming Model > Imperative Programming Model for OPC Data (Classic and UA) > Setting Parameters (OPC Data)

While the most information needed to perform OPC tasks is contained in arguments to method calls, there are some component-wide parameters that are not worth repeating in every method call, and also some that have wider effect that influences more than just a single method call. You can obtain and modify these parameters through properties on the EasyDAClient or EasyUAClient object.

For the EasyDAClient object, following are its instance properties, i.e. if you have created multiple EasyDAClient objects, each will have its own copy of them:

and

// This example shows how the OPC server can quickly be disconnected after writing a value into one of its OPC items.

using System;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;

namespace DocExamples.DataAccess._EasyDAClientHoldPeriods
{
    class TopicWrite
    {
        public static void Main1()
        {
            // Instantiate the client object.
            var client = new EasyDAClient();

            client.InstanceParameters.HoldPeriods.TopicWrite = 100; // in milliseconds

            try
            {
                client.WriteItemValue("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 12345);
            }
            catch (OpcException opcException)
            {
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
            }
        }
    }
}
# This example shows how the OPC server can quickly be disconnected after writing a value into one of its OPC items.

# The QuickOPC package is needed. Install it using "pip install opclabs_quickopc".
import opclabs_quickopc

# Import .NET namespaces.
from OpcLabs.EasyOpc.DataAccess import *
from OpcLabs.EasyOpc.OperationModel import *


# Instantiate the client object.
client = EasyDAClient()

client.InstanceParameters.HoldPeriods.TopicWrite = 100  # in milliseconds

# Perform the operation
try:
    IEasyDAClientExtension.WriteItemValue(client, '', 'OPCLabs.KitServer.2', 'Simulation.Register_I4', 12345)
except OpcException as opcException:
    print('*** Failure: ' + opcException.GetBaseException().Message)
    exit()

print('Finished.')
' This example shows how the OPC server can quickly be disconnected after writing a value into one of its OPC items.

Imports OpcLabs.EasyOpc.DataAccess
Imports OpcLabs.EasyOpc.OperationModel

Namespace DataAccess._EasyDAClientHoldPeriods
    Friend Class TopicWrite
        Public Shared Sub Main1()
            Dim client = New EasyDAClient()

            client.InstanceParameters.HoldPeriods.TopicWrite = 100 ' in milliseconds

            Try
                client.WriteItemValue("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 12345)
            Catch opcException As OpcException
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message)
            End Try
        End Sub
    End Class
End Namespace

 

For the EasyUAClient object, following are its instance properties, i.e. if you have created multiple EasyUAClient objects, each will have its own copy of them:

Instance properties can be modified from your code.

In QuickOPC.NET and QuickOPC-UA, if you have placed the EasyDAClient, EasyAEClient or EasyUAClient object on the designer surface, most instance properties can also be directly edited in the Properties window in Visual Studio.

In QuickOPC-COM, your code can override the defaults if needed, by setting the properties accordingly.

 

Following properties are static, i.e. shared among all instances of EasyDAClient object:

Following properties are static, i.e. shared among all instances of EasyUAClient object:

Following properties are static unless the EasyUAClient is configured as isolated:

Please use the Reference documentation for details on meaning of various properties and their use.

Static properties can be modified from your code. If you want to modify any of the static properties, you must do it before the first instance of EasyDAClientEasyAEClient or EasyUAObject object is created.

You can also use the following components to set the static properties:

Configuration Component Sets Static Properties of
EasyAEClientManagement component - EasyAEClient class
EasyDAClientManagement component - EasyDAClient class
EasyUAClientManagement component - EasyUAClient class

In Visual Studio, drag the corresponding component from the Toolbox to the designer surface, select it, and you can then view and modify the settings in the Properties window.

Note that the EasyXXClientConfiguration (where XX is either AE/DA/UA) components are just a “peek” to properties of the EasyXXClient that are static in nature. For this reason, you should normally have just one instance of the EasyXXClientConfiguration component in your application, and you should place it in such a way that it gets instantiated before the first operations on the EasyXXClient object take place. You can achieve this easily e.g. by placing the EasyXXClientConfiguration component onto the main (first) form of your application.

The EasyUAClientManagement component also has a LogEntry event, which functions as a “projection” of the static EasyUAClient.LogEntry event. You can easily hook an event handler to this event to process log entries generated by the EasyUAClient component.

When Multiple Implementations are available (such as for OPC Data Access, with native and NET API client), not all parameters apply to (are used with) all implementations. In such case, the reference documentation for the affected parameter (property) specifies the circumstances under which the parameter is used.
See Also