Overview
Use this example to stream a waveform to the AWG even in Script Mode.
Description
1) Allocate Streaming Memory using niFgen_AllocateWaveform function
2) Pass the "Waveform Handle" output of niFgen_AllocateWaveform function to "niFGEN Streaming Handle" attribute
3)Fill the Streaming Memory Buffer with data using niFgen_WriteBinary16Waveform and Streaming Waveform Handle
4) Then read the attribute "Streaming Waveform Name". You can use this name now in script
To generate these sequence of waveforms, a sample script would be:
script myscript
generate wfmA
generate wfmB
repeat <repeat count>
generate <streamingwfmname>
end repeat
5) Download the script using niFgen_WriteScript function
6) After you start the generation, inside a while loop continuously monitor the "Space Available in Streaming Wfm" and transfer the data using "niFgen_WriteBinary16Waveform and Streaming Waveform Handle.
Requirements
Software
LabVIEW 2012 (or compatible)
NI-Fgen driver which is compatible with your hardware and version of LabVIEW
Hardware
Streaming/Script Mode capable AWG (54xx)
Streaming capable PXI/PXIe controller or external PC
Streaming capable PXI/PXIe chassis
Steps to Implement or Execute Code
1. Select the AWG Resource Name
2. Run the code and determine what the streaming waveform name should be from the Waveform Name indicator.
By default, the name of the streaming waveform on some AWGs is www10000.
3. Use the streaming waveform name returned by the waveform name indicator in the script.

If the waveform that you have selected in your script does not exist, you will get this error. Simply read the waveform name using the property node to use as your streaming waveform name.
Additional Information or References
VI Block Diagram

**This document has been updated to meet the current required format for the NI Code Exchange.**