11-11-2005 12:46 PM
11-14-2005 09:52 AM
11-16-2005 06:12 AM
Hi Sacha,
Here is some extra info :-
1) I'm not getting any specific error code - but the asynchronous output task write callback doesn't appear to be called as often as I'd be expeecting.
2) Running the input task on it's own adds only a few extra percent to the CPU usage - I'm nowhere near maxing out the CPU.
2) Graphing both waveforms does make the CPU usage rise rapidly to nearly 100 percent - however, turning graphing off make's no difference to the apparent responsiveness off my generated output waveform.
3) I've recently started experimenting with turning regeneration on and setting UseOnlyOnBoardMemory = False - this enables me to update the output buffer from within my code.... previously with regeneration on once I'd started the output task nothing I wrote to the output stream had any effect on the output waveform (hence, I need regeneration turned off).
I'll post a cut down version of my code asap... I appreciate that it's hard to give a definitive answer without it.
BTW, do you have any documentation or links which outline the expected behavour of the write callback when using different modes e.g. regeneration on/off, dma vs. interrupt, onboard memory on/off ?
Many thanks,
Mike
11-16-2005 10:41 AM
01-10-2006 08:40 AM
Hi,
sincere apologies for not replying sooner.
The principle of analog output does include a delay. Essentially the first lot of data written to the write buffer (system memory) is transfered to the card FIFO so it is filled. You then have say 10000 points in the system buffer (using round numbers here) and a FIFO 2000 elements deep filled with the first 2000 points. So with regeneration off, the system buffer continuously transfers data to the FIFO on the card (hopefully using DMAs). when you ask it to simply write new data, then the driver waits until there is enough space in the system buffer to write this data. A
As you say, if the buffer is large, you'll experience a large delay in the system. You also have to remember to include the onboard FIFO with this.
I've included below a section from a presentation I gave in Israel I think originally created by one of our engineers in the US for an internal presentation on advances in DAQ.
The screenshots showing the property nodes are from LabVIEW, however the properties (and indeed all functions) in DAQmx should be identical regardless of language used.
There's a lot of notes that go with the two slides so they should explain what's possible
When you clear the task, you need to reconfigure a new task to get it to be able to run again, so this creates a new buffer (de-allocating the old one).
Hope this helps
Sacha Emery
National Instruments (UK)