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.

How to Use SubscribeMultipleItems in Page_Load of a page Asp.net

More
26 Sep 2012 14:44 #1036 by support
Hello,
using Ajax solves the issue of not refreshing the page, so you can reduce the communication to just the data values, but under normal conditions, it still requires that the activity (requests) come from the client side. When you start mentioning SubscribeMultipleItems, you are attempting to turn this model around - with this method, there is an activity that comes "from within" the componen, but the main issue not in how to subscribe, but what to do when the update arrives. You cannot have the Web server send the data to the browse when the server wants. The only way I know about to simulate this would be with something called "long polling", wher basically the Web service that processes the AJAX requests would block until the data becomes available, and the requests will be reissued immediately after such response is received, but currently we do not provide a code for "plumbing" this together.
But I think your main concern and main intent was to prevent the unnecessary OPC reads. If so, there is absolutely no need to use SubscribeMultipleItems. The QuickOPC is designed in such a way that internally it detects a repeating pattern of ReadXXXX calls, and creates, updates and removs OPC subscriptions as needed. When you call ReadXXXX, if the "recent enough" value is available, it will be provided to your code without any comunication to the OPC server or the device. There are parameters to control the maximum age (default is 1 second). So, you can have the browse poll for the data and use ReadXXXX in your Web app server-side code.
Admittably, this does reduce possibly unnecessray traffic between the browser and the Web server, but that can be done by extra coding; but please understand that trying to use SubscribeXXXX will not bring that benefit either.
Best regards,

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

More
24 Sep 2012 11:32 #1035 by FernandoSeleski
I am making an asp.net page, to monitor variables of the OPC server, where each state change must return its value to the Asp.net page, with ReadItemValue already did, but I use component of Ajax to refresh the page without post back, as I have several variables (boolean and real) on this page, as it becomes slow, I would use a method only when there is an alteration in the state of variable opc server, to optimize the system.
I appreciate the attention
Fernando Seleski

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

More
22 Sep 2012 09:37 #1034 by support
Can you explain what are you trying to achieve first?
OPC subscriptions are usually made to exist for longer timespans, while ASP.NET page code is only executed for short-lived Web request processing.

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

More
21 Sep 2012 19:12 #1033 by FernandoSeleski




<div id="gt-alpha" aria-label="Você está usando uma linguagem Alpha. Essa linguagem ainda está em estágios iniciais de desenvolvimento, mas gostaríamos de mostrar uma prévia para você!" data-tooltip-align="l,c" data-tooltip="Você está usando uma linguagem Alpha. Essa linguagem ainda está em estágios iniciais de desenvolvimento, mas gostaríamos de mostrar uma prévia para você!" style="display: none">Hello

I'm trying to use the method SubscribeMultipleItems to read my OPC server variables, in page_load of webforms, but is not starting the OPC server.
With ReadItemValue starts the OPC server,
But I would use the SubscribeMultipleItems because with ReadItemValue the asp.net page becomes slow.

I appreciate the attention
Fernando Seleski




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

Moderators: support
Time to create page: 0.057 seconds