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.

Instantiate the client objects multiple times

14 Feb 2021 20:52 #9445 by mozesa

Thanks for your answer.

There is one more thing, as I have mentioned I went for COM objects, but I am wondering, it would be better if I implemented QuickOPC via pybind11 ?

Thanks for your help in advance.

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

12 Feb 2021 15:04 #9444 by support

Thanks for asking.

It is absolutely OK to have multiple instances of QuickOPC client objects (EasyDAClient, EasyAEClient, EasyUAClient). They are actually designed to be used that way! And, at least in the default setting, QuickOPC acts as a "broker" - it merges the requests made from the different client instances. So for example, you will get just one connection to every target server, even if you have many client objects using it. (this can be changed, but only if needed, by setting EasyXXClient.Isolated to 'true').

I would only recommended against having a *huge* number of the clients - I mean, tens of thousands or so. There is some resource consumption (memory, CPU) associated with each of them. But having couple of them, tens, hundreds - should be no problem.

Best regards
The following user(s) said Thank You: mozesa

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

12 Feb 2021 14:56 #9443 by mozesa

I would like to ask for some help.
Currently I am using your trial version but in the end I would like to buy a QuickOPC Ultimate, but first I have to convince my boss. ;)

I am developing in Python so I went for COM objects.

I created a draft class with actually two methods, a subscription one and a write value one.

Here is the gist .

I would like to avoid marshaling, unmarshaling COM objects between different threads, so I instantiate the client object within each method (which can run in different worker threads), I mean within _subscribe_multiple_monitored_items or _write_value.

I have done some tests and it seems to me that there is no drawback, I mean the 2nd client can pick up the existing connection without any issue.

So the question is that it would be a good practice?

Thanks for your help in advance.


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

Moderators: support
Time to create page: 0.069 seconds