Hi,
I hope this is the right location for putting this post. If not, please let me know a more appropriate place. I am trying to read raw analog sample data using ANSI C and would appreciate if someone could clear up some questions I have after reading the documentation for NI-DAQmx (NI-DAQmx C Reference Help). To read from the card's buffer, I need to allocate a buffer, and for that I need to know the size of the samples for each scan. It appears that this is done with DAQmxGetReadRawDataWidth(), and that as each measurement is added to a task with DAQmxCreateAIVoltageChan(), the width will get larger. Is this correct? If not, how is the data width found? I would like to allocate everything before starting to add measurements to the channel, so I would also like to know if there is any way to find the width for an arbitrary card without first adding the measurements.
The data is read from the DAQ cards buffer using DAQmxReadRaw(). The documentation for this function states, “Refer to the specifications for your device to determine the format of the incoming samples.” The current cards of interest are E-series (although I would like to write code that will also handle others), so I looked in their manual (http://digital.ni.com/manuals.nsf/websearch/1A2B0F938B5B895086257BEB006FE5BEI) and in family specifications for the specific cards. I did not see the format in these and would like to know where it is located.
It appears that by using DAQmxReadRaw(), I will be making an identical copy of the data in the card's buffer. Would it be possible to directly work with the original data to avoid the copy? Thanks for any information.
Jim