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

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
41
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
176
Hi, I am having a challenge installing a new drive ACS355-03E-44A0-4 as it keeps on displaying Fault code F00018 even when the load is not...
Replies
3
Views
135
I have an issue on my vessel, we have water tight door system created in China, company is no longer operating. We have 7 doors each with their...
Replies
4
Views
146
Hi all. Simple as simple can be, I don't understand what's happening. I'm toggling he OSR on, GX_LUB_PUMP1_LEAD should switch. It doesn't. The...
Replies
27
Views
669
Back
Top Bottom