Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Problems with sending EEG triggers

edited February 2016 in OpenSesame

Hi all,

I'm trying to create an experiment to carry out an EEG study. For this purpose, I first used the parallel_port_trigger plug-in. When I ran the script on my laptop, without connecting to EEG material, nothing goes wrong. But when we connected computer (Windows 7) and EEG (ActiCap) for testing triggers, the experiment couldn't be run and the error message "pp is not found" appeared in the debug window. By the way, activing "dummy mode" allowed us to run the experiment but still not sent triggers.

So, we tried with an inline_code using dportio.dll. We followed the steps described in here : http://osdoc.cogsci.nl/devices/triggers/ for using dportio.dll and getting access to the parallel port. Again, the experiment couldn't be run, but a new error message appeared : "kb is not found".

I suppose that pp refers to parallel port and kb to keyboard but it doesn't help me to understand the source of this problem, and so I have troubles to solve it. Does anyone have encounter this and found a solution ?

Thank you !!

Lison

Comments

  • edited 1:34PM

    Hi Lison,
    In this case it also helps to post the stack trace that is output when your program crashes. This can be found in the debug window of OpenSesame en is a history modules that were called and at which lines of code. This way, we have a more accurate estimate of where in the program things went wrong. With the information you provide above, it could be anything!

    Buy Me A Coffee

  • edited 1:34PM

    Hi dschreij,
    Thank you for your answer. Here is the output found in the debug window when I used the parallel_port_trigger plug-in :

    In [1]: Starting experiment as ExperimentProcess-3

    FreeType import Failed: Freetype library not found
    openexp._canvas.psycho.init_display(): waitblanking = True
    openexp._canvas.psycho.init_display(): monitor = testMonitor
    openexp._canvas.psycho.init_display(): screen = 0
    openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 1024
    openexp.sampler._legacy.init_sound(): mixer already initialized, closing
    experiment.run(): experiment started at Tue Feb 16 16:11:00 2016
    Sending value 0 for 500 ms to the parallel port on address: 0x378

    Unexpected error

    item-stack: experiment[run].new_loop[run].new_sequence[run].new_parallel_port_trigger_1[run]

    exception message: kb not found
    time: Tue Feb 16 16:11:00 2016
    exception type: AttributeError

    Traceback:

    File "dist\libqtopensesame\misc\process.py", line 140, in run
    File "dist\libopensesame\experiment.py", line 390, in run
    File "dist\libopensesame\item_store.py", line 95, in execute
    File "dist\libopensesame\item_store.py", line 110, in run
    File "dist\libopensesame\sequence.py", line 50, in run
    File "dist\libopensesame\item_store.py", line 110, in run
    File "dist\libopensesame\loop.py", line 144, in run
    File "dist\libopensesame\item_store.py", line 95, in execute
    File "dist\libopensesame\item_store.py", line 110, in run
    File "dist\libopensesame\sequence.py", line 50, in run
    File "dist\libopensesame\item_store.py", line 110, in run
    File "C:\Program Files\OpenSesame\plugins\parallel_port_trigger\parallel_port_trigger.py", line 122, in run
    File "dist\libopensesame\item.py", line 280, in getattr
    AttributeError: kb not found

    And when I use the inline_code :

    In [1]: Starting experiment as ExperimentProcess-4

    FreeType import Failed: Freetype library not found
    openexp._canvas.psycho.init_display(): waitblanking = True
    openexp._canvas.psycho.init_display(): monitor = testMonitor
    openexp._canvas.psycho.init_display(): screen = 0
    openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 1024
    openexp.sampler._legacy.init_sound(): mixer already initialized, closing
    experiment.run(): experiment started at Tue Feb 16 16:12:51 2016
    experiment.run(): experiment finished at Tue Feb 16 16:12:57 2016
    done!

    In both cases, no trigger appeared in the Brain Recorder window, even if the experiment seemed to run normally when we used the inline_code. By the way, triggers worked with an E-Prime experiment with the same port address.

    Thanks a lot for your help !

  • edited 1:34PM

    If you check https://github.com/smathot/opensesame_plugin_parallel-port-trigger/blob/master/parallel_port_trigger/parallel_port_trigger.py at line 122 there is no instance of kb there that is incorrectly called, but I see kb being referenced at line 146. Given this discrepancy, I am wondering if you are using the latest version of the parallel port plugins or maybe still have an older one. Have you tried updating them with latest repository snapshot from https://github.com/smathot/opensesame_plugin_parallel-port-trigger/ Do that first and see if it helps. If not, we can look on.

    Buy Me A Coffee

  • edited 1:34PM

    Thank you for your answer. We didn't found out how to make it work with the parallel port plug-in, even if we changed the parallel port plug-in version.
    The engineer of my lab found out a solution using the dportio.dll as it was described on OpenSesame tutorial, but this needed some modifications in the Brain Recorder system, and did not depend on Opensesame.
    In any case, thanks for your help !

Sign In or Register to comment.