Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

resolution 13 bit singled ended & 14 bit differential ??

I am little confused about the resolution. USB 6009 has 14 bit resolution but if used in single ended mode its 13 bits. My questions are

1) is the last bit (14th) used as sign bit? LSB or MSB ?

2) what will be the range of the data output from DAC?

Say the range of signal is plus minus 10 V, then the range of DAC output should be

a) 0 to 2^13 (= 8192) with 0 V corresponding to 4096 DAC output

b) -2^13 to +2^13 (14th bit as sign bit) with 0 V corresponding to 0 DAC output
0 Kudos
Message 1 of 8
(5,106 Views)

Hello Anirudha,

In differential mode, the sign bit is the MSB, and in single ended mode the sign bit is not used.

The range of the DAC is 0 to +5V.  Were you inquiring about the ADC?

Is this the information you were after?

Thanks!

Laura

0 Kudos
Message 2 of 8
(5,087 Views)
Lura,

Sorry for the confusion, I meant to say ADC and I want to know what the max & min values of output I would get from ADC when I connect a plus 10 V & a minus 10 V signal. What should be the it therotical output for 0 V input signal.

In a test I did here, when I connected 0 (zero) Volts, I got the reading of 6443 from ADC & for 10 Volts the reading was 13105.

These readings have got me a little confused as the resolution on USB-6009 is 13 bits in single ended config.

Thanks.
0 Kudos
Message 3 of 8
(5,084 Views)

Hi Anirudha,

What version of the DAQmx Read function are you using?  This is the most important thing in determining how the data is returned.

Thanks,

Laura

 

0 Kudos
Message 4 of 8
(5,063 Views)
Laura,

I am using CNiDAQmxAnalogUnscaledReader with ReadUInt32Async function to read the data. THe data is read in a CNiUInt32Matrix

// Defination :
    std::auto_ptr<CNiDAQmxAnalogUnscaledReader> m_AnalogReader1;
    CNiUInt32Matrix     m_matAnalogData1;

// Code :

            // Create voltage input channels
            m_AnalogTask1->AIChannels.CreateVoltageChannel("Dev1/ai0:3","",DAQmxAITerminalConfigurationRse,
                -10, 10, DAQmxAIVoltageUnitsVolts);

            // Setup sampling clock ... 250 samples / sec / channel
            m_AnalogTask1->Timing.ConfigureSampleClock("", 250,
                DAQmxSampleClockActiveEdgeRising, DAQmxSampleQuantityModeContinuousSamples, 250);

            // setup unscaled channel reader
            m_AnalogReader1 = std::auto_ptr<CNiDAQmxAnalogUnscaledReader>
                (new CNiDAQmxAnalogUnscaledReader(m_AnalogTask1->Stream));

            // Set up event handler for Buffer Read event
            m_AnalogReader1->InstallEventHandler(*this, OnBufferReadDev1);

          // read 100 samples / channel at a time
           m_AnalogReader1->ReadUInt32Async(100, m_matAnalogData1, NULL);

0 Kudos
Message 5 of 8
(5,058 Views)

Hi Anirudha,

I noticed that you are reading the values back as unsigned 32 bit integers. However, your device only has 13 bits of resolution. This means that there is a possibility that your data is interleaved, which is where two separate 16 bit values are stored into a single 32 bit integer. That could be causing the raw displayed values not to match the expected results. I recommend using either a U16 or an I16 to read your data.

Regards,
Hal L.

0 Kudos
Message 6 of 8
(5,045 Views)
Hal,

THanks for the reply. I guess I am seeing correct results now.

For positive 10 V i get approx 65536 ( = 2^16) and for zero V i get 32768 approx (2^16 / 2)

Just wanted to confirm this .. since the card has 13 bit resolution, last 3 bit's (of 16 bit interger) are padded with zero's. Right ?

Resolution = ( Range = 20 V ) / 2^13    volts

& 1 bit = ( Range = 20 V ) / 2^16   volts

Thanks.
0 Kudos
Message 7 of 8
(5,020 Views)

Hi,

I'm glad that you are getting the correct data now. Everything in your post looks correct to me.

Regards,
Hal L.

0 Kudos
Message 8 of 8
(4,998 Views)