Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Extension of the Labwindows/CVI - ArbitraryWaveformStreaming example from NI

Hello All,

There is a pretty good example of how to use streaming to the AWG listed under CVI but I found I needed a little bit more flexibility to fit it into my larger project. The main problem that I had with the default program is that it uses streaming to essentially create waveform looping - the whole waveform is loaded to AWG and then used portions are reloaded. While this may prove the data transfer rate, it does not quite spell out the way to use streaming to generate a waveform that will not fit into the AWG internal memory.

The updated example will let one probe their hardware system combo to check which buffer size, data push size and output rates will work for a system design. Ultimate performance will likely be greater than in example as gui timer callbacks are used to refill the AWG buffer. Using this example, I can easily create a 512MB waveform, loop it 5 times at 100mS/s on a system with 32 MB AWG and not have a buffer underrun error. (4MB onboard buffer, 1 MB push RAM to AWG buffer)

System is Dell core duo, PXIe 5442 AWG, MXI express x4 connection. The limit of 512 MSample in this instance arises from 2GB system RAM which is tapped by 512 MS waveform (1GB RAM used just for waveform storage).

I plan on using disk to RAM to AWG with an intermediate sized RAM buffer in actual project. When combined with RAID disk storage I hope to be able to generate large waveforms (mulitGB for example) at full rate 100MS/s while minimizing the memory impact on both system RAM (16MB) and onboard RAM (4 MB - AWG) . Note : this will obviously be trading CPU cuycles for RAM but I think the tradeoff is reasonable. The remaining AWG memory will allow the use of multiple waveform in a waveform scripting arrangement needed for the primary project.

Implementation of disk to RAM to AWG should be more clear in this updated example when compared to stock example. Tthe waveform is split into multiple arrays that are accessed sequentially. As one tracks the used arrays, you would start a new fill procedure for each used array - ideally in parallel with the write to AWG. I like to thank NI staff (particularly Ryan Verret) that were very helpful in getting me through my first set of hurdles. I will probably continue to need their support for the rest of my project.

Hope this helps,

Greg

Contributors