LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Share indicator between case structures

Hi,

 

I have a boolean case structure. Inside each case, there's a for loop. Inside the for loop, there's an indicator to display data of each iteration. I want to have only 1 indicator to display data.

 

The problem is, I can't take the indicator outside, because then it wouldn't display data after each for loop iteration. If I leave the indicator inside the for loop, then there're more than 1 indicator to display data of each case.

 

Please help.

0 Kudos
Message 1 of 6
(3,586 Views)

You can use a local variable of the indicator in the other cases

 

However, I question if your logic is inside out.  Perhaps the loop should be on the outside, and the case structure inside the loop.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 2 of 6
(3,583 Views)

Actually, my system is not that simple.

 

I have a boolean case structure. Inside the true case, there's a for loop. Inside the false case, there's another boolean case structure. Inside the inner case structure, the true case has a for loop while the false case has nothing. The indicator I want to share is inside the 2 aforementioned for loops

0 Kudos
Message 3 of 6
(3,575 Views)

Ravens is right. Please post your VI so we can help you avoid some common beginner mistakes.

 

0 Kudos
Message 4 of 6
(3,574 Views)

When people talk about loops inside other structures, and wanting to update an indicator inside a loop, I visualize they have some while loop that runs for some indeterminate amount of time, perhaps a long time.  I don't expect it to be For Loops.  I consider For Loops something that generally does not wrong for a long time (unless you have some very large dataset you are operating on.)  A For Loop runs N times, runs fast, and generally returns pretty quickly.  There usually isn't a reason to update an indicator inside of it on each and every iteration.

0 Kudos
Message 5 of 6
(3,555 Views)

Thanks everyone,

 

I redesigned my system a little bit, and I no longer have this problem.

0 Kudos
Message 6 of 6
(3,537 Views)