07-10-2013 08:15 AM
Hi,
I'm trying to use the USB-6008 to collect analog data without using Labview, since I can't afford the lincence. I searched in the C++ examples provided with the product and found "Simple Analog Input Example".
The compiler I use is codeblocks instead of visual studio (again for monetary reasons). The code seems to works since when I run it with the USB-6008 connected, it writes "Acquired 1000 points".
I have 3 questions related to the use of this code:
1. Where are these 1000 points stocked?
2. How can I modify the code to specify the acquisition time and acquisition frequency?
3. How can I modify this code to sample points simultenously with the 8 analog entries?
Thank you for your help,
I'll try to add any precision if necessary.
Albany
Solved! Go to Solution.
07-10-2013 09:21 AM
07-10-2013 09:41 AM
Now that was a quick answer, thanks a lot.
I'll check out the C programmer help documentation.
07-29-2013 02:42 AM
Dear Dennis,
i wrote a program in VC++ which acquires some analog voltage channels using NIDAQmx. By means of the "DAQmxCreateAIVoltageChan()" function it works properly, but I've faced a question:
When I measure a sine wave as a input channel whith diffrential terminals (pins) on NI-Device, there is no problem but if I connect the input signal in single ended form (connect input signal to each single terminal and connect GND of NI-Device and Signal generator together), there is a irrigular and alternative offset (DC value) in aqcuiered data that shows there is an error in connection of GND's. (I'm sure about function generators)
Is there any specific function to assign exactly that input data should be measured in differential or single ended form? I mean, should I write seperate codes in C++, if I want to measure input signal in both forms of differential and single ended or does the mentioned function ( DAQmxCreateAIVoltageChan() ) satisfy both needs (if so wherefrom does this fault emerge)?
Thanks a lot the knight of ni 😉 ,
yours,
Mohammad
07-30-2013 11:28 AM
Harati,
There is a parameter for the DAQmxCreateAIVoltageChannel Function called terminalConfig. This can be found in the C Reference Help under NI-DAQmx C Functions>>Channel Configuration/Creation>>Create Analog Inpupt Channels>>DAQmxCreateAIVoltageChan. Possible values for this parameter are listed in the help file. Post again if you have further questions.