Professional OPC
Development Tools


Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Reading OPC DA Items Cyclic

07 Mar 2022 11:15 #10707 by support
Replied by support on topic Reading OPC DA Items Cyclic

QuickOPC does connection/disconnections for you, you cannot directly control it ( )

QuickOPC holds the connection open for some time after each read. If your code makes the next reader after a longer time, a new connection will be needed. You can increase the hold period for it to be longer than your read cycles, and then the connection will stay open.

An example of setting the hold period is here:

But it does the opposite (setting it very short). You need to set it longer (and for Read, not for Write, so it would be the .TopicRead property)

Best regards

Please Log in or Create an account to join the conversation.

07 Mar 2022 10:36 #10706 by mut9bu
I can connect to the remote OPC server and read multiple tags with the following code, without problem. But I want to read the items periodicaly.
If I run the code periodicaly, i think i will also make the connection to the OPC DA Server each time repeatedly.
How can I first just make the connection to the OPC DA server, and then read the items? (seperately)
So , i could run just the reading part periodically.
I couldnt a find a code example, for just connecting to the server (without reading tag)

Or is there a better way for reading periodically?

public static void Main1()
// Instantiate the client object.
var client = new EasyDAClient();

DAVtqResult[] vtqResults = client.ReadMultipleItems("opcda://10.92.XXX.XXX/OPC.IwSCP.1",
new DAItemDescriptor[]
"Simulation.Random", "Trends.Ramp (1 min)", "Trends.Sine (1 min)", "Simulation.Register_I4"

for (int i = 0; i < vtqResults.Length; i++)
Debug.Assert(vtqResults != null);

if (vtqResults.Succeeded)
Console.WriteLine("vtqResults[{0}].Vtq: {1}", i, vtqResults.Vtq);
Console.WriteLine("vtqResults[{0}] *** Failure: {1}", i, vtqResults.ErrorMessageBrief);

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.053 seconds