Reads a waveform from a TDMS file, and downloads it to the NI RF vector signal generator.

Syntax

Namespace: NationalInstruments.ModularInstruments.NIRfsgPlayback

public static int ReadAndDownloadWaveformFromFile(IntPtr rfsgSession, string filePath, string rfsgWaveformName)

Remarks

This method reads the following information from the TDMS file and writes it into the NI-RFSG waveform database:
  • Sample Rate  

  • PAPR and Runtime Scaling, or Peak Power Adjustment  

  • RF Blanking Marker Locations  

  • RF Blanking Enabled

  • Burst Start Locations  

  • Burst Stop Locations  

  • RF Blanking Marker Source  

  • Signal Bandwidth  

  • Waveform Size  


If RF blanking marker locations are present in the file, but burst locations are not present, burst locations are calculated from RF blanking marker locations and stored in the NI-RFSG waveform database.
This method internally sets the RfsgRF.PowerLevelType property value to PeakPower before writing the waveform to NI-RFSG device memory. This method completes this tasks for each NI-RFSG session.
This method returns an error, if the TDMS file has more than one waveform.

Parameters

NameTypeDescription
rfsgSessionIntPtr

Identifies the instrument session. The rfsgSession handle is obtained from the NIRfsg.DangerousGetInstrumentHandle method.

filePathstring

Specifies the absolute path to the TDMS file from which the playback library reads the waveforms.

rfsgWaveformNamestring

Specifies the waveform name used to store the waveform in the NI-RFSG device memory and waveform properties in the NI-RFSG waveform database.

Returns

Returns the status code of this method. The status code either indicates success or describes a warning condition.