Skip to main content

OpenSesame Plug-in: Parallel Port Trigger

An OpenSesame plug-in for sending stimulus synchronization triggers through the parallel port to data acquisition systems.

Copyright, 2022, Bob Rosbag

Contributions: Code is based on the work of Per Sederberg. Debugged and polished by Edwin Dalmaijer.

About

In EEG/ERP studies it is common to send triggers to mark the timestamp for significant events (e.g., the onset of a trial, presentation of a particular stimulus, etc.). Triggers are typically bytes that are sent via the parallel port to data acquisition systems.

The plug-in has an init item which should be placed at the beginning of an experiment and a trigger item for initiating triggers:

  • Dummy mode for testing experiments.
  • Port address for Windows: hexadecimal (0x378), for Linux: port number (0 in /dev/parport0).
  • Value is an integer between 0 and 255 and specifies the trigger byte. It may be a variable, such as [trigger].
  • Enable duration option to enable the duration parameter: the port is set back to 0 after the duration (a pulse).
  • Duration is the duration in ms. It may be a variable.

There are two ways to send a trigger:

  • With duration: one item sends a pulse, e.g. value 23 for 10 ms, and then sets the port back to 0.
  • Without duration: the value stays on the port until another item changes it. For example, one item sends 23 and a later item sends 0; the trigger then lasts as long as the time between the two items.

At the end of the experiment, also after an abort, the port is set back to 0.

In dummy mode no port is opened, but the items still check their values and wait for the duration, so an experiment behaves the same as with a parallel port.

Linux and Windows are supported (possible also OSX, not tested). On Linux the pyparallel package is used. On Windows the bundled InpOut32 driver (inpout32.dll / inpoutx64.dll) is used. This driver is installed the first time it is used, which needs administrator privileges: run OpenSesame once as administrator (see InpOut32Drv_ReadMe.txt).

Documentation: http://osdoc.cogsci.nl/devices/triggers/

License

This software is distributed under the terms of the GNU General Public License 3. The full license should be included in the file COPYING, or can be obtained from:

This plug-in contains works of others.

Documentation

Installation instructions and documentation on OpenSesame are available on the documentation website:

Metadata

Release files for opensesame-plugin-parallel-port-trigger 5.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opensesame-plugin-parallel-port-trigger 5.0.1
File Size Uploaded Provenance Actions
opensesame_plugin_parallel_port_trigger-5.0.1.tar.gz 109.0 kB Without provenance Details for opensesame_plugin_parallel_port_trigger-5.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opensesame-plugin-parallel-port-trigger 5.0.1
File Interpreter ABI Platform Actions
opensesame_plugin_parallel_port_trigger-5.0.1-py3-none-any.whl Python 3 none any Details for opensesame_plugin_parallel_port_trigger-5.0.1-py3-none-any.whl

Total release size: 220.2 kB

Release files / opensesame_plugin_parallel_port_trigger-5.0.1.tar.gz

Download URL opensesame_plugin_parallel_port_trigger-5.0.1.tar.gz
Size 109.0 kB
Tags Source
SHA-256 checksum
How to use checksums
606b7b54acd2444331efd871f41f0c5f944eae43a007a5f14cc9f6f5e4b965ef
BLAKE2b-256 checksum
How to use checksums
afd794cafe7b09ad2ddeac0bdb675f305fefc0fae9d36af3002594c59668bfb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / opensesame_plugin_parallel_port_trigger-5.0.1-py3-none-any.whl

Download URL opensesame_plugin_parallel_port_trigger-5.0.1-py3-none-any.whl
Size 111.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1497bf6a8b2bb2eeaf01cc80776fc88fb0db18aeb0f8838a48054b7ec4dcd75c
BLAKE2b-256 checksum
How to use checksums
069b7f1380adb209b81c1d725a6f9b187a2284222d6d4295a99532bb03194702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for opensesame-plugin-parallel-port-trigger 5.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page