- Posts: 49
- Thank you received: 2
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.
How to subscribe to multiple OPC DA items, when amount of variables is changing?

Please Log in or Create an account to join the conversation.
It seems to me that you can simply do
Please Log in or Create an account to join the conversation.
My console app has following arguments:
Due to the item_no parameter I tried to define a list of items:
So I should use always this list (or something similar) in the client.SubscribeMultipleItems(...) expression.
Please Log in or Create an account to join the conversation.
It's easy to do. You just need to convert what you have into the form expected by the method. But I cannot answer it without knowing in which form (object types, their properties etc.) you get your items. Please share a piece of code illustrating that.
Regards
Please Log in or Create an account to join the conversation.
In my C# .net framework 4.7.2 app I am subscribing to multiple OPC DA items. But my app is called from a parent app with arguments. That means, the number of items and the item definitions come from the argument parameters and changing each time.
Normally I subscribe to 3 items with following code. How should I modify my code, so that I can sometimes for example subscribe to 2 items sometimes to 8 items , depending on the argument parameters? With other words I would like to use a List of items for the client.SubscribeMultipleItems expression. But couldn't find the correct way for this.
Please Log in or Create an account to join the conversation.