--- /dev/null
+/* Humusoft data acquisition library.\r
+ * Example that shows reading of digital input channels\r
+ * using the function to read a single channel.\r
+ */\r
+\r
+/* Copyright 2002-2007 Humusoft s.r.o. */\r
+\r
+#include <stdio.h>\r
+\r
+#include "hudaqlib.h"\r
+\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+ HUDAQHANDLE h;\r
+ unsigned value;\r
+\r
+ /* open a handle to the first MF624 device in the system */\r
+ h = HudaqOpenDevice("PCT7303B", 1, 0);\r
+ // h = HudaqOpenDevice("PCD7004", 1, 0);\r
+ if (h==0)\r
+ {\r
+ printf("\nData acquisition device not found.\n");\r
+ return(-1);\r
+ }\r
+\r
+ /* read whole digital channel at once */\r
+ value = HudaqDIRead(h,0);\r
+ printf("\nValue read from digital channel 0: %Xh ", value);\r
+\r
+ /* close the device handle */\r
+ HudaqCloseDevice(h);\r
+\r
+ return(0);\r
+}\r
+\r