Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't use Regenerative AO

I am trying to output a 2kHz sine wave for a finite number of cycles, but after a while it crashes with an "Onboard device memory underflow" error.  Sometimes I can get 150 cycles, sometimes I can get 3.  To improve performance (and more importantly, reliability), I am trying to put one cycle (20 samples) of the sine wave into the FIFO and use regenerative output.  The problem with this is that I can't get it to run the command.  Setting "ao.UseOnlyOnBoardMemory = true;" I get:
 
An unhandled exception of type 'NationalInstruments.DAQmx.DaqException' occurred in nationalinstruments.daqmx.dll
Additional information: Requested value is not a supported value for this property.
Property: NationalInstruments.DAQmx.AOChannel.UseOnlyOnBoardMemory
You Have Requested: 1
You Can Select: 0
Channel Name: SinOut
Task Name: TaskSinOut
Status Code: -200077
 
Here's the start of the function:
 
string devname = "Dev1/ao0";
taskSinOut = new Task("TaskSinOut");
AOChannel ao = taskSinOut.AOChannels.CreateVoltageChannel(devname, "SinOut", -10, 10, AOVoltageUnits.Volts);

ao.UseOnlyOnBoardMemory = true;
 
I am using a DAQCard-6024E.  Does this card really not support this function, or am I doing something wrong?
 
Thanks,
Derek
0 Kudos
Message 1 of 6
(3,779 Views)
This card does not support onboard regeneration
0 Kudos
Message 2 of 6
(3,760 Views)
Hey Derek,

The 6024E does not have an analog FIFO so it cannot do onboard regeneration. If you are getting a buffer underflow error, you can consider increasing the size of your buffer. There is an example called Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi, and you might find this helpful.

Another thing you could look into is using DMA. You can enable DMA through the Channel property node. For some more information about DMA, click here. You might find this link also quite helpful.

Have a good one.

Regards
Malay Duggar
0 Kudos
Message 3 of 6
(3,739 Views)

Hi All-

A quick correction to Malay's post- PCMCIA does not support DMA, so increasing the buffer size is your best option to enhance the overall performance.

Hopefully this helps-

Message Edited by Tom W [DE] on 09-18-2006 03:43 PM

Tom W
National Instruments
0 Kudos
Message 4 of 6
(3,738 Views)
Thank you all who responded. 
 
I borrowed a 6062E, which does have a FIFO, and that card works very well (40kHz, 20 samples/period, no problem).  Unfortunately, it looks like the difference in price precludes this option.
 
As for the 6024E, I tried increasing the buffer size, which makes a difference on my development PC, but on the field computer doesn't change anything.  I'm still stuck at 100Hz, which unfortunately just isn't remotely fast enough.  The spec sheet says 1kHz, system-dependent maximum update rate, and at 20 samples/period = 50Hz sine wave, so it looks like I can't expect to get a 2kHz sine wave from this card, even though on my development PC I can (usually about 40 cycles at 2kHz).  We will probably simply discontinue this effort, but at least now I have evidence to explain why performance can't be guaranteed without the more expensive card. 
 
Thank you again for your help.
 
--Derek
0 Kudos
Message 5 of 6
(3,710 Views)
Hey Derek,

To output a 2 kHz sinewave you would need an update rate of atleast 4kS/s. If you update rate is less than twice the frequency you might see aliasing.  The DAQ card 6062E has a maximum update rate of 850 KS/s and so it was able to output the wave.

For a list of all NI PCMCIA cards you can go to www.ni.com/daq and choose PCMCIA for the Bus Type. This will give you a list and a comparison of the main features.

Have a good one.

Cheers
Malay

Message Edited by 50ohmTerminator on 09-19-2006 03:06 PM

0 Kudos
Message 6 of 6
(3,702 Views)