NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use DAQ to read and plot a single bit from a 16 bit word.

Solved!
Go to solution

I have the DAQ plotting the whole  16 bit word but I only need to see a single bit in the word transition from 0 to 1.  Is there any way to mask the bit?

I am using Test Stand 2013.

 

Thanks

Tom

0 Kudos
Message 1 of 5
(2,724 Views)

Tom,

 

first of all, TestStand doesn't acquire data by itself; you require a code module for this.

Second: Are you talking about a digital signal? If not, your request doesn't make much sense as a toggle of a specific bit is either

a) passing a threshold (simple greater equal comparison) - or -

b) simply nonsense as the bit might be subject of expected measurement inaccuracies (typically the lowest 2-3 bits)

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,685 Views)
Solution
Accepted by topic author TomMills

I agree with Norbert here we need some more context on how this data is being collected and then passed to TestStand so that we can fully understand why/how this bit will need to be represented.

 

Applications Engineer

National Instruments

0 Kudos
Message 3 of 5
(2,666 Views)

Worked around the issue in the software instead of trying to mask the bits.  This was a 16bit word representing a bunch of different flags.  I.e.  Bit 2 is a discrete that indicates weight on wheels.   I am using the DAQ Plot to show exactly when the WOW bit is set or cleared.  In Test Stand this word gets stored in a Local variable say 

Flags.    That part is working fine.    Can I now use an expression to mask off

bit 2 and store it in a  local WOW_flag variable?  In C it would be   WOW_flag = Input_word & 0x0004. Just didn't know if Test Stand can do this type of expression.

 

0 Kudos
Message 4 of 5
(2,639 Views)

Hey TomMills,

 

There is not a function to do bit masking in TestStand. You should do this in the code module itself instead. What type of code module are you using to actually get this data?

 

Thanks,

Applications Engineer

National Instruments

0 Kudos
Message 5 of 5
(2,627 Views)