Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Pin latency problem in USB 6008

Hi all,

 

My team and I are running some cognitive workload experiments using an in-house flight simulator and would like to print the events from this simulator to our EEG data.  This flight simulator is MATLAB based and we have adopted the C-based NI-DAQmx shared libraries to output the digitally encoded events through a USB 6008.  We are successfully outputting all of the recorded events onto the EEG data but are also picking up some extraneous events.  After some careful troubleshooting, we've determined that these unexplained event codes are probably not coming from the MATLAB flight simulator but instead might be a hardware problem from the DAQ.  The random events occur within ~1ms of a true event and are always off by a single power of 2.  This leads us to believe that one or more of the eight pins in port0 is lagging behind the others, thus holding its previous state for just a slight moment longer than the rest.  The EEG software was initially recording at 8kHz, we then lowered the sampling rate to 4kHz and then 2kHz.  Even while recording at 2kHz, an extraneous event was detected.  This test was also repeated using a sampling rate of 16kHz with the same result of a single extra event.  We ran a few more trial through LABVIEW, circumventing the EEG software.  The extra events were still observed.  None of the extra events occur at the same time instance, even though the flight simulator true events were identical, and extra events are rarely the same decimal value. 

 

The events are coded as decimal 1 to 133 to digital port0 and written using DAQmxWriteDigitalU8 (from the NIDAQmx C reference library).  The DAQmx channel is set to be port0 (not pins 0to7 individually).  When no event is detected, decimal 0 is output through port0.  As soon as a event is written, port0 is immediately returned to decimal 0.  The pulse width between trigger on and trigger off is within a few milliseconds. Multiple events occuring within the flight simulator's 100ms refresh window are printed to the DAQ in series.

 

Here are the basic specs:

EEG system: 16kHz,8kHz,4kHz, or 2kHz

USB 6008 sampling rate:  10kHz

Event pulse width: ~3ms

Flight simulator's refresh rate: ~100ms (with multiple DAQ writes inside this window)

 

At this time, our best guess is that one or more of the pins are lagging behind, but not always, since we only detected a single extra event for the 16kHz tests.  Does anyone have any other theories or possible solutions?

 

 

 

 

 

 

0 Kudos
Message 1 of 1
(5,390 Views)