11-17-2011 09:03 AM
Does anyone have a way to detemine the id/index number of a control on a tabbed front panel? If there is no front panel I can use the menus: Edit, Set tabbing order. Then I can use this index in the block diagram of a sub-vi to update the control on the main fornt panel with data from the sub-vi as it runs. Yet, if you do the same thing on a front panel with a tab display, only the tabbed pages are indexed, as opposed to the individiual controls and displays.
Thanks.
Brian
11-17-2011 11:14 AM
11-17-2011 01:29 PM
I have a way of updating a control on the main vi by using an open vi reference to the main vi in my sub-vi (see code below). This is working fine for situtations where the main vi does not have a tab control. With this vi that you gave me, how can I reference a specific control in the table, such as the 3rd control on the 3rd page..and more generally the n-th control on the n-th page such that my "2" below is correct. Currently I just wire a numeric to an index array and the value is then sent to that control. the trouble that I am having is in the "get all controls" & "pick the control" part below. With the tab control on the front panel, I cannot simply wire a numeric like I did below with the "2".
11-17-2011 02:39 PM
11-17-2011 02:59 PM
Ben, I appreciate all of your hepl. But is there no way to get the control # other than by searching? I don't need to do this progromatically and have it do go thru the search each time the application is run. I can see which control I want to update on the main vi front panel, and I can open a vi reference. All I need to do is tell it which control to link to. Seems like this info should be available with a 'right click or something' on the control. Just like it is in the edit-set tab order menu navigation. This seems way more than what I should be required.
Brian
11-17-2011 03:09 PM
If you select the Tab control, do a right click and select "Reorder controls in page. You ca then set the index of the controls on this page, but you have to do it on each page (index restarting at 0 on each page). So you don't have the choice to use the page number and the index of the control on this page to get the control reference.
Ben64
11-17-2011 03:26 PM
I just found this too. So, in the end does labview keep a sequential list of the controls for with the individiual id's can be obtained simply? If there are 75 controls pread on 3 tabs, can I get what the id is of the 10th control on page 3?
11-17-2011 03:35 PM
11-18-2011 10:31 AM
No the number of the control. The controls are all listed internally in LabView with a number. But if you right click on the page to get the numebr of the control it is only for that page. How do I know what it is in reference to all controls? Can I just find the number of controls on all previous pages then start counting on the current page?
But, if I add another control does it get added to the complete list at the end yet it is still listed on it's page as a number in reference to that page?
Seems that the pages are merely decorations and have little organizational value.
11-18-2011 10:16 PM
No, tab controls aren't just decorations. Each page is a container that contains the controls on it. It doesn't matter how many controls are on other pages.