LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tab control

The subvi I am trying to create has 3 tabs and multiple controls within the tabs. I have enclosed an incomplete version of my subvi. The program communicates through a serial interface. The first sequence in the loop is the idle stage. The program is in idle state until the user select one of more settings within the first, second or third tab. The user must click “Write” button in order to send the command to change the settings via the serial interface. I am trying to figure out how to send ONLY the commands the user changes/toggles and not all the commands located on the interface (waste of time). I only want to find out which buttons have been pressed and send those commands only. My problem is also sending multiple commands serially. Hope you can help.
0 Kudos
Message 1 of 9
(3,746 Views)
Use "Event Structure" to track the user action and build your serial instructions based on the event. When user hit the "Send" button send the serial instruction that you built based on the user action.
0 Kudos
Message 2 of 9
(3,724 Views)
How would I track all my events?
0 Kudos
Message 3 of 9
(3,712 Views)
Hi there,

One way to go about it could be;
1) create a reference to the tab control (or a property node) and get the Pages property. This will return you an array of references to the tab control pages.
2) index the references array pages through a for loop to get the Ctls on Page[] property
3) register dynamically the event for Value Changed
4) Monitor in the event structure the TAB control Value changed event and the previous event you dynamically regsitered for.

Hope this helps,
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 4 of 9
(3,706 Views)
Here is simple event structure example. Try to change values of the controls on each tab and hit the Send button.

By the way this example need Labview 7.1 to run

good luck'
0 Kudos
Message 5 of 9
(3,700 Views)
Unfortunately I have LV7.
Can you save it under LV7 and repost it.

Thanks.
0 Kudos
Message 6 of 9
(3,692 Views)
Hi Cyril,

Is your explanation using event structures.
I understand your steps up until 3. I am just a novice at this.
0 Kudos
Message 7 of 9
(3,689 Views)
here is for lv 7.0...
0 Kudos
Message 8 of 9
(3,681 Views)
Sorry about that,

If you're fairly new, you're probably better of register events indivdually for each controls of the of the tab controls.
The method I was suggesting here is pretty efficient when you have tons of controls on a tab control page and do not want to register all of them manually through the structure but just register one event for all controls on page.

When you will be more familiar with events in the native form, ie, static events, check out the example shipped with labview for dynamic events and this page:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=BDB5933673582153E034080020E74861&p_node=200061&p_source=External

Hope it will clarify a little bit what i was trying to explain,

Regards,
Cyril Bouton
Active LabVIEW Developper
Message 9 of 9
(3,680 Views)