08-29-2013 10:32 AM
I am receiving a 12 data bus through a digital i/o card. The first ten bits of the word is raw data and the last 2 bits are a channel position. I can set DAQmx to acquire the first 10 bits and then analyse the data , such as a histogram. However I would like to acquire the whole 12 bits and chop the last 2 bits of so I can analyse the first 10 bits and then use the last 2 bits to convert into a decimal number to represent what channel the data would be on.
Is there any simple way of dividing the 12 bit bus into 10 bits and 2 bits.
Many thanks
( I’ve attached a screen shot of what I am doing at present)
Solved! Go to Solution.
08-29-2013 10:50 AM - edited 08-29-2013 10:51 AM
Some simple bit manipulation with Logical Shift and AND will do the trick.