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.

Using Quick OPC as a web client

More
22 Jul 2022 09:44 #11067 by support
Hello.

We do not have examples with Blazor, but if you open the C# examples solution, you will see that there are multiple simple Web-based example in other (older) Microsoft Web technologies. The principle, however, remain the same, and I do not expect problems.

QuickOPC is designed with this kind of usage in mind.

One thing that helps here is that QuickOPC automatically manages connections. Let's say you will need to do an OPC read inside the Web request. And such requests are coming in randomly. You can simply make the read call inside your handler, and QuickOPC will take care of opening the connection when it is not currently open, and closing it *after some time* when it is no longer in use. This way, requests that come in close sequence will not cause unnecessary OPC connects/disconnects, which are quite costly performance-wise.

OPC calls that are made to each target server will be serialized by QuickOPC.

You can either instantiate an instance of EasyXXClient for each request handling, OR you can use used a shared instance (if the parameters needed on the instance are the same across the requests, which probably they are). For heavier usage, one instance would be preferable, because creating and destroying the instances also consumes resources. But in the terms of connection handling described above, the effects would be the same, because the instances perform their work using a shared "engine" anyway (unless you set Isolated = true on the instance, which you probably do not want to do).

If you need OPC subscriptions, then obviously you cannot have a subscription inside a short-lived Web request handling. In such case you really need a "shared" EasyXXClient instance, make a subscription on it, and then design a mechanism in which the data will be passed to/from the actual requests.

I hope this helps

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

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

More
21 Jul 2022 18:06 #11066 by mut9bu
Yes thats correct. So multiple web clients should be able to use the OPC client syncronously if needed

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

More
21 Jul 2022 13:13 #11063 by support
Hello.

The OPC client code (QuickOPC) will run on the (Web) server side, is that a correct assumption?

Regards

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

More
20 Jul 2022 16:45 #11062 by mut9bu
Hello
I want to use Quick OPC for building a web client, in my web server app. We have programmed our web application in asp.net core (Blazor with C#). Are there some examples how we can build a web client , both for OPC DA classic and OPC UA?

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

Moderators: support
Time to create page: 0.043 seconds