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.

Bad Waiting For Initial Data

More
22 Jun 2021 10:11 #9807 by support
I do not think there actually is a "problem" - this is the way things are supposed to work.

QuickOPC has built-in default for maximumAge (I think it is 1 second). You cannot globally change the default, but you can specify the maximumAge with each read call.
Reading from device corresponds to maximumAge of 0. Positive numbers denote specific maximum age, in milliseconds.

There is an implicit conversion from Double to UAReadParameters, which means that in many cases you do not have to construct the UAReadParameters explicitly - simply put a number of milliseconds in place of read parameters, and it will compile and work.

Best regards

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

More
22 Jun 2021 09:08 #9805 by Šilhavý
Seems like it works.

How can I change the default of maximumage for read. I would like to find out, where the problem is.

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

More
18 Jun 2021 13:49 #9793 by support
Hello.

BadWaitingForInitialData is not really an "error", in the sense that the server is allowed to return it when the data is not available at the moment. If this happens, the application code must deal with it somehow - for example, repeat the Read after some time.

There are multiple factors that can influence whether the error appears or not. For example, a "first" Read of a specific item may cause BadWaitingForInitialData, because the server cannot realistically give the data at the moment, but a subsequent Read some moments later will succeed. Also, When you Subscribe to an item, the server will start watching the item for changes, and can use the values obtained for the subscription when doing the Read, preventing the error in some cases. So a workaround might be to subscribe to the item, if you can do it upfront.

One more reason for it can be that the default parameters for Read (in QuickOPC) specify maximumAge = 1 second. This means that the server is not *required* to actually perform a read from the device, if it has a reasonably fresh value. I can hypothesize that it can also return BadWaitingForInitialData. You can try enforcing the Read from the Device by using a code similar to the following:
string CData = Client.Read(new UAReadArguments(InfoServer.Text, InfoNodeId.Text, UAReadParameters.FromDevice));

Best regards

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

More
18 Jun 2021 09:36 #9791 by Šilhavý
Hello I have question about status of the value/server when value was not changed over some time.
In this case when I want to get server status or even read the value, I get BadWaitingForInitialData:


When I open the node in another client - UAExpert and try to read value it is OK the same for status.


Formely I used Status/StatuInfo to get the status of the server, but it gave me the same error, when value was not changed for some time. Then I read somewhere, that I have to read the value before I get the status... but as I see, it is the same.
Where am I wrong?
Thanks for your reply.
Attachments:

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

Moderators: support
Time to create page: 0.050 seconds