Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

vc APPLICATION FOR BASIC ANALOG DATA AQUSITION

I am working on an application that perform a basic analog data aquisition from one analog channel of a PIC-DAQ device.

As a starting point I am using examples that comes with my DAQ-software.

See attachment for the Example program: DAQdoubleBuf.c

I am trying to output the data on the screen. i only get 0.0000V.
see Line 173:

printf(" The voltage at AI channel is %lf volts.\n", piHalfBuffer[5]);



of the attached source file,( I wrote this line myself) I am trying to output to the screen the data inside the buffer so as can study it and later add graphing components.

Please show me how to access the data by outputing to the screen and how to pass it into a graphing funtion.

Kinds regards
Ev
ans
0 Kudos
Message 1 of 2
(2,440 Views)
Evans,

You will need to use the function DAQ_VScale() to translate your array of unscaled data, acquired during your acquisition operation, into an array of scaled data representing voltages. Here is a section of code, which could be used to output the first two points in the current half buffer to the screen:

DAQ_VScale (1, 1, 1, 1.0, 0.0, 500, piHalfBuffer, voltageData);
printf(" First two points in current half buffer %f %f\n", voltageData[0], voltageData[1]);

The graphing functions available to you will depend upon the environment in which you are programming. Most graphing functions will have inputs for the data array and the deltaX (1/Sampling Rate).

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 2
(2,440 Views)