1 /* Humusoft data acquisition library.
\r
3 * Example that shows decoding IRC position
\r
4 * using the function to read a single encoder.
\r
7 /* Copyright 2002-2006 Humusoft s.r.o. */
\r
11 #include "hudaqlib.h"
\r
14 int main(int argc, char* argv[])
\r
20 /* open a handle to the first MF624 device in the system */
\r
21 h = HudaqOpenDevice("MF624", 1, 0);
\r
24 printf("\nData acquisition device not found.\n");
\r
28 printf("Counting external IRC pulses by encoders, press Enter to continue.\n");
\r
31 /* Read all the 4 encoder values in a loop, print them. */
\r
34 value = HudaqEncRead(h,i);
\r
35 printf("Encoder channel %d, value read %d.\n", i, value);
\r
38 /* Close the device handle. */
\r
39 HudaqCloseDevice(h);
\r