[visionegg] Re: parallel port trigger with Ephys-Server/Gui

Markus Bongard wrote:

gentle persons,

I try to use the parallel port triggering with in the ephys-server modules. While this works pretty nice with "stand alone"-modules/programs (flashing rectangles, bars, gratings , whatever), I have some problems implementing it with in the modules. From the examples the inclusion of

Hi Markus,

This seems like a generally useful option for ephys_server -- I'll put it on my to-do list. In the meantime, I'm not sure why your method isn't working -- it should with a little tweaking, particularly since it works in stand-alone scripts.

import VisionEgg.Daq
from VisionEgg.DaqLPT import *


within the header and the creation of a trigger output controller

trigger_out_controller = LPTTriggerOutController()

and finally adding this trigger output controller to the presentation's list of controllers

p.add_controller(None,None,trigger_out_controller)

One potential issue is that ephys_server is written so there is only one instance of Presentation -- so, if you take FlatGratingServer.py as an example, you'll see that the instance of Presentation gets passed as a parameter when "FlatGratingExperimentMetaController" is created. You should be adding the controller to this instance of Presentation. Are you doing this?

Also, to play nicely the __del__ method of your equivalent of FlatGratingExperimentMetaController should clean up any controllers it added. You'll have to keep a reference to your controller (e.g. "self.my_lpt_controller") and then call something like "self.p.remove_controller(None,None,self.my_lpt_controller)

seems to do this. If I do the same within a module for the server it doens't work. Any hints/Suggestions are welcome.

Another technique in the ephys_server/gui paradigm is to have a single controller that gets called every frame and essentially just does everything itself. Then you could simply directly update the LPT port. See the docstrings at the top of DaqLPT.py if you need an example.

Additionally I like to ask, wether anyoe from this mailinglist sucessfully uses visionegg under MacOS X 10.3.x together with the latest Tcl/Tk 8.4.4 ?

I haven't used Mac OS 10.3 yet, and I'm not sure what my version of Tkinter 8.4.x is... Do you have a specific problem? The MacPython list is generally pretty helpful.

Cheers!
Andrew

Other related posts: