OPC Data Access does not allow the client to directly set values of OPC properties - they are all "read only".
What you are probably looking for is to influence how often you get notifications from the server about changes in the item's value or status. This is of course possible. With the EasyDAClient component, you specify the UpdateRate when calling SubscribeItem or SubscribeMultipleItems.
For example, the argument "1000" in the call to SubscribeItem below, indicates that you want an update rate of 1000 milliseconds (1 second).
// This example shows how subscribe to changes of multiple items and display the value of the item with each change,
// using a callback method specified using lambda expression.
using System.Diagnostics;
using OpcLabs.EasyOpc.DataAccess;
using System;
using System.Threading;
namespace DocExamples
{
namespace _EasyDAClient
{
class SubscribeItem
{
public static void CallbackLambda()
{
// Instantiate the client object
var easyDAClient = new EasyDAClient();
Console.WriteLine("Subscribing...");
// The callback is a lambda expression the displays the value
easyDAClient.SubscribeItem("", "OPCLabs.KitServer.2", "Simulation.Random", 1000,
(sender, eventArgs) =>
{
Debug.Assert(eventArgs != null);
if (eventArgs.Exception != null)
Console.WriteLine(eventArgs.Exception.ToString());
else
{
Debug.Assert(eventArgs.Vtq != null);
Console.WriteLine(eventArgs.Vtq.ToString());
}
});
Console.WriteLine("Processing item changed events for 10 seconds...");
Thread.Sleep(10 * 1000);
Console.WriteLine("Unsubscribing...");
easyDAClient.UnsubscribeAllItems();
Console.WriteLine("Waiting for 2 seconds...");
Thread.Sleep(2 * 1000);
}
}
}
}
The value of the "scan rate" property than *may* be changed by the server, but it's kind of server specific, and you are probably not interested in it then anyway.
Best regards