LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Property Node for XNET Control

Solved!
Go to solution

Hello,
I would like to safe/load the configuration of the XNET control. Unfortunately it seems to be not possible, because for example there is no property for the selected XNET database. Overall the XNET controls are very inflexible. How can I read out the inputs of the user? Does anyone knows a workaround?

0 Kudos
Message 1 of 5
(2,773 Views)
Solution
Accepted by topic author TiBr

Most XNet controls are just string controls with extra flair.  For saving and loading the values the user entered you should be able to use something like Concatenate String, and concatenate it with nothing, and the output will be the string representation of the control.  Similarly you should be able to write a string to these controls through local variables, or property nodes.  

 

As for selecting a database say for a XNet Signal control.  I found a few private methods that do allow for changing this and it is called the FilterCriteria.  I'm guessing it is private because it isn't well documented.  Attached is a VI that will read the selected database, and allow you to set it based on a string.  It also shows the Signal value as a string indicator.  I've never needed this functionality but I could see it being useful, maybe there should be an Idea Exchange made for making this functionality public.

0 Kudos
Message 2 of 5
(2,711 Views)

Thanks! A little bit tricky, but that's the solution for my problem.
I ask me where I can find the "FilterCriteria"? To copy and paste from your code is good for now. But maybe I will get problems in a new project.

0 Kudos
Message 3 of 5
(2,696 Views)

I have just found that the proposed solution doesn't work for global variables. In my case I have a global cluster with the XNET controls. It seems to be not possible to access these controls.

0 Kudos
Message 4 of 5
(2,691 Views)

@TiBr wrote:

Thanks! A little bit tricky, but that's the solution for my problem.
I ask me where I can find the "FilterCriteria"? To copy and paste from your code is good for now. But maybe I will get problems in a new project.


It is a private method, something NI hasn't had the time to flush out the details of and for one reason or another doesn't feel the public should have access to.  This might be because the function is not stable, or not documented, or might only work in some use cases and not all.  This is likely your situation that the function works as intended when used in one way, but not in yours, only NI can say for sure.

 

Because the function is private it won't be listed in the normal list of property nodes.  To make it shown you have to enable an INI key that enables all private functions to be shown throughout the LabVIEW.  I don't think sharing this key here is the right thing to do since many novice users are here that might enable the key, and use it without knowing that these functions aren't officially supported by NI.

0 Kudos
Message 5 of 5
(2,681 Views)