Solution
Most of the NI RF generation devices including NI VST PXIe-5840 can update the waveform data in the generation state even when the 'streaming' is disabled. Following additional steps are recommended to achieve this:
- Allocate the memory for the waveforms by calling “nirfsg Alloc Arb Wfm” or by directly calling “niRFSG Write Arb waveform” APIs in the configuration state. Set ‘more data pending’ control to true with ‘niRFSG Write Arb waveform’ if the waveform size is expected to expand when updating later in the generation state.
- To overwrite any of the waveforms, use ‘niRFSG Set Arb Waveform Next Write Position’ API. Provide the name of the waveform to update, set 'relative to = Start of Waveform’ and offset = 0’. This will take the waveform write pointer to the beginning of the waveform memory.
- Overwrite the waveform data with newer samples using ‘niRFSG Write Arb waveform’ API with the correct waveform name in the generation state.