LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

labwindows DAQ event 2

I am designing a large channel count DAQ system using Labwindows, Mio and digital pxi boards. I would like more information on using daq event 2 to respond to errors. After I get this event callback, can I query the pxi board for details of what error occured? Does the pxi board always stop acquiring after this event? Any additional info you can provide would be appreciated.
0 Kudos
Message 1 of 4
(3,110 Views)
The prototype of the event callback function is as follows:

void myCallback (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)

The error, if one occurs, will be sent to this callback function. You will not have to query your pxi board.

Additionally, using DAQ event 2 will generate an interrupt upon a completed operation or the occurrence of an error. The acquisition on the PXI board will stop after receiving this event.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,110 Views)
Can I determine if the event occured because of an error or completion? My application is continous data acq using half buffer transfer method. During configuration I am required to input a total number of points to be collected. However this is not applicable to me, what should I put in? I get errors when I execute the half buffer transfer command. Are these errors the same ones I should expect from daq event 2? If I use daq event 2, will it prevent me from getting errors from executation of daq commands?
0 Kudos
Message 3 of 4
(3,110 Views)
If an error has not occurred, then the "message" parameter of the callback function will be 0. After you make a call to Config_DAQ_Event_Message to turn DAQ event 2 on, you will have to call DAQ_Rate and DAQ_Start to configure and start the acquisition. I'm not sure I follow your question about it not being applicable to input the total number of points to be collected. If you are doing a continuous data acquisition, you have to configure the number of samples, the rate at which samples are taken, and the gain to apply to the incoming signal. All of this is done in DAQ_Start. Any errors that occur during configuration will be generated before an acquisition starts, and thus will not be sent to your callback function. Any errors that occur d
uring the data acquisition will generate an interrupt and be sent to your callback function.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,110 Views)