Input/output via parallel port in linux

Hi Mario and Listers,

I was wondering if there is any update on sending and receiving TTL triggers via the parallel port in Linux (using IOPort?)? I have tried ParportTTL to send triggers by following the instructions here  but I get the following:

WARNING: Empty receive from parallelPortServer - Timed out?!?
WARNING: Unable to get acknowledge for command within timeout interval! (count = 0)
WARNING: Roundtrip time 29.208899 msecs for TTL trigger exceeds 5 msecs

I think that ParportTTL can't be used to receive triggers, right? But sending triggers is (for me at least) more important that receiving triggers so getting ParportTTL to work would be sufficient in the meantime.

Thanks in advance,

Keith

here's some alpha-quality code. sending and receiving should both work and be very fast (way under 1ms).

http://code.google.com/p/ratrix/source/browse/classes/util/parallelPort/pp.m
http://code.google.com/p/ratrix/source/browse/classes/util/parallelPort/ppMex.c

feedback/testing desired! you need to compile the mex file, read the doc, run matlab as root, etc...
-e

--- In psychtoolbox@yahoogroups.com, "kiisudankan" <keithjduncan@...> wrote:
>
> Hi Mario and Listers,
>
> I was wondering if there is any update on sending and receiving TTL
> triggers via the parallel port in Linux (using IOPort?)? I have tried
> ParportTTL to send triggers by following the instructions here
> <http://tech.groups.yahoo.com/group/psychtoolbox/message/11961> but I
> get the following:
>
> WARNING: Empty receive from parallelPortServer - Timed out?!?
> WARNING: Unable to get acknowledge for command within timeout interval!
> (count = 0)
> WARNING: Roundtrip time 29.208899 msecs for TTL trigger exceeds 5 msecs
>
> I think that ParportTTL can't be used to receive triggers, right? But
> sending triggers is (for me at least) more important that receiving
> triggers so getting ParportTTL to work would be sufficient in the
> meantime.
>
> Thanks in advance,
>
> Keith
>
Am 21.05.2012 um 22:15 schrieb Erik:

> i think octave understands mex files, right? then this should work for octave too... though it looks like some slight modifications to use oct would improve performance...
> http://www.gnu.org/software/octave/doc/interpreter/Mex_002dFiles.html

I think mex-files work, but I've never tried it myself, since I see Octave primarily as Octave, and not Matlab without a price tag ...

So if your code works on both platforms, then all the better!

Alex

--
Dr. Alexander Klein, Diplom-Mathematiker
Physiologisches Institut der JLU-Gießen
Aulweg 129
35392 Gießen

http://www.med.uni-giessen.de/physio/