LogoLogo
  • Start Here
    • Introduction to NCIL
      • Welcome
      • Mission Statement
      • Getting Started
      • Make this handbook better!
  • Policies & Expectations
    • Working in NCIL
      • Aaron's Philosophy on Supervision
      • General Policies
      • Roles & Expectations
        • Interpersonal and Working Relationships
        • Lab Director: Aaron Newman
        • Lab Manager: Cindy Hamon-Hill
        • Collaborators
        • Postdocs
        • Lab Research Assistants
        • Graduate Students
        • Undergraduate Students
      • Work Ethic
        • Vacations & Absences
      • Money
        • Employment
        • Undergraduate Research Awards
        • Graduate Student Funding
    • Communication
      • Basecamp
      • Lab Meetings
      • Communication Among Lab Members
      • Communicating with Research Participants
      • Website & Social Media
      • Meetings with Supervisor
      • Response Times
    • Lab Space and Resources
      • Hours of Operation
        • After-Hours Research
      • Safety
    • Intellectual Property
      • Data
      • Authorship
      • Publishing: Where and When
  • Data Management & Analysis
    • Data Science Tools
      • Jupyter
        • JupyterLab
      • Python
      • R
      • How to set up your computer for NCIL data science
    • Servers & Computers
      • Accounts
      • File Server (NCILNAS)
        • Accessing NCILNAS
      • Compute Server
        • Jupyter
        • VS Code - Setup
        • VS Code - Everyday Use
      • GitHub Copilot
    • Data Analysis
      • Behavioural Data
      • EEG Analysis
      • fMRI Analysis
        • Processing fMRI Data with SPM
        • fMRI Analysis in SPM
      • Power analysis with simR in R
    • Data Management
      • Github
      • Open Science
    • Learn Some Coding
  • How To Run Experiments
    • How to Get a Research Study Started
      • Research Ethics
      • Your Research Protocol
        • Components of a Research Protocol
      • Pilot Testing
    • Running a Participant
      • Communicating With Participants
      • Recruiting
      • Before Each Participant Arrives
      • When a Participant is in the Lab
    • Experiment Programming
      • Stimulus Presentation Programs
      • Brain-Computer Interface Programs (BCI)
      • EEG Trigger Codes
        • Lab Streaming Layer
        • Trigger Code Hardware Setup
        • Timing Test
    • Data Storage & Protection
    • Word Similarity Measures
  • Communicating Science
    • Submitting papers to Aaron for review
    • Lab Meeting Talks
    • Independent Study Course
    • Honours Thesis
      • Getting Started
    • Master's Thesis
    • 😓PhD Dissertation
    • PhD Comps
    • Conferences
    • Publications
    • Reviewing Journal Manuscripts
  • Old
    • VS Code on NCIL server
Powered by GitBook
On this page
  • Setting up a PC to use a PCIe parallel port card
  • Setting up a PC to use the USB-1208FS
  • Using the USB-1208FS with PsychoPy

Was this helpful?

  1. How To Run Experiments
  2. Experiment Programming
  3. EEG Trigger Codes

Trigger Code Hardware Setup

PreviousLab Streaming LayerNextTiming Test

Last updated 1 year ago

Was this helpful?

Setting up a PC to use a PCIe parallel port card

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.

Copy drivers to experiment folder

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).

Setting up a PC to use the USB-1208FS

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.

Using the USB-1208FS with PsychoPy

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.

https://www.highrez.co.uk/Downloads/InpOut32/default.htm
PsychoPy
USB-1208FS
MCC DAQ Software
PsychoPy forum post
PyUniversalLibrary