Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

BufferOverrun error with DAQ_DB_Transfer in Visual C .NET at 100Hz sempling

is there a way to set a huge circualr buffer and get a half_buffer_ready every scan made (not after the half of the circualar buffer was acquired)?
0 Kudos
Message 1 of 2
(2,665 Views)
Greetings,

The half_buffer_ready will only happen when half of the buffer is ready. If you wanted this event after each point then you could create a buffer of 2 samples. However, this isn't very realistic. Instead, I would recommend looking into interrupt based transfers instead of DMA based transfers which you are probably using right now. The negative to using interrupt based transfers is that they are slower. Especially if you are looking to generate an interrupt after each scan. You will most likely reduce your scan rate to a maximum of 1kHz to 15kHz depending on your computer's speed. (interrupts are very dependant on CPU speed)

For more information on interrupt based transfers I will point you to the NI-DAQ Function Reference Manual. This g
uide details the entire API for our NI-DAQ driver. Search through the document for the word "interrupt". Also, I would suggest reading the documentation for the function "Set_DAQ_Device_Info()".

NI-DAQ Function Reference Manual for PC Compatibles
http://digital.ni.com/manuals.nsf/websearch/1630A0B68738B269862567C1007A2912?OpenDocument&node=132100_US

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,665 Views)