Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-channel acquisition with events not working for 4 or more channels

Dear All,

I am trying to acquire 16 samples per channel at 256Hz per channel on a DAQCard-6036E using double buffering and events in Visual C++ on Windows 2000. This works for 3 or less channels, but when I try to acquire 4 or more channels the half buffer is never ready.

I have attached some Visual C++ code that is a modification of daqevent.c found in the code library to scan multiple channels.

Does anyone know a reason why this combination of parameters may not work?

Thank you for any help.

-Sam
Download All
0 Kudos
Message 1 of 3
(2,723 Views)
Hello Sam,

The use of events may be complicating this issue. Is there a specific reason you need events? It appears you simply programmatically wait for the doneFlag to be set, which functionality can be accomplished without events. May I suggest for your particular case using this example for continuous sampling on multiple channels.

Have a nice day!

Robert M
Applications Engineer
National Instruments
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,723 Views)
Hi Robert,

Thank you for the reply. I actually used that example
as a basis for my test code. The issue is with
similar code in a larger application, that I am using but did not write, which uses events
to "fake" multi-threading data acquisition; allowing the application to perform other actions while data is being acquired. This code is working fine for other NI DAQs, but
is having difficulty with my E series card.

I am discussing this problem with an NI engineer in tech support and it seems the problem is partially related to the DAQ_rate function having been written
before the E series line came out. It is returning an incorrect timebase.

There also seems to be a larger problem with the 6036E DAQCard that has not been confirmed by NI yet
.
The card is having a problem when scanning groups of
channels equal to the power of 2 at a power of 2 frequency, i.e. acquiring from 2, 4, 8, and 16 channels at 256Hz.

It is my feeling the card is rounding up a delay value to a power of two which normally takes care of the delay in multiplexing the channels to one A/D converter (the E series DAQs only have 1 A/D). However, in my situation, using a power of 2 number of channels with a power of 2 frequency, the delay is falling on a power of two so it is not rounding and thus not taking into account the delay. (Or maybe my card is broken).

I'll post back when this gets resolved.

Kind regards,

-Sam
0 Kudos
Message 3 of 3
(2,723 Views)