From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controls not active on front panel after sub vi opens

Solved!
Go to solution

Hello,

 

I am having a bit of difficulty with my VI.

I am launching a sub VI from my main VI front panel.

The sub VI opens, but when it is closed all controls on my main VI's front panel are no longer active (buttons not clickable etc).

i have put counters on loop iteration terminals so i can see that the program is still running, just controls no longer work.

 

Has anyone come accross this before and offer any solutions?!

 

Thnaks for looking, i appreciate it!

 

Cheers,

 

Iain

0 Kudos
Message 1 of 14
(3,769 Views)

Post your VI.

Munna
0 Kudos
Message 2 of 14
(3,760 Views)

this is the sub vi....

I cant upload the main VI, i could try and upload an image of the block diagram (although it's quite big)?

0 Kudos
Message 3 of 14
(3,754 Views)

Please be careful while using event structures. In your SubVI, your using Event structure.

When your pressing close button, still subVI waits for event. So, your main VI controls are not working.

 

Add one more event in subVI to check the panel close.

 

Panel close.png

Munna
0 Kudos
Message 4 of 14
(3,743 Views)

Hello Munna,

 

I have added the pannel close event to the VI but I am still getting the same issue!

I have attached the block diagram of the main VI also...

0 Kudos
Message 5 of 14
(3,720 Views)

Goomba79 wrote:

I have added the pannel close event to the VI but I am still getting the same issue!

I have attached the block diagram of the main VI also...


Is this a Where's Waldo problem? 😮 At least tell us where on that huge diagram the subVI in question is located. Thanks!

 

Can you attach the subVI with the panel close event added?

0 Kudos
Message 6 of 14
(3,683 Views)
Solution
Accepted by topic author Goomba79

Hello,

 

Sorry the sub VI is located in the Offline File Selection loop at the bottom of the block diagram.

After playing about with it for hours last night I seem to have sorted it by unchecking the 'lock front panel' option from the event structure properties!

 

Thnaks for all your help!!

0 Kudos
Message 7 of 14
(3,641 Views)
What event structure?!?

You may have patched ove some immediate issue, but you ***did not*** fix anything. Your code has very many fundamental errors:

+ A state machine that apparently has an event structure inside it -- somewhere.
+ A state machine with a string state variable.
+ A huge block diagram.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 14
(3,631 Views)

Hello Mike,

 

I'm pretty new to labview so please forgive my ingorance to the correct way of doing things..

 

What is wrong with a string state vairable for a state machine?

 

My state machine has a state called 'Stop Rec' it is in this state where there is an event structure that determines what state to move on to next depending on what button has been pressed (i have attached a screen grab of this state). It is here where I deselected the 'Lock front panel' option.

 

Doing this has freed my controls on the front panel, but you are saying that this isn't a 'fix'? If so, what would be the accepted way to do it?

 

 

Thanks,

 

Iain

 

0 Kudos
Message 9 of 14
(3,617 Views)

Your code architecture is fundamentally flawed. Your inner while loop does not even stop when the currently visible event occurs, so the string never even leaves the inner loop. So waht's the point? Event structures always listen for events, and if an event occurs while the event structure is unreachale due to dataflow, you get the situation you are describing. Just preventing the event from locking the front panel does not solve anything. That's like trying to fix a crack in the hoover dam with a piece of duct tape.

 

There is no way to tell from looking at the picture, because most of the code is hidden. If you want more specific advice, you need to attach the actual VI.

 

 

0 Kudos
Message 10 of 14
(3,588 Views)