- Posts: 28
- Thank you received: 0
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.
Array reading error (VT_R4)
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.
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.
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
Please Log in or Create an account to join the conversation.
- 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.
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
Please Log in or Create an account to join the conversation.