LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Choosing the elements of an input array

Solved!
Go to solution

Hi all,

I know this is a simple question but I got stuck at one point, the input for my Vi is an array of clusters. I am choosing each element of the array on based two criterias. I would like my VI to choose the elements and write only  the elements who are in the range to the output and skip the others(out of range ones). But the problem is that for the current version of the program, the program is writing elements of zero for the out of range ones.

 

Best,

 

Serkut.

0 Kudos
Message 1 of 3
(2,319 Views)

The Build Array needs to be inside the case structure - you do not want to add to the array if the element is out of range. Thus, the case structure either adds an element, or it passes the array as is.

 

Also, since you are autoindexing you do not wire to the N terminal of the for-loop, since LabVIEW already knows how many times it needs to run from the autoindexing.

Message 2 of 3
(2,315 Views)
Solution
Accepted by topic author serkut17

Pretty close

try this

 


"Should be" isn't "Is" -Jay
Message 3 of 3
(2,314 Views)