1 /* Humusoft data acquisition library.
\r
2 * Example that shows reading of analog input channels
\r
3 * using the function to read a single channel.
\r
6 /* Copyright 2002-2006 Humusoft s.r.o. */
\r
10 #include "hudaqlib.h"
\r
13 int main(int argc, char* argv[])
\r
19 /* open a handle to the first MF624 device in the system */
\r
20 h = HudaqOpenDevice("MF624", 1, 0);
\r
23 printf("\nData acquisition device not found.\n");
\r
27 /* read all the 8 analog inputs in a loop, print their values */
\r
30 value = HudaqAIRead(h,i);
\r
31 printf("Analog channel %d, value read %fV.\n", i, value);
\r
34 /* close the device handle */
\r
35 HudaqCloseDevice(h);
\r