LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Menu activation (or selection ) temporary freeze a while loop

I have two while loop, one for the user interface and one for a state machine.

Block Diagram.jpg

 

When I made a menu activation (or selection), the while loop (for the state machine) seems to be in a idle state.

 

I removed almost everything, and the problem seems to came from the VI "2700 Lire les valeurs.vi".

 

Project.jpg

 

2700 Lire les valeurs.jpg

 

This is a normal behavior or I did something wrong?

 

0 Kudos
Message 1 of 5
(2,705 Views)

Try adding Wait ms Multiple to the loopsWithout the Wait ms Multiple the loops will execute as fast as possible and nothing else will be able to executeTry that and see if it fixes the problemThe Idle may still be caused by the 2700 drivers themselves and they may not be able to go any fasterThe program looks like it is written correctly

Alex D
Systems Engineer
Academic Research
National Instruments
0 Kudos
Message 2 of 5
(2,665 Views)

Alex,

 

He already has waits....

 

Can you post the exact steps to reproduce? I can't seem to be able to.

0 Kudos
Message 3 of 5
(2,660 Views)

I think that if a loop runs in the UI thread, then menu activation will pause the loop because the menu is in the UI thread also.

 

Try removing the iteration count indicator and checking to see whether the subVI runs in the UI thread.

 

Lynn

0 Kudos
Message 4 of 5
(2,654 Views)

This problem occurs when I make a left-click on the menu.  The while loop for the state machine stops untill I make a menu selection. The cluster (Irradiance, Température, Courant and Puissance) stops  to be updated.

 

FP.jpg

 

 

I removed the iteration count indicator but I still have the same problem. 

 

The VI "2700 Lire les valeurs.vi" runs only in the state machine while loop.

0 Kudos
Message 5 of 5
(2,617 Views)