1 /* Humusoft data acquisition library.
\r
3 * Example that shows reading of counters and counting pulses.
\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 /* Do reset of counters. Each counter is switched to counting mode
\r
28 after its first usage. */
\r
34 printf("Counting external pulses by counters, press Enter to continue.\n", i, value);
\r
37 /* read all the 4 counters in a loop, print their values */
\r
40 value = HudaqCtrRead(h,i);
\r
41 printf("Counter channel %d, value read %d.\n", i, value);
\r
44 /* close the device handle */
\r
45 HudaqCloseDevice(h);
\r