- Posts: 345
- Thank you received: 4
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
- Browsing, Browse Dialogs and Controls
- Empty OPC items tree when browsing the Merz OPC SAIA server
Empty OPC items tree when browsing the Merz OPC SAIA server
You may see this case as closed.
Mike
Please Log in or Create an account to join the conversation.
It can be a problem in the OPC Server. It can still be something that can be resolved by system configuration, although you are right that is probably is not a DCOM issue. But it is not a DCOM not because the OPC Server runs locally (there are still settings in DCOMCNFG that affect how it works locally), but because the symptoms are that there is no error but simply an empty tree. DCOM problems would show as some kind of an error.
Regards
Please Log in or Create an account to join the conversation.
Thank you for your answer.
Yes. I tried Matrikon OPC Explorer. If I run it "As Administrator" it will show an empty tree when trying to browse.
The OPC Server runs locally so I don't think it is a DCOM issue.
What I meant by "it fails to browse OPC items" is an empty tree without any error in this case.
Our OPC Client is 32bit application. The OPC server is also a 32 bit application.
Regards,
Michael
Please Log in or Create an account to join the conversation.
If the only difference in the conditions is running as Administrator or not, then you have a security configuration issue (COM/DCOM likely).
Have you tried running some other client in the same way as you are running yours (as Administrator)? What were the results?
In this last post, and also in the post that precedes it, I am always missing the actual description of the symptoms; this severely limits what can be concluded from such posts. When you wrote "it fails to browse OPC items", what does it mean? Was it giving some error? If so, what was the error? When you wrote (in the post preceding it) "the browsing didn't work", was it giving some error, or just blank list? If an error, what was the error message? Was it the error message you reported earlier, or perhaps the error I was seeing?
Regarding the differences in posts from 05 Dec 2022 20:58: Can you check in task manager what was the bitness of the process in these 3 cases? (32 or 64 bits)
I have also observed (although with the earlier version of the OPC server, not the one you instructed me to use) that the server installs a very old version of OPC Core Components (and only the 32-bit version of it). The newer version was more "silent" so I could not see what it was doing, but I suspect the same. I would suggest to uninstall OPC Core Components and then install the newest ones (opcfoundation.org/developer-tools/samples-and-tools-classic/core-components/ ; 64-bit version if it is 64-bit machine), to make sure that is not the cause.
Regards
Please Log in or Create an account to join the conversation.
I noticed that when running the sample program:
F:\Program Files (x86)\OPC Labs QuickOPC 2022.1\Examples-NET\VBNET\VS2019\WindowsForms\EasyOpcNetDemo\bin\Debug\EasyOpcNetDemo.exe
As administrator, it fails to browse OPC items.
Our program is running as Administrator since it stop/start a Windows Service.
Thank you.
Michael
Please Log in or Create an account to join the conversation.
Thank you.
Michael
Please Log in or Create an account to join the conversation.
Thank you for your answer.
I have also installed this OPC server and I was able to browse using this program:
F:\Program Files (x86)\OPC Labs QuickOPC 2022.1\Demos-NET\EasyOpcNetDemo\EasyOpcNetDemo.exe
But, when I tried running the sample VB project in Visual Studio (Debug mode):
F:\Program Files (x86)\OPC Labs QuickOPC 2022.1\Examples-NET\VBNET\VS2019\WindowsForms\EasyOpcNetDemo\EasyOpcNetDemo.vbproj
Browsing didn't work...
When I run the exe file from this folder:
F:\Program Files (x86)\OPC Labs QuickOPC 2022.1\Examples-NET\VBNET\VS2019\WindowsForms\EasyOpcNetDemo\bin\Debug\EasyOpcNetDemo.exe
The browsing did work.
Any explanation?
Thank you.
Mike
Please Log in or Create an account to join the conversation.
The error comes from COM/DCOM and says the OPC server was not accessible at certain point ("The RPC server is unavailable."). I do not think there is anything wrong on the client or that the client can do much better. The error shows that there are moments on the system when the OPC server isn't quite ready.
There may be a higher chance of getting this kind of errors in QuickOPC applications like the one for which you provided the source below, because the connections to the OPC server "come and go", i.e. are made more frequently. It is possible to reduce the number of connections by specifying long "hold periods", or (but onloy if the app structure allows it) by "locking" the connection to a particular server by making a subscription to some item on it.
Regards
Please Log in or Create an account to join the conversation.
Thank you for your answer.
I tried the EasyOpcClient on the customer's computer and I was able to browse for OPC items. After a while I got the error below but then I closed the client and open it again and I could browse OPC items again.
In our product the implementation is as you can see below. Please let me know if you see anything in the code or implementation that is incorrect.
Thank you.
Michael
Our code:
DaItemDialog1.ServerDescriptor.MachineName = server_properties.server_comp_name
DaItemDialog1.ServerDescriptor.ServerClass = server_properties.RealServerName
DaItemDialog1.MultiSelect = True
If DaItemDialog1.ShowDialog() = DialogResult.OK Then
SetChangeFlagToTrue(True) ' Jul-21-2021 V1.081
values = DaItemDialog1.NodeDescriptors
Cursor.Current = Cursors.WaitCursor
For i = 0 To (values.Count - 1)
Dim varType As VarType
szArrayLen = ""
szType = ""
ItemRemoved = False ' Aug-18-2021
Try
varType = easyDAClient.GetDataTypePropertyValue(server_properties.server_comp_name, server_properties.RealServerName, values(i).ItemId)
Catch opcException As OpcException
MsgBox("Error getting OPC-DA Item Data-Type(" + values(i).ItemId + ")!" + vbCrLf +
"MachineName=" + server_properties.server_comp_name + vbCrLf +
"ServerClass=" + server_properties.RealServerName + vbCrLf +
"CLSID=" + server_properties.server_CLSID + vbCrLf +
"OPC Server exception: " + vbCrLf + opcException.Message + vbCrLf + opcException.InnerException.Message, vbOKOnly + vbExclamation, "Error")
Exit For
End Try
Error message:
Type: OpcLabs.BaseLib.Browsing.BrowseException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
OpcLabs.BaseLib.Runtime.InteropServices.ExtendedCOMException (0x800706BA): The RPC server is unavailable.
+ This error can mean that specified machine name of the OPC server is incorrect, the machine is not reachable, or does not have DCOM not enabled.
+ The host name used is empty.
+ The machine name was ''.
+ The client method called (or event/callback invoked) was 'BrowseNodes'.
Data:
OpcLabs.EasyOpc.Implementation.ErrorEnhancement.Processed: True
OpcLabs.EasyOpc.Implementation.DAErrorEnhancement.Processed: True
ErrorCode: -2147023174
HelpLink:
HResult: -2147023174 (0x800706ba)
InnerException:
Message:
The RPC server is unavailable.
+ This error can mean that specified machine name of the OPC server is incorrect, the machine is not reachable, or does not have DCOM not enabled.
+ The host name used is empty.
+ The machine name was ''.
+ The client method called (or event/callback invoked) was 'BrowseNodes'.
Source:
StackTrace:
TargetSite:
XML Qualified Name 2: opcfoundation.org/DataAccess/:E_FAIL.0x800706BA
IsEmpty: False
Name: E_FAIL.0x800706BA
Namespace: opcfoundation.org/DataAccess/
Message: Problem browsing OPC Data Access (OPC-DA) leaves.
Source:
StackTrace:
TargetSite:
Attachments:
Please Log in or Create an account to join the conversation.
I get "Loading of configuration failed" when I try to open the file (SAIA_MERZ_OPCServerConffile\OPC_config.sbcfg) you attacched in the zip.
I tried my own new configuration instead (added one station to the blank config). With that:
- Browsing with Native client appeared to work fine (that is, I could see the node at the root for my station, and some sub-nodes underneath - I supposed that's how it should look like).
- Browsing with NetApi client did not work, and gave an error "OPC server has returned status: 'Test'. Problem details (status info): -
+ The client method called (or event/callback invoked) was 'BrowseNodes'.".
I suppose that the error given by NetApi client has to do with the fact that I am not using any real hardware. There is an IOPCServer::GetStatus which the NetApi client checks for, and when the returns this particular status, it reports it as an error. I admit this check should be more relaxed, the OPC_STATUS_TEST is not really a falire status.
So this is something that could be changed. However, it appears that your observations are not the same as mine, at least partially, so we need to align that first.
Questions:
1. You wrote that "we get an empty tree". Did you get any error indication, with the Native or NetApi client, too?
2. It seems weird to me that many times I instruct you to reconfigure the EnableNativeClient/EnableNetApiClient, you report that is had no effect. Can you elaborate on how precisely are you setting it? Are you doing it only inside your own application? If so, can you test the same from our tools such as OpcCmd, or Connectivity Explorer? (I can give instructions for that).
Thank you
Attachments:
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- Empty OPC items tree when browsing the Merz OPC SAIA server