04-16-2009 10:36 PM
04-17-2009 12:14 PM
04-17-2009 12:16 PM
Here is a start. I assumed that the string are in 32 bit words from your source, no endian assumptions you could do a byte swap is required.
04-19-2009 11:12 PM
If I understand your request correctly I've had to do something very similar. (My solution is VERY different to Paul's, we seem to have made different assumptions about the sort of data you want returned)
With my solution I started with the assumption that converting to a binary array and manipulating it would actually take longer because LabVIEW isn't very quick with array manipulations.
So I try to do as much as possible with math/bitwise operations on integers rather than Boolean arrays.
Because I am interested to see the performance differences of the two approaches (and possibly get feed back from some other experts here as to how to simplify / improve the code), I modified my solution to suit your question and then coded another version which produces the same result but using Boolean arrays. (Use "Type" enum to select between the two.)
Results:
Math-bitwise vs. Boolean array... run 1million times and see how long it takes...math-bitwise wins, (in my example it's approx. 20 times faster.) Of course I haven't spent a lot of time on it and tested it thoroughly. See attached file.
04-20-2009 01:42 PM
Thank you all for the help. I ended up going a slightly different route using bitwise math. But, I appreciate all the ideas, food for thought on different projects.
Josh