64-bit OS PsychoPy triggers

I had a problem sending triggers for eeg recording using the standalone version of PsychoPy v1.81.00 on a 64-bit Win7 OS. I followed the descriptions here and did not get any (more) errors. However, the triggers do not appear on the recording computer (Brainvision Recorder for Win7 32bit).

What I've done:

  • Download and install InpOutBinaries_1500 via InpOutBinaries_1500 \ Win32 \ InstallDriver.exe
  • I copied other files (inpout32.dll, .h and .lib, as well as vssver2.scc) to the working directory of my script
  • Tried to send trigger codes using windll.inpout32.Out32(0x378, triggerCode)

The startup code does not appear in Brainvision Recorder, but it seems to be set correctly when calling print str(windll.inpout32.Inp32(0x378)) .

Thanks for every tip or idea!

+6
source share
1 answer

I managed to solve the problem. I'm not quite sure which step actually cut the curve, but I recommend the following:

Download and install the LPT Test Utility on your presentation computer.

First, this program installs inpout32.dll automatically and correctly, regardless of whether you are using a 32-bit or 64-bit OS. In addition, it helps you monitor and manage the contacts of your parallel port. If using standard addresses ( LPT1 through LPT3 ) does not work, select LPTX and enter your address manually ( see here, where you can get your parallel port address on a Windows PC ). If the triggers do not appear on your recording computer using this program, you have a problem that is not related to PsychoPy.

If this fails , (re) install the parallel port driver. Using Windows 7, this is not necessary, but actually solved one important problem for me. If this still fails, the hardware components (plug / card of the parallel port, cable (s), synchronization unit) may be damaged.

If the triggers work with the "LPT Test Utility" program, but do not use PsychoPy , you need individual troubleshooting, depending on your code. Of course, you need to insert the port address that worked with the "LPT Test Utility" in your PsychoPy code.

 from psychopy import core from ctypes import windll windll.inpout32.Out32(portaddress, triggerCode) #sends the trigger with triggerCode being an integer between 0 and 255 core.wait(0.05) #wait 50ms windll.inpout32.Out32(portaddress, 0) #deletes the trigger ie resets the pins 

Best wishes,

Mario

+9
source

Source: https://habr.com/ru/post/977775/


All Articles