- From: Calin A. Culianu <calin_at_ajvar.org>
- Date: Mon, 23 Jun 2003 12:35:54 -0400 (EDT)
I am very glad you ask this. I personally calculated it once based on the specifications of the board. Take the board's max sampling rate -- IIRC it's 120kS/s, and the inverse of that is the mux settling time. So in your case it's about 8 microseconds? No that doesn't sound right.. but try it anyway... (I might have the board's sampling rate wrong.. go look it up in the manual). Basically you should switch to the channel you want by issuing a comedi_data_read() on the new channel. Then you usleep() the required number of microseconds, then issue the real comedi_data_read() on the same channel. I think there is also a comedi_data_read_delayed() call in comedilib userspace (but in kernel you have to call comedi_data_read() twice). This seems to work fine, but I wasn't very rigorous about it and I could be wrong about how to calculate the settling time... Good luck! -Calin On 19 Jun 2003, Kenneth Jacker wrote: > What is the minimum time in between calls to comedi_data_read() each > specifying a different channel? Another way to ask the same question > is how quickly can the analog MUX on our MCC PCIDAS1602/16 accurately > switch between channels? > > Calling the function in a "tight loop" over all the channels appears > to give erroneous values ... > >
Received on 2003-06-23Z15:35:54