Programming an fMRI Experiment with PsychoPy + National Instruments/nidaqmx?

Hello everyone,

I’m fairly new to PsychoPy, and will be running an fMRI experiment in the future. Unfortunately, the fMRI scanner in my lab does not use a keyboard, and instead uses button boxes from National Instruments. While they do have documentation for using their hardware in Python, finding resources on how to integrate it specifically with PsychoPy code has been difficult.

Specifically, I’m trying to figure on how to replace the getKeys button presses with the button box buttons, as well has how to record the timings for the button box presses. I’m using the PsychoPy coder.

Usually, a button box will send numbers (e.g. 1, 2, 3, 4) as if it was an external keyboard. Have you tried to connect the button box USB to your laptop and test what kind of keys it outputs? You can just use a notepad to start and see if it sends numbers.