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.

I can write to an OPC server but not read

More
19 Oct 2019 13:45 #7846 by support
Thank you for update.

I am somewhat lost here. Usually, when there is "Access denied", it is a permanent thing. In such case, if nothing else helps, I would recommend experimenting with difference security settings in QuickOPC, as described here: www.opclabs.com/forum/connections-reconnections-com-dcom/124...ng-to-remote-machines-via-code .

But, if you only get the error sometimes (please confirm), I am not sure if that makes sense.
Can you - very roughly - tell how often you get the error? 1 out of 5, 1 out of 100, 1 out of 1000 reads, ... ?

Isn't there any observable pattern? And specifically, does it happen with the first read after the app start,s and/or after some period of longer inactivity?

Regards

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

More
17 Oct 2019 13:49 #7838 by mikeboiko
Hi,

I tried with the following code and got the same results as before (Access id denied)
EasyDAClient.SharedParameters.Topic.SlowdownWeight = 0.0f;
EasyDAClient.SharedParameters.Topic.SpeedupWeight = 0.0f;
this.daClient.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
this.daClient.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;

My project is using OpcLabs.BaseLib version 5.35.1115.1
I mentioned in a previous post that I did try running the demo application with the newest version of OpcLabs and the results were the same.

Also, I tried the new code snippet with Async enabled and disabled. The results were the same both times.

Thanks,
Mike

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

More
17 Oct 2019 06:49 #7832 by support
Thank you.

Can you please put a code similar to the following at the beginning of your program?
EasyDAClient.SharedParameters.TopicParameters.SlowdownWeight = 0.0f;
EasyDAClient.SharedParameters.TopicParameters.SpeedupWeight = 0.0f;
var target = new EasyDAClient();
target.InstanceParameters.UpdateRates.ReadAutomatic = Timeout.Infinite;
target.InstanceParameters.UpdateRates.WriteAutomatic = Timeout.Infinite;

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

More
15 Oct 2019 20:37 #7831 by mikeboiko
Hi,
Below is some more details of e.Exception properties:
Message "Access is denied. " string
Source "OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient" string
HResult -2147024891 int
Thanks,
Mike

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

More
09 Oct 2019 15:44 #7810 by support
Thank you.

Is "Access is denied" the precise/full exception message?

Also, if you can, please provide more info about that exception - specifically, what is in the .HResult and .Source properties of the Exception object.

Best regards

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

More
09 Oct 2019 14:37 #7809 by mikeboiko
Oh sorry, I misunderstood your question.

I've went and tested my before/after applications again and I do see a difference now.

Before, when I would perform a write operation, where the original value is different than the value being written, I would get an ~30s delay and the following error:
"Write not completed. This error indicates that it could not be verified that the requested write operation was completed during the timeout period. It is possible that the write operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled)."

After adding the additional statement, running the write operation yields an immediate "Access is denied" error. There is no 30s delay as before.

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

More
09 Oct 2019 14:21 #7808 by support
I understand that you are getting "Access is denied".
I asked you whether you are still getting the ""Read not completed.../Write not completed..." errors.

regards

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

More
09 Oct 2019 14:18 #7807 by mikeboiko
Hi,
No, I'm saying that the errors are still there. Adding the additional statement did not rectify the issue - I'm still getting the "Access is denied" error.
As I mentioned a couple of times, I'm able to read successfully using Matrikon, Kepware and h-opc clients.
Thanks,
Mike

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

More
09 Oct 2019 08:47 #7806 by support
Hello,
thank you for update.

In your original report, you had either "Access is denied", or "Read not completed.../Write not completed..." errors.

Are you saying that now with the additional statement, the "Read not completed.../Write not completed..." errors are gone?

Best regards

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

More
07 Oct 2019 22:31 #7804 by mikeboiko
Hi,

I tried running my application after adding the following LOC:
daClient.InstanceParameters.Mode.AllowAsynchronousMethod = False

The results remained the same. I still have an Access is Denied error. Like I mentioned earlier, I was able to get the read operation to work successfully on several other OPC clients, even using async reads.

Any other ideas?

Thanks,
Mike

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

Moderators: support
Time to create page: 0.061 seconds