# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: extracting columns from 2D string array according to first element of each column

Hi Sam,

so your outer loop should autoindex the values delivered by the inner loop?

Then place the inner loop before the outer loop and use an autoindexing tunnel!

(You should replace the outer WHILE loop by a FOR loop…)

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 91 of 96
(257 Views)

## Re: extracting columns from 2D string array according to first element of each column

@GerdW wrote:

Hi Sam,

so your outer loop should autoindex the values delivered by the inner loop?

Then place the inner loop before the outer loop and use an autoindexing tunnel!

(You should replace the outer WHILE loop by a FOR loop…)

Hi GerdW, can you give me any short example. Thanks

Message 92 of 96
(256 Views)

## Re: extracting columns from 2D string array according to first element of each column

Hi Sam,

can you give me any short example.

simple DATAFLOW and using autoindexing FOR loops:

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 93 of 96
(253 Views)

## Re: extracting columns from 2D string array according to first element of each column

@GerdW  작성:

simple DATAFLOW and using autoindexing FOR loops:

Hi GerdW, thanks for example but it doesn't work in my case, here is my code picture.in this, when 0 plus increment value add and condition is true then just one value passed for further process. Let suppose increment is 5 and final value is 20, then first 5 passed for further process into next loop and then 10 then 15 then 20.

Message 94 of 96
(240 Views)

## Re: extracting columns from 2D string array according to first element of each column

Hi GerdW, I try to implement if condition inside the while loop. My logic is simple, if condition is true stop while loop and store result outside the loop. and if condition is false then stop while and store zero outside the loop. It is working but in both cases it give zero. here is picture of my implementation.

Message 95 of 96
(203 Views)

## Re: extracting columns from 2D string array according to first element of each column

Hi sam,

My logic is simple,

But it seems you are not able to implement a simple logic…

IF "condition is true" THEN "stop while loop" and "store result"

IF "condition is false" THEN "stop while loop" and "store zero"

So you stop that loop independently from your condition: why do you need a loop at all when it will be stopped right after the first iteration???

And why don't you use a Select node instead of that case structure when all you want to do is to select between two possible values?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 96 of 96
(197 Views)