1 /* Humusoft data acquisition library.
\r
2 * Example that shows reading of digital input channels
\r
3 * using the function to read a single channel.
\r
6 /* Copyright 2002-2007 Humusoft s.r.o. */
\r
10 #include "hudaqlib.h"
\r
13 int main(int argc, char* argv[])
\r
18 /* open a handle to the first MF624 device in the system */
\r
19 h = HudaqOpenDevice("PCT7303B", 1, 0);
\r
20 // h = HudaqOpenDevice("PCD7004", 1, 0);
\r
23 printf("\nData acquisition device not found.\n");
\r
27 /* read whole digital channel at once */
\r
28 value = HudaqDIRead(h,0);
\r
29 printf("\nValue read from digital channel 0: %Xh ", value);
\r
31 /* close the device handle */
\r
32 HudaqCloseDevice(h);
\r