10-07-2013 11:01 AM
Hi
I would like to add an element to an array if a condition is true.
For example in the attached picture, I would like to add one entry to array when the first element is yes, but I would like to add nothing if the first element is not yes
could you please let me know what should I add to false structure to not add any entry to array. I see if I use defualt value or defualt constant it still adds 0,0 to array
10-07-2013
11:34 AM
- last edited on
01-10-2025
01:32 PM
by
Content Cleaner
do you have LV2013?
If so, you can use the new conditional tunnel output:
10-07-2013
11:52 AM
- last edited on
01-10-2025
01:33 PM
by
Content Cleaner
@josborne wrote:
do you have LV2013?
If so, you can use the new conditional tunnel output:
This is present in 2012 also.
10-07-2013 11:59 AM - edited 10-07-2013 11:59 AM
The conditional indexing came out with LabVIEW 2012. That is the easy way. If you are using older, then you need to use a shift register to hold your growing array with a Build Array inside of a case structure.

10-07-2013 12:03 PM
10-07-2013 01:20 PM
@crossrulz wrote:
The conditional indexing came out with LabVIEW 2012. That is the easy way. If you are using older, then you need to use a shift register to hold your growing array with a Build Array inside of a case structure.
Move that equals outside the loop (the optimizer probably does it anyway but, we should point out equals works with arrays)