- From: Josh Keister <jkeister_at_gmail.com>
- Date: Thu, 19 Apr 2007 18:23:27 -0400
I'm interested in doing the same thing, but I haven't decided on what
hardware I should use yet.
Callback functions seem to be the suggested way to do simultaneous I/O[1].
I've only found one practical example[3] of callbacks actually being
used for this.
Has anyone else actually done this? What rates have you attained and
with what hardware?
From (realtime)comedi_examples.tar.gz [2]:
int callback(unsigned int i,void *arg)
{
rt_printk("who's yer daddy? %d\n",counter);
counter++;
return 0;
}
int init_module(void)
{
int ret;
printk("Comedi real-time example #1\n");
ret = comedi_open(dev);
printk("comedi_open: %d\n",ret);
ret = comedi_lock(dev,subd);
printk("comedi_lock: %d\n",ret);
comedi_register_callback(dev,subd,COMEDI_CB_EOS,callback,NULL);
do_cmd();
return 0;
}
[1] https://mail.comedi.org/pipermail/comedi/2001-May/001368.html
[2] ftp://stm.lbl.gov/pub/comedi/comedi_examples.tar.gz
[3] http://rtlab.org/rtlws02-rtlab-paper.ps
Kind regards,
Josh
On 4/19/07, Wyeth Bair <wyethb_at_hotmail.com> wrote:
> I am using comedi w/ an NI 6052E board, and would like to find out if
> I can do simultaneous analog input and output. Are there any example
> programs for this?
>
> Thanks,
> Wyeth
Received on 2007-04-19Z21:23:27