LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract specific rows from an array

Hello!

 
I’m trying to make a programme which, given a 2-dimension array, returns a 2- dimension array which contains only the rows having “1” as the first value.
 Schermata 2018-10-16 alle 18.09.13.pngSchermata 2018-10-16 alle 18.09.18.png
The problem is that I can’t tell the case structure to “do nothing” in case he encounters a “0”, so he gives me this output:
 Schermata 2018-10-16 alle 18.09.25.png
How can I write that in order not to have those “0; 0” lines on the A2? 
 
Alternatively, could I write it so that it splits the A1 into two arrays: A2 (only made up of rows starting with “0” ) and A2 (only with rows starting with “1”)?
 
Thank you for your attention
 
Francesco
 
0 Kudos
Message 1 of 4
(2,727 Views)

Hi Francesco,

 

learn about all those different tunnel modes:

check.png

 

The problem is that I can’t tell the case structure to “do nothing”

For that use case you need to learn about shift registers…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,721 Views)

Hi GerdW;
thank you for your reply.

I read about shift registers and tried to use them; I understood that they can be used to pass data between iterations but still I don't understand how to use them to do nothing during a single iteration.

0 Kudos
Message 3 of 4
(2,653 Views)

@Fluciano2 wrote:

but still I don't understand how to use them to do nothing during a single iteration.


Just pass the values from the shift register straight through the case.  It is all about data flow.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,647 Views)