LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a boolean between loops

Right now it would be my understanding, through experience, that labview won't less you pass a boolean between loop. For example, a while loop contains some code that produces and true boolean, and this while loop also contains a case structure with a for loop inside of it, so the for loop is nested in the case structure which is nested in the while loop. Is it correct that in labview you can't pass this true boolean to the case structure to execute the for loop? Or am I doing this wrong or in a way that harder than it needs to be? I'm new to labview, more similar with Java.

0 Kudos
Message 1 of 28
(3,831 Views)

You are probably doing it wrong because of misconceptions about dataflow.

 

I recommend to post a simplified version of your code (VI or at least a picture).

 

We are not good at reading and understanding long text description. Too ambiguous! 😄

0 Kudos
Message 2 of 28
(3,816 Views)

Yes, sorry for not posting code, I know how much more helpful it is. Right now I am unable to though, hopefully I can post some fairly soon. It is fairly simple code though but I definitly understand

0 Kudos
Message 3 of 28
(3,811 Views)

This is what you describe.  Anywhere close to your example?

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 28
(3,786 Views)

Yes thats exactly it, thank you for replicating it. The true value doesn't seem to trigger the for loop however, is that normal? Or do I have some logic wrong?

0 Kudos
Message 5 of 28
(3,779 Views)

Is your for loop in the TRUE case or the FALSE case?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 6 of 28
(3,769 Views)

@Hawkme wrote:

Yes thats exactly it, thank you for replicating it. The true value doesn't seem to trigger the for loop however, is that normal? Or do I have some logic wrong?


This cannot be "exactly it". Please show your actual code.

 

How long does the FOR loop take to complete?

0 Kudos
Message 7 of 28
(3,749 Views)

I would like my FOR loop to run when the boolean value returns a true to the case strucuture.

0 Kudos
Message 8 of 28
(3,729 Views)

I am unable post my code now, but will try to in the near future. If you mean how many iterations the FOR loop will run, it's really undecided at the moment, most likely about 5 or 6 iterations.

0 Kudos
Message 9 of 28
(3,728 Views)

The actual time is of course just dependent on the iterations chosen

0 Kudos
Message 10 of 28
(3,719 Views)