[visionegg] Re: Interfacing visionegg and LabView

  • From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Tue, 12 Aug 2003 19:06:26 +0200

Hi Markus,

The LabView demo works with demo/tcp/gratingTCP.py, if I recall correctly. This is a totally different program and the ephys_server and ephys_gui pair. The LabView program and the gratingTCP demo use raw TCP/IP with a simple string format to control parameters, etc.

The ephys_server / ephys_gui pair use Pyro ("Python Remote Objects") as a layer above TCP/IP to *vastly* simplify connection of two programs. Unfortunately for your case, this requires that both programs have access to a Python interpreter.

The ephys_server / ephys_gui concept is inherently more powerful and more tested (although I recommend getting the "bleeding edge" release if you play around with it much -- there have been some significant bug fixes in that code).

In theory, if you want to use the ephys_server and communicate from LabView, you could embed Python in LabView, assuming one can extend LabView with C programs. You would write a C/LabView module which embeds a Python interpreter according to the standard Python documentation "Extending and Embedding".

We use a small extension to the EPhysGUI which implements a very simple raw TCP connection to our data acquisition program. (This is in addition to the Pyro/TCP connection that EPhysGUI makes to EPhysServer. Also, EPhysGUI and the data acquisition program actually run on the same computer, although because we're using TCP, this is not necessary.) The TCP connection simply coordinates the onset and duration of trials, with final synchronization between the data acquisition program and ephys_server implemented via a hardware trigger between those two computers. The data acquisition program could then be implemented in anything that speaks TCP and would require only a minimum of TCP programming or other modification. Although our data acquisition program is written in Python, the original concept was that it would be written in Matlab using the data acquisition toolbox. Let me know if you need help going down this path.

Cheers!
Andrew

On Tuesday, Aug 12, 2003, at 16:07 Europe/Berlin, Markus Bongard wrote:

gentle persons,

actually we're trying to interface to computers - one running labview 6.1, the other python/visionegg (connected via ethernet hub) - like in the example given in the contributions part of the visionegg webpage (http://www.visionegg.org/labview.html). To see how it works, we're simply using the Labview-Source (*.vi) and try to connect to the EPhysServer running on the second machine. (Addionally we like to integrate the control of visionegg in our labview-based data acquisition system, which is why we started with the labview sources.)

While this works perfectly with the given python example (ephys_server.py & ephys_gui.pyi) - while using the the labview enviroment gives 2 errors: One is "error 63 labview: the port serial port received too much data for its buffer. The connection is refused by the server" or "Error 1: wrong parameter in grating control". At this point we are more or less stuck. Any hints/advices/suggestion are highly welcome.

cheers,
                Markus


------------------------------------------- Markus Bongard Universidad Miguel Hernandez Dept. Histologia y Anatomia Campus San Juan Aptdo. de Correos 18 E-03550 San Juan de Alicante SPAIN ------------------------------------------- markus.bongard@xxxxxx visit us at http://cortivis.umh.es -------------------------------------------


====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

Other related posts: