Hi,
I've been googling and tinkering for many hours, in an attempt to allow my script to send a simple signal to our physiological monitoring device, but have failed so far.
Here is the basic script:
from psychopy import parallel
port = parallel.ParallelPort(address=u'0xB010')
The error:
AttributeError: 'module' object has no attribute 'ParallelPort'
Tried these scripts also:
from psychopy import parallel
parallel.PParallelInpOut32
parallel.PParallelDLPortIO
and got similar errors:
AttributeError: 'module' object has no attribute 'PParallelInpOut32'
AttributeError: 'module' object has no attribute 'PParallelDLPortIO'
then tried this:
from psychopy import parallel
parallel.setPortAddress(address=0xB010)
parallel.setData(2)
and the following error occured:
Traceback (most recent call last):
File "C:\Users\intlab\Desktop\EMG stimuli\ttl_testing.py", line 11, in <module>
parallel.setData(2)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.82.01-py2.7.egg\psychopy\parallel\__init__.py", line 151, in setData
raise RuntimeError('Port address must be set using setPortAddress')
RuntimeError: Port address must be set using setPortAddress
I'm using Windows 7 - 64 bit. and know that it is troublesome OS for this function.
My parallel port is "PCIe to Multimode Parallel Port (LTP1)", and it's address is 'B010'.
I used a software called "Inquisit 4", that can send simple TTL signals, and the signal was indeed detected on our monitoring device using AcqKnowledge software . This implies that the port, drivers and wiring are working correctly.
I tried reinstalling the InpOut32 drivers presented in the following link:
Clicked the InstallDriver.exe, and moved files inpout32.h, inpoutx64.dll, inpoutx64.lib, all to the System32 directory, and to the directory where my script is.
I gave my user admin-permissions to these files, and also to the parport.sys file in System32/drivers.
I read through both these topics:
and as detailed, have attempted their suggestions without success.
Our experiment is due to run next week, and everything is set apart from this TTL output. Will be very grateful for any assistance or further suggestions.
Kind Regards,
Adam