open-ephys-plugins / nidaq-plugin

Acquires analog and digital signals from National Instruments DAQs
GNU General Public License v3.0
4 stars 15 forks source link

NI 6251 #3

Open FelixAntonSchneider opened 4 years ago

FelixAntonSchneider commented 4 years ago

Hi, I compiled and installed the nidaq-plugin from source and wanted to try it with the NI-6251 PCIe card. The plugin loads without error and recognizes the 6251 card correctly. But when I try to start data acquisition most of the times the GUI just completely crashes. And when it works, no files are written in the specified folder, when the Recording is set to binary. Only the settings.xml file appears.

Does the plugin need actual input data to properly work?

medengineer commented 4 years ago

Hi, The plugin does not require active input to work. The intermittent crashing is strange. Do you see any error in the OpenEphys debug console when the GUI doesn't crash and starting acquisition with the NI device? That output will be helpful.

FelixAntonSchneider commented 4 years ago

Sorry for the long delay. I don’t see any obvious thing going wrong in the console. The crashing is really bad. Total screen freeze and I can’t even access the Task Manager anymore. That's why I had to take pictures of it.

image image

FelixAntonSchneider commented 4 years ago

Interestingly I get an error message when DAQ starts without crashing.

`Enabling processors... Source node received enable signal Resizing buffer for Subprocessor 6553600. Samples: 300000, Inputs: 8 Enabling VisualizerEditor Filter Viewport disabled.

Adding audio callback. DAQmx Error: Onboard device memory overflow. Because of system and/or bus-bandwidth limitations, the driver could not read data from the device fast enough to keep up with the device throughput. Reduce your sample rate. If your data transfer method is interrupts, try using DMA or USB Bulk. You can also use a product with more onboard memory or reduce the number of programs your computer is executing concurrently. Task Name: AITask_PXI21622545

Status Code: -200010`

FelixAntonSchneider commented 4 years ago

Tested it a bit more. As long as I set the sampling frequency at 12.5 kHz or below, DAQ just starts fine and files are written.

FelixAntonSchneider commented 4 years ago

I tested digital inputs with the 5V source line of the 6251 itself, and events are written as expected as far as I can tell.

So up until now the plugin seems to work fine with this device.

FelixAntonSchneider commented 4 years ago

I now tested the analog inputs with the 5V source line and there seems to be a bug. When I connect the 5V line to just one of the analog inputs, the signal appears in ALL analog channels through the LFP viewer and similar values are written to the continuous.dat file for all channels.

AIcontinuous_hex_view

It doesn't seem to be a problem of the NI 6251 itself. In NI MAX test panel the 5V signal clearly only shows in the channel I connected it to. So far it also didn't change depending on whether I set RSE, NRSE or differential.

medengineer commented 4 years ago

Someone else had the same issue and was able to resolve by adding 50-ohm terminating resistors to the non-used analog inputs. Of course, this shouldn't be necessary and I am looking into why this is the case with the NIDAQ module.