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

DAQmx Port Read error on NI PXIe-6363 #7

Closed zekearneodo closed 3 years ago

zekearneodo commented 3 years ago

Hi, I can use the plugin with the Analog channels of a PXIe-6363, but I get the following error when I try to enable the digital channels:

DAQmx Error: Specified digital channel contains more bits than supported by the 8-bit version of DAQmx Port Read.

Use a version of DAQmx Port Read that supports wider digital ports.
Minimum Read Size (In Bits): 32

I tried compiling the plugin using a newer version of Nidaqmx (18.6) but keep getting the same error. Do you know if there is a hack that can be done to configure the NI board to restrict it to 8 bits?

Thanks for working on this.

medengineer commented 3 years ago

Hi Zeke,

The plugin is currently configured to perform 32bit digital reads for USB devices only, otherwise it defaults to 8 bit. If you’re compiling the plugin from source, a quick hack for now is to change ‘isUSBDevice’ to ‘true’ here and here . Let me know if that works! In the meantime, I’ll try and come up with a better condition on when to use 8bit vs. 32bit read.

zekearneodo commented 3 years ago

Worked beautifully! Thanks a lot.