Check the parallel port address
- Find the Device Manager (usually you can get here through the Control Panel).
- Under Ports, you may have multiple Parallel Port entries (shorthand referred to as LPT1, LPT2, etc.). When you double-click these entries, the Resources tab should show you the I/O Range. The address is under Setting. In the example here, the parallel port address would be 0xB400 (the second range of addresses). Record this address.
- Repeat for all port entries - you may need to test each of these if you don’t know which parallel port you’ve plugged the trigger output into.
Check that you have the correct parallel port driver
Windows needs a parallel port driver to work with the parallel port. Under C:\Windows\SysWOW64, verify whether the file
inpout32.dll exists. If not, follow instructions from here to download and install.
In PsychoPy, test the port address
See the documentation here for the PsychoPy function library that interfaces with the parallel. You’ll need to look at the documentation for your stim console to figure out which pin the trigger signal is outputting to. Broadly, there are three steps:
- Import the library:
from psychopy import parallel
- Setup the port with one of the addresses you discovered:
port = parallel.ParallelPort(address=0xB400)
- Read the trigger pin:
trigger = port.readPin(pin)
- If you see an error at step 1 saying that a certain module is not found, the inpout32.dll driver may not be correctly installed. Ensure that Python and PsychoPy are both the same bit (both 32-bit or both 64-bit). If it’s the 64-bit, you may need to install the x64 compatibility in the link above.
- If you see an error at step 3 saying that port is a NoneType, then try copying the inpout32.dll file into the working directory of your PsychoPy code. Others have said that this helps.
This is just a rough set of steps - please let me know if you have any issues! Unfortunately, I’m not so sure about how things would go on a Mac, but happy to help after we get the Windows side working. Good luck.