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.
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.
02-02-2015 11:05 AM
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.
02-02-2015 11:08 AM
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
02-02-2015 11:27 AM
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
02-02-2015 11:28 AM - edited 02-02-2015 11:29 AM
Ravens is right. Please post your VI so we can help you avoid some common beginner mistakes.
02-02-2015 12:27 PM
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.
02-02-2015 01:41 PM
Thanks everyone,
I redesigned my system a little bit, and I no longer have this problem.