Professional OPC
Development Tools

logos

Array reading error (VT_R4)

More
29 Nov 2013 14:53 #1574 by Gardoni
Replied by Gardoni on topic Array reading error (VT_R4)
Hello.
Code is very simplyl, because we are just testing your product before eventually purchase it.

private void button1_Click(object sender, EventArgs e)
{
EasyDAClient client = new EasyDAClient();
object p = new object();
Stopwatch sw = new Stopwatch();

sw.Start();

// Array of VT_I4, reading OK
p = client.ReadItemValue("", "OPCTestLab.OPCAnalyzer.1", "InjectPC.IdraSystem.Data.ExtraParameters1");

// Array of VT_R4, error
p = client.ReadItemValue("", "OPCTestLab.OPCAnalyzer.1", "InjectPC.IdraSystem.Data.ExtraParameters");


MessageBox.Show(sw.ElapsedMilliseconds.ToString());
sw.Reset();
}

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

More
29 Nov 2013 14:40 #1573 by support
Replied by support on topic Array reading error (VT_R4)
Interesting. I do not see the error, or anything wrong, in the client-server communication.
And, I have tried the similar thing with out simulation server, and it can read arrays of VT_R4 well.


Would you mind sharing the relevant part of your source code? Including variable declarations.

Thank you

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

More
29 Nov 2013 13:09 #1572 by Gardoni
Replied by Gardoni on topic Array reading error (VT_R4)
Hello. OPCLabs1.* are the traces of my C# app.
It should contain the error I wrote before.
OPCLabs2.txt is the trace of ICONICS OPCDataSpy
The answer is yes, it is written in c# so you can move it.
BR
Davide Gardoni
Attachments:

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

More
29 Nov 2013 08:51 #1571 by support
Replied by support on topic Array reading error (VT_R4)
I suspect that this might be a server issue. In order to determine the real reason, may I ask you to use OPC Analyzer and collect logs of the communication
  • using the ICONICS OPC DataSpy
  • using your application written with QuickOPC

Instructions: www.opclabs.com/download/file/160-QuickOPC-1-How%20to%20use%20OPC%20Analyzer?start=20

The OPC Analyzer download: www.opclabs.com/files/transient/20131129/OPCAnalyzer%201.03.1014.msi

Also, is your app written in C#? If so, I will move this thread under QuickOPC.NET where it belongs.

Best regards

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

More
28 Nov 2013 13:39 #1569 by Gardoni
Hello. We are testing Array Reading from an "Iconics OPC Server Toolkit" compiled OPCServer. Its name is Idra.runtimeDA. Basically reading a VT_I4 array is working using
p = client.ReadItemValue("", "Idra.runtimeDA", "InjectPC.IdraSystem.Data.ExtraParameters1");
where p is an object and ExtraParameters1 is an array of VT_I4
If I try to read
p = client.ReadItemValue("", "Idra.runtimeDA", "InjectPC.IdraSystem.Data.ExtraParameters");
where ExtraParameters is an array of VT_R4
I get this error: InnerException is "Specified array was not of the expected type"
I can read both arrays succesfully with a standalone OPC Client (see attached picture), so I need your help.
Davide Gardoni
Idra srl
Attachments:

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

Moderators: support
Time to create page: 0.195 seconds

      

 Recommend this on Google