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 without a parallel port.
  • Verbose mode prints messages about what the items do.
  • Port address for Windows: hexadecimal, starting with 0x (0x378; Device Manager shows it as 0378), 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. macOS is not: pyparallel is only installed on Linux and needs the Linux parallel port driver (/dev/parportX); only dummy mode works there. 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.2

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.2
File Size Uploaded Provenance Actions
opensesame_plugin_parallel_port_trigger-5.0.2.tar.gz 109.4 kB Without provenance Details for opensesame_plugin_parallel_port_trigger-5.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 220.8 kB

Release files / opensesame_plugin_parallel_port_trigger-5.0.2.tar.gz

Download URL opensesame_plugin_parallel_port_trigger-5.0.2.tar.gz
Size 109.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b0700952214658ba566e1dd1375476a6683bd0c7077b2ad96cea228540d4f93b
BLAKE2b-256 checksum
How to use checksums
7e9b6180f57c61f74b84b8004114ebbbb4a2e2c2dd7ec1e846115e78290b46ee
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.2-py3-none-any.whl

Download URL opensesame_plugin_parallel_port_trigger-5.0.2-py3-none-any.whl
Size 111.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15dbaf00b7663a8ed3b9d16e320cc274d0e3007cf0063af06a98062d6cc0c7c5
BLAKE2b-256 checksum
How to use checksums
0ec15566ee8c3ae7703bc3a205cab0f35bb20caa9f4fe986c5448bd3cb9dc12e
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.2

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