ADC-100 and LabView: Negative ADC count output

Post general discussions on using our drivers to write your own software here
Post Reply

ADC-100 and LabView: Negative ADC count output

Post by Angela » Thu Jun 17, 2004 2:55 pm

Dear Forum,

I have been successfully using an ADC-100 with LabView to record 2 channels of data. The original set up meant that max. voltage input to the ADC was just over 1/2 full scale for ±20V i.e was 10.5V and everything was fine.

However to improve the system it has been adjusted so that the max. voltage input is now full scale for ±10V i.e 10V. This started to give some very strange results.

Investigation has shown that as the input voltage is increased the ADC count increases from 2040 (0V) to 3276.5 as expected but then it becomes -3276.5 and continues to increase (i.e. get closer to zero) at the correct scale for the input.

Using Picolog with the same set up the outputs are fine.

Any suggestions?


User avatar
Advanced User
Advanced User
Posts: 71
Joined: Wed May 07, 2003 9:43 am

Post by ricardo » Thu Jun 17, 2004 3:45 pm

Hi Angela,

What data type are you using to store the ADC counts?

Ricardo Paloschi
Sales Engineer
Forum Moderator


Post by Angela » Fri Jun 18, 2004 8:20 am

Hi Ric,

The output from "get_times_and_values" is an I16 (16 bit integer) array, that is summed becoming a I16 value, which is divided by no of samples which is long integer (32 bit) the result being stored in data type double (64 bit).



Post by Angela » Fri Jun 18, 2004 9:18 am


Thanks for pointing me in the correct direction. I had thought that I was using the output buffer values directly from the "get_....." and had forgotten that I was taking an average. A bit of a closer look and it was obvious that summing the output buffer values meant that the result was too big for the default I16 data type. A conversion to I32 before summation and it works fine.

Sorry to bother you with what turned out to be my bad programming :oops: !



Posts: 4
Joined: Mon Nov 29, 2004 3:44 am
Location: International Grammar School

Using labview

Post by stuarts » Mon Nov 29, 2004 4:00 am

Dear Angela,

I want to do the same thing with an ADC-12 but I'm having trouble with the function calls can you help?. Better still send me a copy of your vi so I can adapt if possible.


Stuarts :o

Post Reply