Howdy, Stranger!

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

Supported by

Parallel port not found: Error 126: no module found

Hi OS team,

i encounter a similar problem as in the post of Luigi.

I used the python script (without using the plugin).

I did not find a dlportio.dll file under C:Programme x86/OpenSesame

However, i found similar files:

two pyc files with the name _dlportio.pyc

and two py files with the name _dlportio.py

@sebastiaan In the old discussion, you have put a link of how to install the dlportio.dll However, the link does not work anymore. 🤔

PS: Every summer I come up with all those questions 🤗 🤩

Comments

  • I found the new link: https://osdoc.cogsci.nl/2.8.3/devices/triggers/

    With this, i managed to install dlportio.dll

    I now do not get error messages any more. But the triggers are not shown either. 😦

    Do you have an example experiment? Just to check whether i have put the 'trigger change' correctly.

  • Hi Stephan,

    I have not used the parallel port plugin, but if you want to see an example of an experiment (using EEG) that sets up a parallel port connection and successfully sends triggers, you can check out my expeirment on osf: https://osf.io/msk89/


    Eduard

  • Hi Eduard,

    thx for sharing this experiment.

    As always things to not work on the first try: With psycho backend (set by default) i got the error message: 'unable to share contexts'.

    Hence, i tried other backends. In legacy i got the error message 'color' not defined. So i changed that to 'colors' which was defined earlier. Now the experiment worked with legacy (although some initial instructions might have been missing, by try and error i found out that i have to press the m key.).

    I also checked the port number to '0378' which i found in the device manager under resources to be my parallel port.

    Unfortunately, the triggers did not appear in the recorder. Is there something else i have to adapt?

    Does it have to do with the error message in psycho backend? Does sending of triggers depend on the backend?

  • Hi,

    That sucks. It was run with 3.2.4 and psychopy backend on a windows ( i think 7?) machine, and yeah, it worked like that. One of these days, I'll try to give more complete info on the experiment on osf, and maybe include a link to the correct version of Opensesame.

    With respect to the triggers, I don't know why they wouldn't appear. The backend shouldn't matter. You use Brainvision, right? I'm not sure why it should matter, but I used BioSemi and its visualizer. There I could always see the triggers. My current guess would be that there is some setting in Brainvision that you need to find and fix to make it work, but that is completely fishing in the dark. Sorry :(

    Eduard

  • Hi,

    in the mean time, i made a few more tries.

    I used the windows test mode which did not help.

    I used the old OS version 3.0.7 which looks pretty oldschool and did not help either.

    I tried both Test mode and Old Version with direct parallel port and the USB adapter (virtual serial port).

    I tried different types of code including eduard's example experiment.

    The strange thing is that the code includes code that should tell me if the the connection to the parallel port cannot be set or whether the triggers could not be send (as suggested by the manual with try and except). I do not get these messages in the output and the experiment finished successfully. Hence, the system believes that the triggers were sent (and maybe they were!) but they do not appear in the Recorder (BrainVision).

    People from BrainVision tell me to check whether the trigger pulse width is set according to the sampling rate. How do i check for this?

  • Hey Dahm,

    In response to your last question, they refer to this table:

    Debugging LPT/TTL connections can be quite tricky. I am a bit out of my debt here as I've only used the triggerbox, but don't parallel ports lack a loopback test? (Which would explain why you don't get an error messages). It should be possible to verify that data is being sent with a multimeter. From there, you can test the steps on the receiving end (i.e. are they encoded like BVR expects?)

  • To increase my chances to see the triggers, I have already set the sampling rate in the Recorder to 10000 Hz.

    The length of the trigger signal is something i have to set in OS right? How do i do that? In the codes it mostly looks like i decide when to send a trigger, but not for how long. If i understood correctly, the trigger length is until the next trigger is send. But i may be wrong about this.

    If i disconnect the parallel port, i do get the error messages. ;)

    How do i know how the triggers are encoded in OS?

  • Finally, i managed to see the triggers. This code worked for me sending 2 triggers (1 and 9)


    test_stim=canvas()
    test_stim.text('test stim')
    test_stim.show()
    clock.sleep(1000)
    
    try: 
    	from ctypes import windll
    	global io
    	print 'the path is %s' % exp.experiment_path
    	io = windll.LoadLibrary(str(exp.experiment_path)+'/inpout32.dll')
    	print 'port has been read'
    except:
    	print 'The parallel port couldnt be opened'
    #io = windll.LoadLibrary(str(exp.experiment_path)+'/inpout32.dll') #if you want to see error messages that are not shown in try
    
    trigger = 0
    port= 0x378
    try:
    	io.DlPortWritePortUchar(port, trigger)
    	print 'trigger 0 sent'
    except:
    	print 'failed to send trigger!'
    
    clock.sleep(200)	
    
    trigger = 1
    try:
    	io.DlPortWritePortUchar(port, trigger)
    	print 'trigger 1 sent'
    except:
    	print 'failed to send trigger!'
    
    clock.sleep(500)	
    trigger = 9
    io.DlPortWritePortUchar(port, trigger)
    
Sign In or Register to comment.