Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxReadRaw data format

The DAQmx C Reference Help says:

DAQmxReadRaw

int32 DAQmxReadRaw (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, void *readArray, uInt32 arraySizeInBytes, int32 *sampsRead, int32 *numBytesPerSamp, bool32 *reserved);

Purpose

Reads raw samples directly from the input lines. There is no scaling, parsing, or separation of the samples. Refer to the specifications for your device to determine the format of the incoming samples.

But I cannot find any mention of the format in the M-Series User Manual or the NI 622x Specifications. Where is it published?

Thanks.

0 Kudos
Message 1 of 6
(6,666 Views)

Hi,

 

Thank you for posting to the NI forums.  The resolution of the 622x series devices is 16 bits.  When you read the raw data, you will be reading the raw bits coming out of the ADC on the device.  To view the full resolution of your device, I would recommend using an unsigned integer, and then converting this data to scaled data.  There are a couple of good Knowledge Base articles that discuss this issue.

 

Converting Raw Values of DAQmx Read.vi to Scaled Readings

 

Is the Unscaled Raw Data from DAQmx Calibrated?

 

I hope this helps.  Post back if you have further questions.

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 6
(6,640 Views)

Thanks, Ed, for the reply.

Your links explain well how to deal with the raw sample values. What I cannot find is how those raw values are arranged within the buffer. For example, are they interleaved or grouped by channel? Are all channels' raw values present in the buffer or only the channels belonging to the task? Are the channel values in the same order as in the task? What is meant by "There is no ... parsing, or separation of the samples."?

Thanks in advance for helping me find the proper documentation.

 

0 Kudos
Message 3 of 6
(6,559 Views)
Hi,

Ed is out of town, but I have looked at your issue.  The question about parsing or separation of the samples is pretty straightforward.  There are no gaps in the data when it is read in raw format.  You just get straight binary values from the ADC, and they are either interleaved or non-interleaved, and that determines the order you will see the samples in if you are performing a multi channel acquisition.

In the case of the M series device the raw data will be interleaved if you have a multichannel acquisition. and non-interleaved if you have a single channel acquisition.  Only the channels belonging to the task will have data in the buffer.  Let us know if you have any further questions with regards to this issue.

Have a great evening,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 4 of 6
(6,549 Views)

Thanks, Michael, for the clarification. I'm still curious as to where any of this is documented. NI documentation is usually quite complete, if a little tough to navigate.

Thank you.

Claus

 

Message Edited by ClausB on 02-15-2007 07:29 AM

0 Kudos
Message 5 of 6
(6,527 Views)
Hi Claus,

I got this information from an internal training document.  I am in the process of talking with R&D about where this information is in our public documentation.  I could not find a good explanation of this in the device specific help or specifications documents and that is where the DAQmx help says it should be.  I will file the necessary requests to get this documentation added. Please let me know if you have any further trouble with the raw data read VIs.

Have a great week,

Michael D
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(6,501 Views)