LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If statement

Solved!
Go to solution

Hi everyone,

 

I have been trying to figure this problem out for the last few hours so it would be great if someone could help me.  Basically, I am running a loop and I want to create an array that contains the iteration number when a certain event occurs.  I used the case statement but that requires me to have an output for both the True and False cases.  Is there a way to make only an if statement?

 

If I put the build array inside the case structure, that doesn't help because I still need an output for both the True and False cases.

 

Thanks so much!

Johnny

0 Kudos
Message 1 of 4
(2,565 Views)

Try a shift register initialized with an empty array. In the true case use build array to insert the element, in the false case just wire the array through.

Message 2 of 4
(2,557 Views)
Solution
Accepted by topic author iamjli

Something like this

Tim
GHSP
Message 3 of 4
(2,553 Views)

Ah! You guys are magnificent. Thanks so much for the help and fast responses!

-Johnny

0 Kudos
Message 4 of 4
(2,543 Views)