From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-02-2003 03:49 PM
12-02-2003 03:59 PM
01-08-2008 03:58 AM - edited 01-08-2008 04:07 AM
01-08-2008 06:59 AM - edited 01-08-2008 07:00 AM
What BJD means is something like what is shown below. It is not the same, because I "borrowed" it from existing code.
In my example, I am getting the name of each control for every page of a Tab Control. The image will give you an idea how to proceed. You can replace Main Tab with This VI and the property node will be for application instead of TabCtl. And you won't need Page..
Maybe I should do a proper example 😉
01-08-2008 07:07 AM - edited 01-08-2008 07:11 AM
See the image below for a better example.
This one provides a list of all the controls on the front panel. See the names of the labels appears in the ArrayofCtrls.
RayR
01-08-2008 02:03 PM
Thanks, this helped me in the right direction I guess, but the problem is more like the opposite of what you gave me :
Your vi gives me all the names of all the controls on the front pannel, but what I need is something like "get me control which is called 'Temperature 1' and enter '20' in it".
I'm sure I could do this using your solution, but then I will have to run over all the controls and check if they have the name I'm looking for. So I guess there must be an easier way ??? I tried by somehow looking in the array of objects, but can't get it right.
Jan
01-08-2008 02:27 PM
You need both the array of control references and the array of names as shown in the example. You can do a search to find the index of the name (thus of the control) which corresponds to the control reference of interest. With the control reference, you can wire that to a property node and select the function "value" and write the desired value to it.
You're close.. 😉
01-09-2008 07:46 AM
01-09-2008 08:21 AM
You can also pass the name (lable) of the control into the selector of a case structure, and then use the object names as cases. A default case will cat as a catch-all this is very efficient and scalable if you plan on modifying many controls by name. This is static though since you cant pass the names of the controls down to a subvi.
01-09-2008 08:32 AM