07-02-2019 05:02 PM
Hi all,
I am sending a digital waveform to a digital output with DAQmx. See my example VI.
Using this VI, first I send a waveform made from two values: T, F. This works and I can see the LED blink on and off in an even pattern. Then I send a waveform with four values: T, F, T, T. This also works. I see the LED blinking with more time spent on than off. Then I try to send a waveform with only two values: T,F again. It doesn't work now and I get an error "Onboard device memory underflow." I assume it's because now that I've sent it 4 values, it is expecting 4 again, not 2. But why? It was ok when I sent if 4 values after sending 2 but not the other way around? Is there any way I can make this work? I would prefer to not have to clear the task and create a new one every time I send a new waveform.
I have never used digital waveforms before, so sorry if I am missing something obvious.
Solved! Go to Solution.
07-03-2019 09:15 AM
Hi there,
Usually that "onboard device memory underflow" means that data is not being written fast enough to memory, and suggests a data underflow. Do you change the values it is expecting from 4 to 2 when you revert back to using 2?
Also, what device are you using? It is always helpful to know since each device has its own set of specifications.
Regards,
07-03-2019 09:24 AM
Oh yes, sorry, I am using NI 9474.
Yes I think that is the problem, I don't know how to tell it how many values to expect. Could you explain how to do this?
07-03-2019 01:32 PM
I just tried using the "DAQmx Configure Output Buffer" VI each time to set it to expect to proper size, but the same thing happens as before. Is this not the right way to do it?
For clarity, I am using an NI 9474 in a cDAQ-9178. I have no problems setting a waveform with 2 samples, then one with 4 samples, but then when I send a waveform with 2 samples after that, the digital output turns off instead of doing the waveform I sent and then I get this error when I stop:
07-10-2019 06:01 PM
I have eventually found a solution to my problem. I got the idea from this lava thread: https://lavag.org/topic/9973-simultaneous-analog-and-digital-output-with-daqmx/
Basically I just needed to set this property "Use Only Onboard Memory" to true at the beginning of my program, then everything works great.