Trigger Code Hardware Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
This information is mostly for Aaron or anyone else who might be setting up a PC for the first time.
You will need to go to and download the latest binaries. Unzip the file, then run as administrator Win32\InstallDriver
to install the drivers system-wide.
Once this is done, at least for , experimenters will also need to copy the files inpoutx64.dll
and inpoutx64.lib
from the x64
folder, and then the file inpout32.h
from the Win32
folder. Place a copy of all of these in the same folder as your PsychoPy experiment file (the one with the .psyexp filetype).
An alternative to a PCIe card (especially useful with laptops and mini-PCs) is the DAQ. We have one in the lab (enclosed in a literal black box). To make this work, you first need to install the drivers and other support software, specifically the . This includes several necessary components including InstaCal and Universal Library. Installation is pretty straightforward — just run the installer and say yes to everything it asks, including rebooting as necessary.
This was helpful. The first step, installing Universal Library, will have already been done when you installed the MCC DAQ software in the previous step. Now, download and install . "Install" here basically means "save it somewhere on the PC where you can acess it", and then open PsychoPy, go to Preferences -> General -> Paths, and add the full path to the PyUniversalLibrary folder (e.g.,
The above-linked forum post also notes PyUniversalLibrary can be installed using pip
.
My experience was that PyUniversalLibrary did not work out of the box. Specifically, the line in UniversalLibrary.py
that reads:cbw = ctypes.windll.cbw32
Needs to be changed to: cbw = ctypes.WinDLL('/Path/to/UniversalLibrary/cbw64')
Note that the above is case-sensitive (change windll
to WinDLL
) and the 32 needs to be changed to 64 (unless you're running a 32-bit version of Windows, which you probably aren't). As well, the sample code on that PsychoPy forum post should be used as the basis for sending codes in your experiment; the typical parallel
code will not work. NCIL's GitHub organization page has a repository with sample code, including the modified version of UniversalLibrary.py
as per the notes above.