Test and Measurement Forum


Forum for discussing PicoLog


Postby erica » Mon Jun 09, 2003 1:59 pm


I have a ADC11/12 data logger and I am using C program to control it.

How do I increase the precision of the VALUES i get from using the function get_times_and_values? Currently I print out 4 figures e.g. 1250 corresponding to 1.25 V but I would like 1250324 corresponding to 1.250324

I have tried changing the data type in the declaration in the header file from unsigned int to double but doesn't seem to work.


e :)

Postby markspencer » Tue Jun 10, 2003 10:37 am


The values that are returnes by the function adc11_get_times_and_values are a time in microticks (time parameter) and the ADC count (value parameter). The ADC count has to be converted into a voltage. If you are using a version 2 or version 3 unit (this can be found out by using the function adc_get_unit_info) the conversion formulea is as follows:


where 2.5 is the maximum voltage measurable. 4095 is the highest ADC count available and A is the measured ADC count. To use this formulea you will get floating point or double precision depending on your variable types.

Best regards,

Mark Spencer
User avatar
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Return to PicoLog

Who is online

Users browsing this forum: No registered users and 0 guests