01-09-2006 03:08 PM
01-10-2006 06:21 PM
Hi Simon-
What type of DAQ device are you using? What you're trying to accomplish may be easier using NI-DAQmx.
At any rate, a great double buffering example for Traditional NI-DAQ that installs with the driver is "DAQdoubleBuf.C" and can be found in ( C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ai ). How exactly are you trying to implement the callback procedure (i.e. are you trying to only read from the backlog at specified acquisition intervals, etc)?
Thanks-
01-16-2006 05:26 AM
Tom,
Thank you for your reply. I'm trying to use NI 4472 for continuous multi-channel
signals acquisition (double buffering) as a part of my masters dissertation. The
callback function should only write data to file whenever the half-buffer is
full.
I have found a "Using DAQ Event Messaging under Windows NT/95/3.1 -
Application Note 086) document, which includes basic example of using windows
callback function to handle acquisition process messages (attached to this
post), but when I execute it, I get "Error code -10080 at
SetupNIDAQEvents) message.
Could you please give me a hint what's wrong or where I should look for some
code examples? Or maybe DAQmx code examples for Visual Studio C++ would suit my
needs better?
Regards,
Simon
01-17-2006 11:01 AM
01-23-2006 07:43 AM - edited 01-23-2006 07:43 AM
Hi,
Thank you for your help. The gain setting was the answer! Now I'm trying to
continuously acquire data from two analog channels using double buffering (as a
starting point for 8 channel acquisition). My code seems to be working fine:
the double buffer is being filled up with the right amount of data. But the
acquired samples have strange values, eg.:
0 -190267 71522
2 -197805 -112550
4 -188074 -86492
6 -198216 -138331
8 -183551 -42830
10 -185196 26336
12 -187800 -88986
14 -190952 -32296
16 -182181 56830
18 -184373 12752
20 -183277 -74987
22 -185059 52672
24 -186292 40890
26 -179302 -28414
28 -179714 41167
30 -177658 -36177
/.../
There are some positive values at the second channel, which seems strange, as
the values should be, as far as I know, in Db (so should be negative)?
Best regards and thank you for help,
Simon
Message Edited by electrobody on 01-23-2006 07:49 AM
01-24-2006 10:18 AM
01-24-2006 01:17 PM
01-25-2006 02:51 PM
01-25-2006 02:53 PM