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

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.0
File Size Uploaded
opensesame_plugin_parallel_port_trigger-5.0.0.tar.gz 108.9 kB Details

Built distribution (wheel)

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

Total release size: 220.0 kB

Release files / opensesame_plugin_parallel_port_trigger-5.0.0.tar.gz

Download URL opensesame_plugin_parallel_port_trigger-5.0.0.tar.gz
Size 108.9 kB
Tags Source
SHA-256 checksum
How to use checksums
464a11e6db92047cd727a4b59f73eb0f28dbf9e2f9bc2f55626cd34d73933db5
BLAKE2b-256 checksum
How to use checksums
b28b4b3687571fd6343ed29e11be1b06c6b6e72a5cf0ee50c3959be8af4f8a8f
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.0-py3-none-any.whl

Download URL opensesame_plugin_parallel_port_trigger-5.0.0-py3-none-any.whl
Size 111.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c2e0ec6268bc36b67ff6361e2ead2f76494a5bd7d90af069a8549009452d2f6
BLAKE2b-256 checksum
How to use checksums
331b61ca4cb82cc18bdce26336dc64c890b504cf50ce567dc82fe0679a93d895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.3.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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