Re: instruction list problem

On 17/08/2007 15:50, Dimitris Xydas wrote:
> Yes, I've just being trying that! Thx for the note on
> data[0], that was really puzzling me. I tried making
> an instruction list with a few instructions that would
> output only data[0], but it  didn't seem to vary the
> output, even if a INSN_WAIT instruction was in between
> the 2-3 writes. Also I tried the for loop this morning
> and it worked with having a usleep(1) command, but the
> output wave wasn't very reliable. Does anyone have any
> references on how to pace the output? For example:
> 
> int h, flag;
> for (h=1; h<100; h++)
> {
> flag =
> comedi_data_write(cf,subdev,chan,range,aref,h*10);
> //if (flag==1) printf("Write successful!\n");
> usleep(1);
> }*/
> 
> doesn't seem to produce a very reliable sawtooth!!

You need to use comedi_command.  Have a look at ao_waveform.c in 
comedilib's "demo" subdirectory.

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2007-08-20Z08:41:37