Professional OPC
Development Tools



24 Mar 2015 12:48 #2997 by support
Replied by support on topic ReadingItemValue
When you get this exception (OPC operation failure), the actual details are in its InnerException. Please have a look there and post the error message here.

The likely reason for the exception is in DCOM configuration.

If you receive a DAVtqResult where Exception is null and Vtq is not null, then the fields in the DAVtq (value, timestamp, and quality) are always those returned to us by the OPC server. If the Value is null, then most likely there a non-good quality in the Vtq.Quality. What is the quality you are getting?

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

24 Mar 2015 06:51 - 24 Mar 2015 12:49 #2991 by Rekha
ReadingItemValue was created by Rekha

Currently I am using evl version of EasyDAClient to develop the client application in Window Form application C# .Net framework 4.5.

There are two OPC remote servers to connect from client.
It is working fine when I try to read itemvalue from one server.
But there is an issue("OPC Operation Failure Exception") when it is reading item value from another server.
That exception was gone away when I changed AllowSynchronousMethod to true. But still value of selected item is null.

Please do refer the code i am using to read item value.
            string machineName = textBoxMachineName.Text.ToString();
            string servername = listBox1.Text.ToString();
            string itemID = textBoxItemID.Text.ToString();
            EasyDAClient easy = new EasyDAClient();
                DAVtq vtgresult = this.easyDAClient1.ReadItem(machineName, servername, itemID);
                //string value= this.easyDAClient1.ReadItemValue(machineName, servername, itemID).ToString();
                //  if (vtgresult.Quality.IsGood() == true)
                //   {
                if (vtgresult.HasValue() == true)
                    this.textBox1.Text = vtgresult.DisplayValue().ToString();
                //  this.textBox1.Text = this.easyDAClient1.ReadItemValue(machineName, servername, itemID).ToString();
                //  }
            catch (OpcException ex)
                throw new ApplicationException(ex.Message);
Could you please provide some info regarding this issue?

Tks in advance!
Last edit: 24 Mar 2015 12:49 by support. Reason: code formatting

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

Moderators: support
Time to create page: 0.175 seconds


 Recommend this on Google