open-ephys-plugins / neuropixels-pxi

Open Ephys GUI plugin for interfacing with PXIe-based Neuropixels hardware
GNU General Public License v3.0
13 stars 19 forks source link

Neuropixels-PXI Trigger Input #10

Closed v-hofmann closed 5 years ago

v-hofmann commented 5 years ago

I am using the OpenEphys GUI with the Neuropixels-PXI module in order to record neuronal data. To sync my recordings with external hardware (CED) that i use to generate stimuli i tried to use the SMA input to either register TTLs as events or to trigger the recordings via the "record control". Neuropix-PXI settings are set to "MasterSync: 1" and "Config As: INPUT".

If i use a waveform generator to generate manual trigger pulses (i.e. 0-5V 250ms width) the voltage of the generated pulses drops to ~1.25V as soon as the PXIe module is connected (i.e. the PXIe seems to have a very low resistance and acts as a voltage sink). TTLs are not registered (i.e. my recorded event data channels are empty, and also i cannot use the OpenEphys record control to e.g. trigger recordings based on external TTLs). I have connected a 50 kOhm resistor in parallel to no effect.

If i put the sync port into output i am able to register sync pulses on a Oscilloscope (i.e. connections are all good).

If i switch to SpikeGLX the problem is solved (i.e. amplitude of pulses remains at 5V and triggers are registered properly). Thus the problem seems to be with how the API functions are accessed and configured by the Neuropixels-PXI OpenEphys module (the low resistance seems to suggest that it partially remains in an output configuration).

Did anyone encounter similar problems and has a sollution?

medengineer commented 5 years ago

Hi,

We have also recently encountered the same issue on our setup here as well. It is certainly related to an improper sequence of API calls when switching the SMA line between input/output.

I am moving this ticket to the neuropixels-pxi repository and will have this resolved before end of day.

Thanks!

medengineer commented 5 years ago

Fixed w/ latest commit on master.

v-hofmann commented 5 years ago

Hi & thanks for taking the time to fix it!

Id love to try but honestly i dont really have an idea how to (I am new to both OpenEphys and Github...) While i was expecting something like a new "NeuropixPluginPXI.dll" to replace the one in my OpenEphys folder, now i have downloaded all the files in the folder "neuropixels-pxi-master" (that have the sub folder saying "SMA fix"). Could you just quickly tell me how to use these to set it up on my machine?

medengineer commented 5 years ago

Hi,

The new NeuropixPluginPXI.dll is located here: https://github.com/open-ephys-GUI-binaries/open-ephys/tree/neuropix-dev. You can either replace the NeuropixPluginPXI.dll directly or just use that branch entirely. Once we confirm the SMA input is working correctly on other setups I will move the latest NeuropixPluginPXI.dll to the main neuropix branch (which I'm assuming is where you initially downloaded OpenEphys from).

If you'd still like instructions on how to compile yourself from source or any other questions in the future please feel free to reach me directly at pavel@open-ephys.org.

Thanks!