LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabled control

Hello! 
The issue that i'm publishing may be obvious to you but i was struck with it
I have a sub VI that reads data from excel to get at the end the content of each sheet, when calling this sub VI in the main VI, I didn't understand why the control " Select a sheet" is disabled and can not display the sheets list in the excel file, although in the Sub VI they are displayed with no problem,
Please any hint would be helpful for me, you will find attached the VI
Thank you in advance

0 Kudos
Message 1 of 4
(2,420 Views)

Please backsave (to 2016 at least). Also, you've only attached 1 VI, but you mention sub VI and main VI, so please attach both. Thank you

0 Kudos
Message 2 of 4
(2,407 Views)

You've got a race condition.  Select a sheet is not disabled, it just doesn't have anything in it.  It won't until the CmbBox property node executes with whatever values come in from the global variables "Sheet Name".   That global wasn't included, and you didn't include whatever VI writes sheet names to that global variable.

 

The race is that you have no dependency on when the control gets loaded with items vs. when the control is read and that name is sent to the subVI "Excel" (not included.)

 

Do a flowchart outlining all the steps you want your program to do.  Then make sure you program it do them in that order.

Message 3 of 4
(2,388 Views)

I thank you so much for your reply

It works well when i used a global variable of the control " select a sheet" in the sub VI " excel" and then call this control in the main using also global var

Thank you  a lot for you help 

 

0 Kudos
Message 4 of 4
(2,344 Views)