Q: Blocked Digital I/O on Ni PCI DIO32HS

Hi
I have a Ni PCI DIO32HS card which is used to aquire digital data in terms 
of 16Bit word. The bits of one data word are sent in parallel using the 
channels A0-B7. At the same time channel D7 high is used to signal the 
sender of the data, that he has to send the data. While D7 low means data 
is of no interest and therefor can be sent to "/dev/null" instead.
So my question is:
Which is the best way to aquire a certain amount of the incomming data 
samples in one go.

Should I read eg 2048 samples synchronously using comedi_do_insn or 
comedi_do_insn_list which will read all the samples requested.
But what if not all samples requested are available? Dos insn block or 
return with less samples? Ho do i determine if the requested number of 
samples is available and that synchronous read of 2048 samples suceeds.

Should i use comedi_cmd to asynchronously read the datablocks? Does command 
wait until the desired number of samples is available or return 
immediatly? Is comedi_cmd capable of dowing bitset read of multible 
channels in parallel on DIO32HS or not?

Should i use comedi_dio_bitfield and do busy looping over dio device in 
order to aquire the requested samples properly. And cast 32bitfield to 
array of two 16Bit bitfields and reading the lower word and discarding the 
rest ?

Is it usefull to do this block DIO in userspace or schould it be done in 
kernel space?

Hope that sombody, can hint me to some realistic solution,

cu
Christoph 

-- 
Dipl.-Ing. Christoph Hintermüller
University for Health Informatics and Technology Tyrol
Innrain 98, A-6020 Innsbruck, AUSTRIA
Tel:  +43/ 512/ 58 67 34/ 820; Fax: +43/ 512/ 58 67 34/ 850
Mail: christoph.hintermueller_at_umit.at; Hompage: http://imsb.umit.at

Received on 2003-05-22Z14:03:41