Hi ajmal,
I tried opening up the code that you sent, but there is a whole lot of
information and different files in there and I was unsure as to what
piece of code I should even look at.
First I would recommend taking a look at some of the continuous acquisition examples found here:
C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ai
See if you can get those examples to work correctly, if so then you
should be using the code properly. If you want a flag to be
thrown every minute then it's simply a matter of knowing the number of
samples being read, the rate, and the number of iterations it will take
to get to one minute's worth of data.
If you can get the examples to work and you can get a flag to work with
the above method, but are still having problems with your code, then
please try to break it down to the simplest example possible involving
only one file, a simple continuous read and simple flag thrower.
Another thing to keep in mind is that your code is using the
Traditional DAQ calls. You should definitely take a look at some
of the DAQmx examples as they are a lot easier to understand and use:
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In
Regards,