LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic array creation

Solved!
Go to solution

Hi,

I am trying to build an array automatically by use of boolean array. I use for loop in the VI but when the boolean array false it assigned "0" into the array. I do not want to assign "0", instead of, I want to pass this step and assign when the boolean array element true. How could I do it?

Egemen
Download All
0 Kudos
Message 1 of 10
(3,279 Views)

When the boolean is true, assign your next value to the array and put that next value into a shift register.

 

When the boolean is false, put the previous value from the shift register into the array, and pass the value in the shift register through to put it back into the shift register.

0 Kudos
Message 2 of 10
(3,270 Views)

@OriolesFan wrote:

When the boolean is true, assign your next value to the array and put that next value into a shift register.

 

When the boolean is false, put the previous value from the shift register into the array, and pass the value in the shift register through to put it back into the shift register.


Actually, I could not understand how could I do? I tried but...

Egemen
0 Kudos
Message 3 of 10
(3,263 Views)

Autoindex the two input arrays.  Then you don't have to index them out yourself.

 

You need to store the output array in a shift register.  Initialize it to empty.  Now when the boolean is TRUE, you use the Build Array to add the numeric to the array.  When the boolean is FALSE, you just pass the array straight through.


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 10
(3,253 Views)

@crossrulz wrote:

Autoindex the two input arrays.  Then you don't have to index them out yourself.

 

You need to store the output array in a shift register.  Initialize it to empty.  Now when the boolean is TRUE, you use the Build Array to add the numeric to the array.  When the boolean is FALSE, you just pass the array straight through.


I thought I do not understand what you said. I could not wire an array to a shift register. I tried to do sth but it does not work 😞

Egemen
0 Kudos
Message 5 of 10
(3,248 Views)

I explain it again via printscreen.

Egemen
0 Kudos
Message 6 of 10
(3,237 Views)
Solution
Accepted by topic author newbieeng

Use the Build Array in the TRUE case!

 

Also, create an array constant and wire that into the shift register in order to initialize it.

 

 

If you are this lost, you really should go through the LabVIEW 101 tutorials.


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
Message 7 of 10
(3,230 Views)

of course you COULD use the Conditional tunnel from the array functions in the Open G toolkit


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 10
(3,227 Views)

@JÞB wrote:

of course you COULD use the Conditional tunnel from the array functions in the Open G toolkit


Or upgrade to 2012 which has the conditional autoindexing tunnels.


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 9 of 10
(3,223 Views)

@crossrulz wrote:

Use the Build Array in the TRUE case!

 

Also, create an array constant and wire that into the shift register in order to initialize it.

 

 

If you are this lost, you really should go through the LabVIEW 101 tutorials.


Thank you very much. I was trying to constitute it without build array function that's why I stuck in that.

Egemen
0 Kudos
Message 10 of 10
(3,216 Views)