- From: Bernd Porr <bp1_at_cn.stir.ac.uk>
- Date: Sun, 18 May 2003 16:19:58 +0100
Hi!
you have to issue only _one_ command with TRIG_NONE for the stop_src
argument:
comedi_cmd *cmd=new comedi_cmd;
int r = comedi_get_cmd_generic_timed(dev,
subdevice,
cmd,
(int)(1e9/1000));
if(r<0){
printf("comedi_get_cmd_generic_timed failed\n");
exit(-1);
}
/* Modify parts of the command */
cmd->chanlist = chanlist;
cmd->chanlist_len = n_chan;
cmd->scan_end_arg = n_chan;
cmd->stop_src=TRIG_NONE;
cmd->stop_arg=0;
:
After you've issued the command you can do read-commands until you
cancel the aquisition.
/Bernd
Cheng-Ling Kuo wrote:
>Hi,
>
> I want to use comedi for synchronous acquisition.
> To do an acquisition at 8 khz freq, record data into a file on linux every day.
> Could you tell me any example or suggestions?
>
> I tried the function "comedi_command", but it seem asynchronous.
> It losts data between two "comedi_command"s.
>
> The document says that comedi_do_insn is synchronous. But how to do it?
>
> Thanks a lot!
>
>Best regards,
>
>Cheng-Ling Kuo
>
>Tel:+886-6-2757575-65276
>Fax:+886-6-2096035
>
>Assistant Engineer
>Science Data Distribution Center
>ISUAL Project, The Scientific Payload of ROCSAT-2
>Department of Physics
>National Cheng Kung University
>(http://www.phys.ncku.edu.tw)
>
>_______________________________________________
>comedi mailing list
>comedi_at_comedi.org
>https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
>
>
--
http://www.cn.stir.ac.uk/~bp1/
mailto:bp1_at_cn.stir.ac.uk
Received on 2003-05-18Z14:19:58