LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure and Numeric Indicator

Solved!
Go to solution

@Ken_Naylor wrote:

Your counter indicator will not update until the loop has finished executing and then it will display either 0 (counting down) or 255 counting up.  If you want to see the indicator labled 'counter' counting up (or down) then the indicator (or a local variable attached to the indicator) MUST be inside the loop.

 

Ken


Even I put the indicator inside the SCTL the counter value still not counting 1 by 1. 

0 Kudos
Message 11 of 14
(1,853 Views)
Solution
Accepted by Ambrose1464

Try this code Case Structure.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 12 of 14
(1,845 Views)

Or this which is close to your original (I think the solution from PalanivelT is better though)

 

Case Structure.png

0 Kudos
Message 13 of 14
(1,839 Views)

Your inner loop has a fixed number of iterations, known before the loop starts, thus it needs to be a FOR loop.

Since the two cases are nearly identical, you don't need a case structure.

 

Here's one possibility:

 

 

Feel free to adjust the time delay (currently 200ms).

 

This is much less cluttered that some of the other suggestions with lots of duplicate code and even local variables. 😉

 

0 Kudos
Message 14 of 14
(1,825 Views)