Psychopy not sending voltage signals to parallel port on a Windows 7 32 bit

868 views
Skip to first unread message

Stephany Molina

unread,
Jun 13, 2014, 2:39:25 PM6/13/14
to psychop...@googlegroups.com
Hi all,

I am having trouble getting psychopy v 1.80.03 to send triggers from a Windows 7 32 bit computer to an Windows XP. I recently converted the operating system from Windows XP to Windows 7, previously on Windows XP triggers were sending. Currently, EPrime 2.0 is able to send triggers.

I used a multimeter to read the voltage in the parallel port, which has TTL logic +3.3. Again, on EPrime the voltage is sending out as it should. However, on psychopy after setting the pins to specific values, the multimeter reads 0 at all pins despite psychopy telling me 120. In addition, when I broke it up to display the reading of one pin at a time, the values still add up to 120. Thus, it seems to me that there is an incongruency between the physical reality of the parallel port and the internal logic of psychopy. There is no communication from psychopy telling the parallel port to send out a signal and consequently triggers.

I attempted to direct psychopy to use a specific driver. When I use InpOut32 it works, however DLPortIO does not despite me having installed it recently.

I have attached the simple experiment that should be sending out one trigger. If anybody has a chance to run it and see if their port reads the same signal or different, it would be much appreciated. Also, if anybody has any guidance of further steps or ideas of what may be going on that would be helpful as well.

Thank you,

Stephany
 
20140611_InpOut32_TriggerJackhammer.psyexp

Jonathan Peirce

unread,
Jun 16, 2014, 5:19:02 AM6/16/14
to psychop...@googlegroups.com
You say that it works when you use InpOut32 but not when you use DLPortIO. Is there a reason that you need to use DLPortIO? If you have one driver that works then I'd say just use that. Support is provided for either option, but you don't need both.

(I suspect the DLPortIO driver is somehow incompatible with your operating system so you might just remove it).

cheers,
Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/47c5993a-bef9-480f-97e1-eb409d17e492%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas

unread,
Aug 18, 2014, 6:35:36 PM8/18/14
to psychop...@googlegroups.com
Hi all,

I am working with Stephany and we wanted to clarify some of the trouble we are having. We are still having trouble getting psychopy version 1.80.03 to send triggers from a Windows 7 32 bit computer to a Windows XP computer. Currently, EPrime 2.0 is able to send triggers between the two computers. We have now confirmed that both a Windows XP and a computer running a Linux operating system (with some minor changes in script) can successfully send triggers to the Windows XP computer which our Windows 7 32bit computer is having difficulty with. To clarify, InpOut32 does not work on the Windows 7 32bit computer, it simply does not cause psychopy to crash as DLPortIO does. While using InpOut32 and setting the pins to specific values, pins 1, 3, 4, 5, and 6 are high and give a value of 128, but does not respond to the triggers defined by psychopy. We have another set of two windows XP computers which are able to successfully send triggers to one another using DLPortIO. If we import parallel on the windows 7 32 bit computer, we receive the following error:

Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import parallel
>>> p = parallel.Parallel()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\PsychoPy2\lib\site-packages\parallel\parallelwin32.py",
 line 74, in __init__
    self.ctrlReg = _pyparallel.inp(self.ctrlRegAdr)
WindowsError: exception: priviledged instruction

We receive the same error when attempting to import parallel on the two connected Windows XP computers (when using InpOut32), but if we attempt to import the parallel from psychopy such as:

>>> from psychopy import parallel
>>> port = parallel.ParallelPort(address=0x0378)
>>> port.setData(0)
>>> port.setData(1)
>>> port.setData(0)
>>> port.setData(1)
>>> port.setData(0)

The two windows XP computers will successfully show the output of triggers (even when using InpOut32), but the Windows 7 32 bit computer still gives no output, even when using a multimeter to detect.

To summarize:

On the Windows 7 32 bit computer. We have:
Installed InpOut32, which causes psychopy to report that is is giving triggers, but a multimeter confirms that this is not so.

Installed DLPortIO, which causes psychopy to crash when ran (but DLPortIO successfully outputs triggers using psychopy when used with two Windows XP systems).

Confirmed that triggers will be outputted when using Eprime.


I have attached a simple experiment which we are using to detect triggers and the corresponding .py file.

Thank you,

                   Nick


20140611_InpOut32_TriggerJackhammer.psyexp
20140611_InpOut32_TriggerJackhammer_lastrun.py

Jonathan Peirce

unread,
Aug 19, 2014, 5:17:26 AM8/19/14
to psychop...@googlegroups.com
Have you checked that 0x0378 is the correct address for the parallel port on this system?
Other options are 0x278, 0x03BC

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.

Nicholas

unread,
Aug 19, 2014, 12:15:18 PM8/19/14
to psychop...@googlegroups.com
We have checked to make sure that it is using the correct address. I had even attempted to use each other address to see if it would help fix anything but it did not.

-Nick

Jonathan Peirce

unread,
Aug 19, 2014, 12:44:53 PM8/19/14
to psychop...@googlegroups.com
Googling for the error message turned up this possibility on stackoverflow:
    http://stackoverflow.com/questions/2945160/python-access-parallel-port

but other than that I'm afraid I don't have any other ideas.

Jon

For more options, visit https://groups.google.com/d/optout.

-- 
Jon Peirce
http://www.peirce.org.uk

Stephen Benning

unread,
Oct 31, 2014, 4:49:23 PM10/31/14
to psychop...@googlegroups.com
We finally found a solution. We navigated to:

C:\Windows\system32\drivers\parport.sys

and examined the permissions on that file by right-clicking on it and selecting "Properties". It turns out that its owner was TrustedInstaller, not the user who was executing the program.

In the Properties dialog box, we clicked on the "Advanced" options and clicked on the Owner tab. Clicking the "Edit" button allowed us to select the executing user as the owner of parport.sys. After that, all went well.

We ended up doing this because not even the system administrator account could grant the generic "Users" permissions to write to parport.sys or full control over it. Thus, we had to change the owner to do anything useful; however, if we'd changed the owner to the system administrator and then changed permissions for the "Users", I anticipate we'd have the same success.

Disabling UAC also allowed us to make the parallel port work nicely, but I wouldn't recommend that option to anyone who enjoys a secure system. Nevertheless, in moments of desperation, horrible solutions can seem palatable.
Reply all
Reply to author
Forward
0 new messages