Configure Arbitrary Waveform Mode
- Updated2025-10-10
- 2 minute(s) read
You can use Arbitrary Waveform mode to generate waveforms from user–created or user–provided waveform arrays of numeric data.
LabVIEW Example
The procedure below provides the basic steps required to configure Arbitrary Waveform mode. For a more detailed example of the use of Arbitrary Waveform mode in LabVIEW, refer to the Fgen Basic Arb Waveform.vi or the Fgen Arbitrary Waveform.vi examples for LabVIEW.
- Call the niFgen Configure Output Mode VI with Output Mode set to Arbitrary Waveform.
- (Optional) Call the niFgen Clear Arbitrary Memory VI. This clears any previously created arbitrary waveforms, sequences, and scripts from the signal generator memory.
Choose one of the following two options for creating your arbitrary waveform:
Option 1—Allow NI-FGEN to configure the size and allocated space of your waveform.
- Call the niFgen Create Waveform (poly) VI. This VI creates a waveform the size of the data you provide.
- Call the niFgen Configure Arbitrary Waveform VI to configure the gain and offset of the waveform.
Option 2—Manually configure the size and allocated space of your waveform.
- Call the niFgen Allocate Waveform VI to specify the size of the waveform to allocate in the onboard memory of the signal generator.
- Call the niFgen Write Waveform (poly) VI to write waveform data to the onboard memory you allocated in step 3.
- Call the niFgen Configure Arbitrary Waveform VI to configure the gain and offset of the waveform.
C Example
The procedure below provides the basic steps required to configure Arbitrary Waveform mode. For a more detailed example of the use of Arbitrary Waveform mode in C, refer to the BasicArbitraryWaveform or the ArbitraryWaveform examples for CVI.
- Call the niFgen_ConfigureOutputMode function with the outputMode parameter to NIFGEN_VAL_OUTPUT_ARB.
- (Optional) Call the niFgen_ClearArbWaveform function. This clears any previously created arbitrary waveforms from the signal generator memory.
- Call one of the niFgen Create Waveform functions (niFgen_CreateWaveformF64 , niFgen_CreateWaveformI16 , niFgen_CreateWaveformComplexF64 , or niFgen_CreateWaveformFromFileI16). The function you choose creates a waveform the size and type of the data you choose.
- Call the niFgen_ConfigureArbWaveform function to configure the gain and offset of the waveform.