- From: Yoshiya Matsuzaka <matsuzay_at_mail.tains.tohoku.ac.jp>
- Date: Fri, 15 Jun 2007 16:59:24 +0900
Hi Marco,
I am studying neurophysiology, too, and am developing an acquisition
system for multichannel recording . Currently, there are several
commercial multichannel recording systems in the market (e.g. Plexon,
NeuraLynx), but they are terribly expensive (perhaps cost more than a
Benz). So I decided to develop one on my own using a relatively
inexpensive DAQ board.
Regarding your question No.1, I found it easy.
comedi_cmd c, *cmd = &c;
cmd->start_src = TRIG_NOW;
cmd->start_arg = 0;
cmd->scan_begin_src = TRIG_TIMER;
cmd->scan_begin_arg = 0;
cmd->convert_src = TRIG_TIMER;
cmd->convert_arg = 0;
cmd->scan_end_src = TRIG_COUNT;
cmd->scan_end_arg = N_CHANS;
cmd->stop_src = TRIG_NONE;
cmd->stop_arg = 0;
Then call, comedi_command_test for 3 times in a row. Then, the COMEDI
library sets the field convert_arg so that the board collects the data
at its maximum sampling frequency (I tested this technique only for NI's
PCI-6071E, though). The real challenge is how to save the data to the
disk. I read the data in kernel space under RTAI, send it over RT-FIFO,
and let a user space program save it. This is much faster than reading
the data by read(comedi_fileno(comedi_t*), char*, size_t) in user space
(in my box, the latter method causes the board's FIFO overflow when the
sampling frequency exceeds 400kHz while the former allows sampling at
1.25MHz).
For question No.2, I haven't tested analogue output yet unfortunately.
By the way, what software are you adapting for neuronal recording? RT-Lab?
Yoshiya Matsuzaka
Marco Hackenberg wrote:
> Hi,
>
> I am adapting a software for neuronal recordings to comedi in order to
> obtain universal support for any kind of DAQ board.
> There are two open questions to me:
>
> 1. Is there any possibility within comedilib to get the maximum
> scan/sampling rate supported by a board for asynchronous analog
> acquisition ?
>
> 2. For my NI-E card, external reference for analog output is supported
> by comedi via the actually not existing range indices 3 & 4.
> Is this the general strategy for all comedi-drivers to support
> external reference?
> Can I somehow find out generically which output ranges are reserved by
> the current driver for external reference?
>
> Thanks in advance for your help!
>
> Greets,
> Marco
>
> _______________________________________________
> comedi mailing list
> comedi_at_comedi.org
> https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
>
--
----------------------------------------------------
Yoshiya Matsuzaka
Dept. of Physiol., Graduate School of Medical Science,
Tohoku Univ.
2-1 Seiryo machi, Aoba ward, Sendai 980-8575, JAPAN
Tel: +81-22-717-8073, Fax: +81-22-717-8077
----------------------------------------------------
Received on 2007-06-15Z06:59:24