I have been trying to get a new fMRI study working with PsychoPy and a Cedrus response pad (via the Cedrus pyxid library). The scanner has an MRA response box that pyxid identifies as a Cedrus RB-834. In testing out my scripts, I’ve run in to two strange problems.
The first is that the box will work great for a while, but then at some point, it suddenly stops communicating with PsychoPy, and no more input comes in until I stop and reset the script. The amount of time it takes before that happens is variable…but clearly for an MRI study, we don’t want that to ever happen, so I’d like to figure out what’s causing this.
Another issue is that the communication between the response box and PsychoPy seems to be fairly reliable on a Mac (with the exception of the issue noted above), but on Windows, it’s very sporadic. Specifically, when running the pyxid.get_xid_devices() command, it seems to alternate between working and not working, every other time I try to communicate with the button box. I can get around this by running it on my Mac, but it still seems worth seeing if there might be a solution to this, since using a Mac may not always be an option.
Finally, this button box seems to have a number of different modes for communicating with the computer, including XID for SuperLab, and ASCII for Presentation. Both of those seemed to work (although possibly the XID mode was a bit better, in terms of being less likely to fail sporadically). Can you clarify which is actually best for communicating with PsychoPy through pyxid?
I should also note that people using other programs don’t seem to be having these issues with the button box, and they’re also happening at such a basic level that I don’t think my PsychoPy script is the problem; thus, it seems like the glitches are probably in the pyxid library. So any help that you would be able to provide would be really helpful.