[win10] parallel port D010 no write from psychopy (but does w/ Eprime and Presentation)

We had to reimage our old win8 stim computer. Hardware is all the same, but now we’re on a fresh win10 install. The parallel port address changed (D010). I updated the address in our EPrime task and triggers send. But it hasn’t been as easy for psychopy.

When setData didn’t just work, I followed along with the tutorial. I grabbed the most recent inpoutx64.dll and tried putting it alongside a new psyexp file. No luck there, so I also dumped the dll in c:/windows/system32, restarted the computer just in case, and still had no luck.

Are there any other common issues/mistakes?


For what it’s worth, the md5sum of the dll is the same as what’s in Program Files/PsychoPy

$ md5sum /c/Windows/System32/inpoutx64.dll
ac0c3ae82ec0764c605fa59e7bf05614 */c/Windows/System32/inpoutx64.dll

$ md5sum /c/Program\ Files/PsychoPy/inpoutx64.dll
ac0c3ae82ec0764c605fa59e7bf05614 */c/Program Files/PsychoPy/inpoutx64.dll

I used the code below in the Shell window to test out the parallel port. setData does not seem to actually change the parallel port bits (as observed by our recording software). But it is maybe odd that readData reports 16 – seems to do something strange when the port doesn’t exist (?)

>>> from psychopy import parallel
>>> p = parallel.ParallelPort(address=0xD010)
>>> p.setData(128) # no change/indicator in ActiView
>>> p.setData(0) 
>>> p.readData()
16

>>> p = parallel.ParallelPort(address=0x001)
>>> p.readData()
1
>>> p = parallel.ParallelPort(address=0x375)
>>> p.readData()
117

I set the port address based on the Resource tab of the parallel port device settings properties.

As I did for Eprime (&HD010 would be 0xD010 in python, working)
image

writeport &HD010, 1
sleep 100
writeport &HD010, 0

The task using NBS Presentation was already set to “LPT3” and didn’t need to be adjusted.


I tried all the addresses, just in case EPrime and pscyhopy could differ. But nothing triggered

for i in range(0,0xFFFF):
    p = parallel.ParallelPort(address=i)
    p.setData(128)

If I open psychopy coder w/ “run as administrator” ttl sends!

Once run with admin initially, the subsequent runs have write-access to the port without elevated permissions!

from https://www.highrez.co.uk/Downloads/InpOut32/

… but the first time it is run, it must be elevated on Vista and later (run as Administrator)

1 Like

THANK YOU for posting this solution!!

First I thought the problem might be that Windows 10 was reporting the address of my PCIe parallel port card incorrectly, as Device Manager did not list an address and System Information (https://www.sevenforums.com/hardware-devices/344035-i-o-address-parallel-lpt-port-missing-resource-tab.html) listed 3 addresses, none of which PsychoPy could communicate with. Then I tried using E-Prime and established that it was able to send signals out on one of the 3 addresses, but I cannot use E-Prime for anything more than testing because v2.0 Standard will not work on a monitor that has a maximum refresh rate >201 Hz. Then I stumbled upon your post.

To the makers of PsychoPy: please can you add a note to the parallel port documentation (Communicating via a Parallel Port — PsychoPy v2024.2.2) that it is necessary to initially run Psychopy as administrator for this to work? As @WillForan has said, this requirement is stated in the documentation for the drivers, but I would not have thought of looking there.