LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array subset function - am I just missing something obvious or does it not exist

Solved!
Go to solution

I'm building something which receives bits over a wire, and I want to buffer those incoming bits and then search the buffer for a particular sequence of bits.

 

This is just a first step towards that. And there are almost certainly things that are wrong or not best practice with it, it is simply what I have managed to cobble together as someone trying to figure out LabView for the first time.

 

In terms of bit order, I tend to work MSB as my most left bit out of habit, but that isn't really important here as I could ammend it to work either way. The most important thing has been solved in allowing me to grab from the array and get it into a format where I can do a comparison against a defined bit sequence.

0 Kudos
Message 11 of 13
(320 Views)

@lv_newb wrote:

The most important thing has been solved in allowing me to grab from the array and get it into a format where I can do a comparison against a defined bit sequence.


 

 

You can cast the U8 array to a string and search for the binary pattern.

 

altenbach_0-1674059921093.png

 

You can also do the comparison directly on the U8 array, of course.

altenbach_0-1674060574263.png

 

 

Message 12 of 13
(316 Views)

hmmm, interesting, I swear that I tried casting and it didn't work. Thank you for the info. At the moment there is just so much that I don't know, I am fumbling around in the dark and occassionally getting lucky.

0 Kudos
Message 13 of 13
(299 Views)