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