Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

i am trying to write a double buffered data acquisition program using MFC and a callback function.

i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?
0 Kudos
Message 1 of 2
(3,026 Views)
What DAQ board are you using? When you installed NI-DAQ you should have selected to install the support files for VC++. Then there will be several examples on how to do double buffered data acquisition.

If you have already installed NI-DAQ 6.8 or higher and did not select to include the support files, you can run the NI-DAQ setup program and just add them. If you are using an older version, you will have to uninstall and reinstall.

Once you have the support files, follow this path to the examples.

>>Program Files>>National Instruments>>NI-DAQ>>Examaples>>Visual C>>

If you are doing digital acquistion, goto the di folder, if you are doing analog acquisition goto the ai folder.

As for the callback function, you can use the NI-DAQ function Config_DAQ_
Event_Message with DAQEvent Type = 1, where N would equal half your buffer.

Brian
0 Kudos
Message 2 of 2
(3,026 Views)