LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a sequencial value of boolean array

Hi,

 

I want a boolean array output in the sequence like TFF, FTF and FFT from a input array, Please see attached VI for more details.

 

 

Thanks

Prashant

 

0 Kudos
Message 1 of 26
(4,233 Views)

Create a 2-D array that had each of those patterns.  Autoindex on the For loop tunnel.  I'm not sure whether you will want each row to be the pattern, or each column.  Play with the arrangement of the array and transpose it as necessary.

0 Kudos
Message 2 of 26
(4,230 Views)

I won't open a DOC file to look at a picture but in case you want a chase sequence of bools you can just use the power of 2 function...

chaseLED.JPG

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 26
(4,221 Views)

If I use power of 2 function the outpuy will be 0, 1, 4, 9.... but I wants output  in a sequence of 1, 2 and 4 only.

0 Kudos
Message 4 of 26
(4,212 Views)

Then create the 2-D array constant like I said.

 

0 Kudos
Message 5 of 26
(4,207 Views)

Prashant

 

The suggestion given by NIquist will give you boolean array equivalent of 1,2,4,8,...till 2^10.

 

You can change the power of 2 (N input to For loop) to the number of bits you need. Have you tried it?

 

Please clarify your end requirement, to get more apt suggestions.

 

Note: The picture in the file attached by you will result in an output of 'TFF', 'FTT', 'TFF'.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 6 of 26
(4,197 Views)

Hi,

 

In the output array I am generating binary equivalent to 20, 36 and 52 and in the same sequence. I want a sequence of 36, 20 and 52 in the output array. What is the best option to do that?

For details please refer attached document.

 

Thanks

Prashant

0 Kudos
Message 7 of 26
(4,175 Views)

I would choose the easy option:

boolarray2.JPG

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 8 of 26
(4,169 Views)

Good suggestion, 1 more thing I am looking for is take the output in 1D array itself out of the for loop. I dont want output in 2 D array but I want output same as the 1D array out of the for loop.

 

 

0 Kudos
Message 9 of 26
(4,164 Views)

@UPRR wrote:

Good suggestion, 1 more thing I am looking for is take the output in 1D array itself out of the for loop. I dont want output in 2 D array but I want output same as the 1D array out of the for loop.

 

 


Smiley Indifferent  I don't understand.  If you want the same array that went into the loop to come out of the loop, just go around it. Smiley Happy
arrayout.JPG
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 10 of 26
(4,158 Views)