06-05-2009 10:12 AM
I have a 9263 in a cDAQ-9172 chassis. I have some very long waveforms (3 days worth of 250Hz sample rate signals) that I would like to play out. I have been fighting with this for some time and I run into one problem or another. I figure I should be able to loop through and send blocks of data as the buffer empties. I started with the DAQ Assistant, and used that to generate the code for continuous playback.
The code I am trying to write alternates indefinitely between a sine and a triangle wave. I figure if I can do this, then I can easily adapt this to my main code block.
The problem I am having is that the Write function blocks and my whole application locks up. I have the second status loop running in parallel, but it does not run while the program is is blocked in the Write function. So my front panel dies and is unresponsive to user input until the write completes and it loops back. I would like to have a graph display to display the waveform on the screen like the MAX test application, but that won't work if the program is tied up waiting for the Write function to return.
Is there any way to do this as a non-blocking operation and get notified when the buffer is getting close to being empty? I had an application like this working with the simulated device and I was checking the "SpaceAvail" property, but this does not work the same way with the real device.
Attached is some test code that I am working with. Any help is greatly appreciated.
06-05-2009 10:16 AM
06-07-2009 06:48 PM
There is one thing I would recommend right now. Try to input a numeric constant to the Wait node in your DAQ loop. I am guessing that the wait doesn't allow the while loop to loop back; probably putting an indicator would help debug.
06-09-2009 09:35 AM
06-09-2009 03:21 PM