Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I monitor the DAQ progress using NI-DAQmx functions ?

Hi !

I am trying to convert my VB6 - NI-DAQ project to the NI-DAQmx platform, using the DAQmx ANSI C wrapper.

I was used to do continuous AI measurements, using the double buffer technique, with the following NI-DAQ functions:
    DAQ_DB_Config
    SCAN_Setup
    SCAN_Start
    Loop(
        While not DB_HalfReady (
            DAQ_Monitor
            Display some results
        )
        DAQ_DB_Transfer
    )

My question is: Is there an equivalent function of "DAQ_Monitor" within the NI-DAQmx ?
or,
Which NI-DAQmx functions should I use, to continuously display my AI signals while acquiring them, for non-stop data acquisitions ?

0 Kudos
Message 1 of 3
(6,930 Views)
Hi dfousek-
 
Double buffering is performed implicitly by the NI-DAQmx driver, so an analog to the DAQ_Monitor function is not required.  Any of the continuous acquire examples for NI-DAQmx for ANSI C will show how to perform a continuous acquisition into a buffer while concurrently reading from the same. 
 
These examples are available in " C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage "  In particular, the "Cont Acq-Int Clk" example shows the most effective method to acquire continuously using the internal clock and read from the buffer periodically by monitoring for DAQmx Events.
 
Hopefully this helps-
Tom W
National Instruments
0 Kudos
Message 2 of 3
(6,915 Views)
Hi Tom W !

The example you are mentionning does not satisfy me, since it concern a continuous data acquisition, using events for reading the buffer.
Of course, if I had to write my program from scratch, this is the way i would go. But I already have a big program (+5000 lines of VB code) and in order to shift  fast  from the traditional DAQ to DAQmx, I just need the equivalent routine of DAQ_Monitor.

The DAQ_Monitor() function reads a certain portion of the buffer without transfering the data. My application is based on huge-buffer readings  (every 10min), because it processes the previous buffer and in the same time (during these 10min) it displays the on-line data on the screen.

So, is there such a function (or a technique) to achieve this in DAQmx ?

Dimitri
0 Kudos
Message 3 of 3
(6,807 Views)