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.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- General Issues, Building
- Use of EasyDAClient throws VS 2017 exception
Use of EasyDAClient throws VS 2017 exception
And, the warnings that you get list version numbers of these libraries that we do *not* distribute. So you need to prevent your app from using the incorrect versions you have somehow gotten into your computer and your projects. That's up to you.
Second, the warnings also show that you are probably referencing assemblies App_Web_OpcLabs*.dll. If so, remove these references as well.
Best regards
Please Log in or Create an account to join the conversation.
Do you still get the *precisely* the same error when the .licx file is present? I am asking because in the original post, the error text contained an indication that somehow, your project loaded a supporting library that we also use - but a different version of it. This could indicate that either you have some unnecessary (and, actually, harmful, in this sense) assemblies into your References, or that they have loaded due to some other mixup. Make sure you clean everything well before making new attempts.
Please Log in or Create an account to join the conversation.
Now that we have solved this problem, I have hit another obstacle. When I Instantiate the EasyDAClient it creates the licenses.licx file. Then when I delete the .licx file, my form Designer disappears. Then when I select View->Designer, I get a new tab labeled Resources.resx. This tab contains a table with one record containing "String1".
I do not have this problem with DAConnectivity, nor did I have this problem on earlier tries with EasyDAClient.
How do I get the Form Design back?
Please Log in or Create an account to join the conversation.
The PAC controller has IP 192.168.2.82, but it is *not* an OPC Server.
You then have CoDeSys OPC Server on the same machine as your OPC client. The CoDeSys OPC server connects to the PAC controller. But your OPC clients connects locally to the CoDeSys OPC server, and the location of the controller is irrelevant to the OPC client.
This way, there is no remote connection between the OPC client and OPC server - they are both on your PC. And no DCOM is involved. This means that the first argument to the method call really *should* be empty. You cannot connect directly to the PAC controller, because it has no OPC server directly in it.
Best regards
Please Log in or Create an account to join the conversation.
Parker requires that the box with the OPC client have an .ini file specifying the IP address of the OPC server and some additional params. Perhaps this is a different architecture than other products.
File: C:/ProgramData.CoDeSysOPC.OPCServer.ini
[Server]
Version=0x3050900
updaterate=200
logevents=1
logfilter=15
syncinit=1
ReadCyclesAfterWrite=0
UseColonAsPlcDevider=0
GroupUpdateBehaviour=0
PLCs=1
PLC0=PAC
[PLC:PAC]
interfacetype=GATEWAY3
reconnecttime=15
waittime=10
active=1
logevents=1
logfilter=15
gateway=Tcp/Ip
gatewayaddress=localhost
gatewayport=1217
parameters=1
parameter0=IpAddress
value0=192.168.2.82
[Redundancy]
NumOfGroups=0
Please Log in or Create an account to join the conversation.
It can be empty if you want to connect to a local OPC server, i.e. an OPC server that resides on the same box as the OPC client (your app).
If that's what you want, then it is OK to leave it empty. I was under impression that your OPC server is on a computer different from where the OPC client is. When it is not empty, even if it is the IP address or name of the client computer, it always goes the "DCOM" (remote-like) way, with all the configuration hassles.
Please Log in or Create an account to join the conversation.
I then removed the IP address from the first param and tried to run again with an empty string for the param. It now works just fine, this solved the problem.
Is this OK to do it this way?
Please Log in or Create an account to join the conversation.
To the actual issue: The method has thrown an exception, that is not called a hung. Exceptions are how the ReadItem or ReadItemValue signalizes errors, so in some respect that are normal and should be expected. A production-ready code should have a try-catch block around these methods, and catch exception of type 'OpcException'. See e.g. opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...eption%20or%20UAException.html .
The exception tells you that the details are in its InnerException, so that's what should be inspected, but I can tell from the error code (0x800706ba) that the innner exception says "The RPC server is unavailable.". This is an error that comes from the DCOM infrastructure (Microsoft), which is what OPC Classic uses for inter-machine communication. There can be many causes for this error, but first things to check are 1) whether the IP address is correct, 2) whether DCOM is enabled on the target computer, 3) whether the firewall on the server (or client) computer does not block DCOM communication (this is not a single port, but a port + a range of ports), 4) whether OPCEnum service is running on the server computer. See e.g. www.opclabs.com/resources/technology-opc/opc-videos/opc-dcom . The screenshots from Connectivity Explorer appear to be ran on the same computer as where the server is, so that may work, but a comparable test to what your code does would be to run the Connectivity Explorer on the computer where your run you code-based test, select the "Any COmputer" node and then add a computer node with the same IP address.
Best regards
Please Log in or Create an account to join the conversation.
Tried x86, x64 and all, but still had errors.
I then ran program with break point on first line, but program hung on that line.
Then tried to run without break point and threw exception. see Snap86.png
Please Log in or Create an account to join the conversation.
textBox1.Text = easyDAClient1.ReadItem("192.168.2.82", "CoDeSysOPCDA", "PAC.Application.GVL.MyString").ToString();
DAVtq vtq = easyDAClient1.ReadItem("192.168.2.82", "CoDeSysOPCDA", "PAC.Application.GVL.MyString")
textBox1.Text = vtq.ToString();
and inspect the value of 'vtq' between the first and second line.
regards
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- General Issues, Building
- Use of EasyDAClient throws VS 2017 exception