Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

DAQ Event messaging in C++

I am about to develop a data acquisition application using PCI-3071E
and Microsoft Visual C++. Are there any sample code demonstrating
adding message events to the Window messaging queue. Most of the code
examples that I have found on the website show inline coding.

0 Kudos
Message 1 of 2
Hello John,

if you want to use asynchrone events, you must use the function Config_DAQ_Event_Message. You can receive events on window port or callback function.

I send you a small programm that I have made to demonstrate a bug under NI-DAQ 6.9.1 with Config_DAQ_Event_Message (bug is with external scan clock and multiple of x scan events, normally you never see it) and can be use with every DAQ-STC card.

Search in the code the first Config_DAQ_Event_Message and the comment //not used handle. In your application, change it to your window handle (change WM_USER to what you want) and in your window messaging queue, add ON_MESSAGE(WM_USER, OnDAQEvent) with afx_msg LRESULT YourWindow::OnDAQEvent(WPARAM w, LPARAM l).

See Config_DAQ_Event_Message for sig
nification of w, l parameters.

Hope this will help,
0 Kudos
Message 2 of 2