LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it convenient for bits operation in labview?

Hi,
I want to deal with the protocal to the DAQ original data. The frequent work is bits operation.But I wonder if it is convenient in labview.
Thanks again
0 Kudos
Message 1 of 5
(2,884 Views)
It's correct that working on bits can be a challenge i LV, but as demonstrated in the bit twiddling challenge in the LabVIEW Zone there's often many ways to do it and do it efficiently. Check out the challenge and the solutions to get some ideas:

http://www.ni.com/devzone/lvzone/codechallenge1.htm

http://www.ni.com/devzone/lvzone/codechallenge1_results.htm
0 Kudos
Message 2 of 5
(2,884 Views)
Thank u,Mads.
I wonder if the efficiency is high for frequently bits operation?
0 Kudos
Message 3 of 5
(2,884 Views)
gemstone wrote:
> Thank u,Mads.
> I wonder if the efficiency is high for frequently bits operation?

Have a look at the bit twiddling challenge results and you'll
get an idea of serious bit twiddling - I guess LV was working
at about the same sort of speed as you could manage in tightly
coded C.

However, thats a lot more complex than most of the bit twiddles
you need to do for protocol stuff. Mostly it is things like
"Is bit 3 of this word set?" and "Set bit 2 of this word".
These are most easily accomplished by doing boolean logic
on unsigned words, the same way as yould do in almost any other
language, and just as quick in labview.

If you're interested in getting things to work as rapidly as possible,
avoid the "number to boolean array
" functions.

HTH
--
Remove "spamkill." when replying to this message
0 Kudos
Message 4 of 5
(2,884 Views)
Thank u,Dave.I'll try.
0 Kudos
Message 5 of 5
(2,884 Views)