Solution
Similar to the use of property nodes to control objects in the front panel, the objects within a tab control can be accessed with property nodes. The two methods below show different ways to do so.
Method 1: Using the tab control Pages property.
- Create a property node from the tab control by right-clicking it and selecting Create » Property Node. Then, select Pages from the drop down to access each page in the tab control.
- Use the Index Array VI to access a specific page in the tab control. The index input indicates the page you want to access (0 corresponds to the first page, 1 to the second page, and so on).
- Place a property node, connect the output from the Index Array VI to the reference input of the property node, and select CtlsOnPage from the drop down menu. This will access the controls in the page of the tab control.
- Use another property node inside of a for loop to index through the controls and access the selected property. In the example shown, the Label.Text property is used.
- Display or process the information from the property node.
Method 2: Using a VI server property node and control references.
- Place a property node, right-click it and select Select class»VI Server»VI»VI. Then select the Front Panel property from the drop down menu.
- Connect another property node to the previous one and select Controls [ ] from the drop down menu.
- Use the Index Array VI to specify the tab control from the available controls and indicators in the front panel. The index input indicates which control you want to access (0 corresponds to the first control placed on the front panel, 1 refers to the second control, and so on).
- If you are unsure which index the tab control has, go to the toolbar at the top of the window and select Edit » Set Tabbing Order...; The number displayed for the tab control is its index number. Click the X on the toolbar to cancel and close the edit mode.
- With the To More Specific Class VI change the reference wire from a control to a tab control reference.
- To create the tab control reference, you can right-click the To More Specific Class VI and select Create Control, right-click the newly created control and choose Select VI Server Class>>Generic>>GObject>>Control>>PageSelector>>TabControl.
- Place a property node with the tab control reference wire as its input and select Pages from the drop down menu.
- Access a specific page in the tab control using the Index Array VI. The index input indicates the page you want to access.
- Connect the output from the Index Array VI to another property node and select CtlsOnPage from the drop down menu.
- Use a property node inside of a for loop to index through the controls and access the selected property. In the example shown, the Label.Text property is used.
- Display or process the information from the property node.