Howdy, Stranger!

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

Supported by

Trigger problem, but only when running experiment

Hi. I was able to send triggers from a parallel port on a Windows 7 x64 machine using the parallel library from psychopy or using ctypes windll.dlportio commands. However, these only work in the debug window/command line. When putting them in an inline script and running an experiment, no triggers are received by the BrainVision EEG system. Is there a difference in how the inline_script versus debug window is calling the driver/library?

Thanks!

Justin Fine, PhD.

Comments

  • Hi Justin Fine,

    That is strange. I though it's mostly the same. What code are you executing exactly?

    Best,
    Jarik

  • I created a simple code to try and figure out the problem
    Prepare phase:
    from ctypes import windll
    global io
    io=windll.dlportio

    port=0xB010

    Run phase:

    io.DlPortWritePortUchar(port, 255)
    clock.sleep(0.01)
    io.DlPortWritePortUchar(port, 0)
    clock.sleep(0.15)

    ---This above code does nothing, but gives no errors either--

    Running this code in the command line works perfectly fine, no issues.
    I cannot figure out why. Any help would be immensely appreciated. Should I try uninstalling everything python and dlportio drivers, and start from scratch?

  • clock.sleep(ms) takes milliseconds, so clock.sleep(0.01) seems really short to me. But this doesn't explain the difference between debug window and inline item...

    http://osdoc.cogsci.nl/3.1/manual/python/clock/

Sign In or Register to comment.