Professional OPC
Development Tools

logos

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.

× If you are developing in .NET, but are using the OPC-UA (OPC Unified Architecture), please post in the QuickOPC-UA category instead.

Read Multiple OPC DA item

More
14 Mar 2022 12:51 #10741 by support
Replied by support on topic Read Multiple OPC DA item
Hello.

These are al performance-related questions that are impossible to answer with certainty without knowing the details about the OPC server, how it communicates with the technology etc.

In general I would simply read all the items, and would not bother that "the OPC Server is too much loaded" until it actually happens - because it may be just fine. Only if you find that reading everything at once causes a problem, I would resort to the slower approach.

Best regards

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

More
14 Mar 2022 11:18 #10740 by mut9bu
Replied by mut9bu on topic Read Multiple OPC DA item
Hi

Of course i could read all the 128 array elements. But I have to read a lot of other items too.
So if i would do that for all items, that have the same issue, i would read perhaps 10 or 20 times more items then realy needed.

I am alittle bit afraid that the OPC Server is too much loaded in this case.

What would you suggest?

1) Should i read with multiple item reading method all the arrays?
2) Or should i read with single tag item reading method, and read repeatedly, until i get null as value?

Which alternative would be better from the aspect of loading the OPC Server less.?
I know definitly that 2 is slower.

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

More
14 Mar 2022 10:59 #10739 by support
Replied by support on topic Read Multiple OPC DA item
Hello.

Unfortunately there is no method to read multiple items while specifying a condition when to stop. This is how OPC works, it is not a QuickOPC thing.

What is wrong with reading all 128? Is it because it takes too long?

If so, there might be a "middle ground" solution to speed it up, such as reading some number, say 16 items at a time.

Best regards

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

More
14 Mar 2022 09:05 #10736 by mut9bu
Hello
I use the below code, which i use to read multiple OPC DA items from the server. So far working fine.
But i have one use case, where i cannot use this multiple reading method very well:
I have to read the Axis names of a CNC machine over an Array OPC DA Item. Because i don't know the number of axis (there is no Item showing this)
I have to read the max possible number of Axis names of the array (The array lenght is perhaps 128, but there are only 12 axis). Isn't it possible to make a query each time in the multiple item reading method, and stop the reading when item value is null or empty?

Alternatively i am using the single item reading method. Here i can make a query, but reading all the tags takes much longer then multiple reading.

//Code for multiple reading
var client = new EasyDAClient();

DAVtqResult[] vtqResults = client.ReadMultipleItems("OPCLabs.KitServer.2",
new DAItemDescriptor[]
{
"!BSTR," + OPC_device_name + ",NC.AxisNamesPhys{0",0}",
"!BSTR," + OPC_device_name + ",NC.AxisNamesPhys{1",0}"
"!BSTR," + OPC_device_name + ",NC.AxisNamesPhys{2",0}"
...
...
// I have toread 128 times to be sure that i have read all the axis names :-(

});

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

Moderators: support
Time to create page: 0.049 seconds