Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Playback Skipping

I've written a playback system in C# that uses multi-threading to support a producer/consumer streaming architecture. The producer thread reads complex (IQ) samples from a RAID and passes them into a concurrent queue.  The consumer thread takes the data out of the queue and then writes it to the NI-5673 waveform buffer.

 

The issue I am having is that, once the RFSG has played the data that was initially loaded into the waveform buffer, the RF stream out of the module seems to increase rapidly.  I see this issue with both my own code and NI’s example called “ArbitraryWaveformStreaming.2010,” which is downloaded with RFSG-16 .NET 4.0 support.  I’ve come to this conclusion after recording a CW tone at a certain frequency for 10 seconds, then increasing the frequency by 100kHz.  I repeated this process for the entire recording of 2min at 5MHz bandwidth.  Given the amount of memory I chose to allocate for the waveform in the 5673, I calculated that it should take about 21 seconds for the initial waveform load to play.  During this time more data would have been added to the buffer so that no underflow could occur.  I observed that, at the end of the approx. 21 seconds indicating the end of the initial buffer load, the CW tones jumped in rapid succession to the final frequency that I had recorded.  Every tone was seen, but not for the expected 10 seconds. The recording then finished playing with the CW tone held at the final recorded frequency for the remaining ~90 seconds.  The NI example was slightly more behaved in that it did not make as many successive jumps, but play was still not smooth and still occurred for the first time after the initial buffer load had been played.

 

Any ideas as to why the skipping is occurring?

0 Kudos
Message 1 of 2
(2,404 Views)

Cmuss, 

 

1) What is the data that you are reading from the RAID and where is that coming from? Is that the same data as the CW test you ran?

2) How exactly are you generating the CW tone that increases in frequency every 10 seconds?

3) During recording, are you changing the IQ rate at all?

4) You mentioned that that with the NI example the play was not smooth. Can you clarify what you mean by that? 

 

From your description, my initial reaction is that the behavior you are seeing might be tied to the fact that higher frequencies with the same number of samples would take less time. Would you be able to post either your code, the recorded waveform, or the results you are seeing to help get a better understanding of the issue? 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 2 of 2
(2,276 Views)