Problem with RsiOPCAuto

yang1216

Member
Join Date
Jun 2009
Location
BeiJing
Posts
84
Hi all.
I am creating a dotnet application with RsiOPCAuto.dll, and I have managed to read and write tags value. But today when I wanted to display all the online tags in a treeview, I met a problem.
Following is my code.
Code:
            List<string> lstItems = new List<string>();
            try
            {
                OPCBrowser browser = myServer.CreateBrowser();
                browser.ShowBranches();
                browser.ShowLeafs(true);
                var i = browser.GetEnumerator();
                if (browser.Organization == 1)
                {
                    while (i.MoveNext())
                    {
                        lstItems.Add(i.Current.ToString());
                    }
                }
            }
            catch (Exception err)
            {
                throw err;
            }
When it executed "browser.ShowLeafs(true);", an exeption "[HRESULT:0x80010105 (RPC_E_SERVERFAULT)]" was thrown.
Has anyone meet the same problem also?
Please help me, thanks in advance.
 
Hello,

Are you sure you can read the leafs directly for the root as you are doing. I think that you have to select a branch (by MoveDown or Moveto) before using ShowLeafs
 
Hello,

Are you sure you can read the leafs directly for the root as you are doing. I think that you have to select a branch (by MoveDown or Moveto) before using ShowLeafs

Thanks very much.
I don't know what the branch means, is it group?
If I want to get all the item in the server, what should I do? Enumerate all the branches and then enumerate their leafs?
 

Similar Topics

The project on the operator workstation keeps disconnecting, even though I have an installation server and operating station set up through...
Replies
0
Views
35
I have a problem, I'm running an AE Licence Manager on a Windows 2016 Server, and my Window Maker is on another separate Windows 2016 Server. My...
Replies
0
Views
45
I have one old Ansaldo VFD from 37kW and it have only sign OFF on the display after put it on the 3x400VAC. Is there any idea, how to solve this...
Replies
1
Views
57
Hello, I need to write the following program in Ladder language, but I could not integrate the Fibonacci sequence into the ladder. Can you help...
Replies
22
Views
496
On all pages of my project i have a lot of information, texts and details that should not not be shown. I can remove them for each part apart from...
Replies
0
Views
68
Back
Top Bottom