[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()

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

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)

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)

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