1 /* Humusoft data acquisition library.
\r
2 * Example that shows writing to analog output channels
\r
3 * using the function to write 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
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 /* write all the 8 analog outputs in a loop */
\r
28 /* the voltage written to the output is computed as (channel number - 5) */
\r
32 HudaqAOWrite(h, i, value);
\r
33 printf("Analog output channel %d, value written %fV.\n", i, value);
\r
36 /* close the device handle */
\r
37 HudaqCloseDevice(h);
\r