10-08-2012 06:39 AM
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?
Solved! Go to Solution.
10-08-2012 07:01 AM
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.
10-08-2012 07:21 AM
@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...
10-08-2012 07:47 AM
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.
10-08-2012 08:01 AM
@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 😞
10-08-2012 08:39 AM
I explain it again via printscreen.
10-08-2012
08:43 AM
- last edited on
03-14-2024
03:20 PM
by
Content Cleaner
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.
10-08-2012
08:44 AM
- last edited on
03-14-2024
03:20 PM
by
Content Cleaner
of course you COULD use the Conditional tunnel from the array functions in the Open G toolkit
10-08-2012
08:49 AM
- last edited on
03-14-2024
03:20 PM
by
Content Cleaner
@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.
10-08-2012
08:56 AM
- last edited on
03-14-2024
03:21 PM
by
Content Cleaner
@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.