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.

How to retrieve a large array of data

More
06 Nov 2012 10:07 #1089 by support
Hello,
re "It consistently displayed Value: System.Single[] and Quality: Good GoodNonspecific LimitOk (192)": This is the expected behavior. It means that an array value has been received. Currently the Demo app does not display the array elements but they are there.
re " it consistently returns a status of: Bad ConfigError LimitOk (4) and it also causes the quality displayed by the official Demo Application to change its quality to Bad ConfigError LimitOk (4). When I stop my executable, the official Demo Application goes back to Good GoodNonspecific LimitOk (192) on it's next update.":
You need to fix your server. The client ocmponent never modifies or generates the property values, and it never modifies or generates any OPC quality. It just passes all this information through. I can gurantee it. So, everything that you describe are the data provided by your server.

Best regards,

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

More
06 Nov 2012 10:02 #1088 by support
Hello,
have you tried other OPC clients with your OPC server? While things like permission problems etc. are not unusual, I would be very surprised if there is any problem on our side with regard to data returned from OPC browsing. The code is proven in the field for many years.
If necessary we can put OPC Analyzer app between your app and the server, and log the communication and see it where this browsing problem is coming from.
Regards

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

More
05 Nov 2012 18:45 #1087 by tlaford
I decided to try something different.

Using the official Demo Application, I started monitoring the tag I am interested in with an update rate of 15000ms (15s)
It consistently displayed Value: System.Single[] and Quality: Good GoodNonspecific LimitOk (192)

I created a new Windows Forms Application that uses the following code to try retrieve the property:
Dim properties As DAPropertyId() = {DAPropertyId.Quality, DAPropertyId.Timestamp, DAPropertyId.Value}
Dim val1(3) As ValueResult
val1 = OpcConnection.GetMultiplePropertyValues("MyOpcServer", "aaaaa.bbbbb.1", "CcC.DdD.EeE.FfF.GgG.HhH.IiI", properties)

When I run this executable it consistently returns a status of: Bad ConfigError LimitOk (4) and it also causes the quality displayed by the official Demo Application to change its quality to Bad ConfigError LimitOk (4). When I stop my executable, the official Demo Application goes back to Good GoodNonspecific LimitOk (192) on it's next update.

The good news is that I seem to be able to read a tag using GetMultiplePropertyValues() without encountering an exception, but it appears that reading the tag is affecting it's quality.
Any suggestions?

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

More
05 Nov 2012 13:45 #1086 by tlaford
I updated WebApplication1 and AutoRefreshWeb to use my OPC Machine Name, Server Class, and Item ID, and I endedup seeing the same Unknown Error exception.

I tried the following commands in my web application:
client.BrowseServers("MyOpcServer") - Successfully retrieves "aaaaa.bbbbb.1" as one of the available server classes
client.BrowseBranches("MyOpcServer","aaaaa.bbbbb.1") - Successfully retrieves "CcC" as the only Item ID
client.BrowseBranches("MyOpcServer","aaaaa.bbbbb.1", "CcC") - Successfully retrieves "DdD" as one of the available Item IDs
client.BrowseBranches("MyOpcServer","aaaaa.bbbbb.1", "CcC.DdD") - Successfully retrieves an empty list of Item IDs
client.BrowseLeaves("MyOpcServer","aaaaa.bbbbb.1", "CcC.DdD") - Successfully retrieves a number of "$SYS$*" Item IDs - But does not include "EeE" or anything below it as Item IDs

So, it seems that I can access the OPC from my web application, but I can not get to the actual data with my web app like I can with the official Demo Application.
Any Thoughts?

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

More
04 Nov 2012 17:44 #1083 by support
Hello,
the stack trace has limited information in it, most are identical to the one you sent due to the way the code works internally. What is relevant and valuable are the error codes, and we have them.
I was not aware that you final goal is a Web application. For that, you can start from different examples - in the solution, they are under "Web" folder, e.g. WebApplication1 or AutoRefreshWeb. Have you tried those?
Note that there is a common problem that they run well under VS development server but you may meet "Access denied" or similar error again, when you actually deploy under IIS. This is due to a) DCOM permissions to the target server, or b) file permissions to the Temp folder, or both. It can be resolved by creating a new app pool running under an acocunt that has the necessary permissions, and then assign the app to run under that app pool.
Best regards,

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

More
02 Nov 2012 19:10 #1082 by tlaford
The first reply to my original post said "... there are multiple things in your post, ...." Maybe we need to take a step back and look at the original post.
I'm trying to create a web application to read tags from my OPC Server using EasyDAClient1.ReadItemValue(...)
Does the stack trace in the original post provide you with any valuable information?

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

More
02 Nov 2012 19:02 #1081 by tlaford
OK. I installed the Service Pack and rebuilt.When I ran I got the same result: "Access is denied."I tried changing the Item ID to just "$SYS$Status" and I got the same result: "Access is denied." But when I run with the official executable it works fine.

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

More
02 Nov 2012 18:06 #1080 by support
Actually, you don't have SP1 for VS 2008 - that would show "9.0.30729.1 SP" or later. You have the RTM (i.e. the original release) version.
I cannot be sure if that's the reason of the problem(s), though. We simply do not test or support VS2008 without SP1, because that would be too many combinations to have, with no true technical reason behind it. If you can install SP1, please do so (e.g. Microsoft Visual Studio 2008 Service Pack 1 (Installer)).
Best regards

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

More
02 Nov 2012 17:30 #1079 by tlaford
Yes. I have SP1 installed.
Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM
Microsoft .NET Framework Version 3.5 SP 1

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

More
02 Nov 2012 17:24 #1078 by support
That's truly amazing, because the distributed source code is identical to the one used to build the demo EXE that comes with the product. And it is done usign VS 2008. I am running out of ideas. Do you have Service Pack 1 installed for VS 2008?

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

Moderators: support
Time to create page: 0.059 seconds