How to do repeated acquisitions with the command-structure ?

Hi folks,

I'm using the command structure to aquire data from an analog input with
a pc104-das16jr/16 card.
If I open the comedi, send the command, read the data and close comedi
afterwards I can repeat this procedure as many times I want.

Now I tried to avoid the opening and closing procedure every time again,
building a structure like
(1)Comedi_open
(2)Comedi_command
(3)Read from /dev/comedi0
(4)continue with (2)
...
(n)Comedi_close

Unfortunately, this does not work. The first round is no problem but at
position (4), the second time to send a new comedi_command, I get an
error from the COMEDI_CMD-IOCTL(). 
What do I have to do to bring the interface back to a state where it
accepts new commands to execute? I tried comedi_cancel without success -
it only seems to be intended to cancel an infinite acquisition !??

What is the intended way to do such repeated acquisitions with the
comedi_command()?

Thanks in advance for your help.

Jan 

Received on 2003-11-24Z15:05:48