LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal lights are not glowing when inserted a Tab control in front panel

Hi,

 

I am attaching the VI and Sub VIs of my application. My application says when you select a signal type from cluster present in front panel and submit corresponding panel light will glow and a bit also will proceed to DAQ assistance.

 

My application was working fine but when I inserted a Tab control in front panel to enhance my application it stopped working, I know the problem is in the find light.VI sub VI but I am not able to trace.

 

Thanks

Prashant

0 Kudos
Message 1 of 9
(2,447 Views)

The controls don't exist on the panel anymore.  The tab control exists on the panel.

 

From there, you have to use the property node "Pages" which gives you an array of all the pages in the tab control.  From there, you need to determine which page has your control, and use that page reference with a Property node for "Controls on Page" which gives an array of references to all the controls on the page.

 

The snippet below shows how to build an array of all the controls on all the pages.

 

0 Kudos
Message 2 of 9
(2,439 Views)

When you place controls in a tab, those controls become elements of a page of the tab control, not of the top-level front panel.  If all the lights are on the same page, you can get a reference to all the controls on that page instead of getting a reference to all the controls on the top level of the VI, as shown here:

controls on tab page.png

 

I don't have time to really look at your VI and understand what it does, but all the manipulation of controls using references without ever writing to the terminals makes me suspect there's a better way to do it, possibly involving putting all the lights in a cluster.  Also, if you're just using the tab as a way to put a box around the lights, consider using a simple decoration instead - then you won't have to change your code.

0 Kudos
Message 3 of 9
(2,434 Views)

As Ravens Fan and nathand said you can take the reference of the Tab control and access each indicator and also

I would recommend you to put all your Boolean indicators into a cluster and take the reference of the cluster and from that you can take the reference of each controls individually like this.

 

Cluster Reference.png

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 9
(2,428 Views)

Hi,

 

I have to put same number of indicators in three differenet tabs and control those with the help of WIU enum so I think using cluster is not a good idea.

Can I make lable text property of ctl on page?

Please suggest.

 

Thanks

Prashant

0 Kudos
Message 5 of 9
(2,424 Views)

Hi,

 

I have to convert data from (ctlsonpage) to text string because I have to compare those with the indicator strings present in the front panel and lit the light. Please suggest how to convert output of ctlson page to a text string.

 

Thanks

Prashant

0 Kudos
Message 6 of 9
(2,410 Views)

The output from CtlsOnPage is similar to the "Controls[]" output from the VI property node in the code you uploaded, except that it contains references only to the controls contained on that page of the tab control.

0 Kudos
Message 7 of 9
(2,408 Views)

Hi,

 

This is what I made in the attachment, the problem I am facing while connecting this sub VI to the main VI and also refnum input for TabCtl propery node. Please comment and suggest.

 

Thanks

Prashant

0 Kudos
Message 8 of 9
(2,401 Views)

drop a vi server ref contrtol on the FP right click it and follow:

  Select VI Server Class>>Generic>>GObject>>Controls>>PageSelector>>TabControl

 

Similarly in your array constant you want the type to be Generic>>GObject>>Control>>Control to fix that coersion


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(2,393 Views)