Re: Fastest way to convert raw data to voltages

Hi!

Re the VERY large number: yes. If the value reaches the maximum value 
it's converted to NAN.

Re the most efficient way: look at the code-bit in the library. These 
are only a couple of lines code. It might get faster if you just do a 
copy and past into your code but I don't think it'll speed up much more. 
A faster way is probably if you stay with integer values and don't 
convert to floating point.

/Bernd

www:	http://www.berndporr.me.uk/
         http://www.linux-usb-daq.co.uk/
Mobile:	+44 (0)7769 506746
Work:	+44 (0)141 330 5237
         University of Glasgow
         Department of Electronics & Electrical Engineering
         Room 519, Rankine Building, Oakfield Avenue,
         Glasgow, G12 8LT


weeliat ong wrote:
> Dear All,
>  
> I have an array of 2 by 100 raw data to convert to its corresponding 
> voltages.   I am currently running a while loop to convert element by 
> element using comedi_to_phys() function.  Is there a faster way?  I may 
> need to convert all these data within 1 ms.
>  
> Another problem is that sometimes the comedi_to_phys() function returned 
> a VERY large positive double number.   Is this an out-of-range 
> behaviour? Anyway to do a check on it?  I am very tempted to write my 
> own coversion routine but afraid that it might not be as efficient as 
> the existing one.
>  
> Thanks
>  
> wee liat
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Express yourself with Y! Messenger! Free. Download now 
> <http://us.rd.yahoo.com/mail_us/taglines/msgr/evt=26089/*http://messenger.yahoo.com>. 
> 

Received on 2004-10-18Z21:32:05