Main Content

downloadWaveform

Download arbitrary waveform to function generator

Description

downloadWaveform(fginstr,waveformArray) downloads the waveform defined by the numerical array waveformArray to the memory of the Quick Control function generator identified by the FGen object fginstr.

example

waveformHandle = downloadWaveform(fginstr,waveformArray) downloads the specified waveform to the function generator and returns a waveform handle waveformHandle, which identifies the waveform for use with the SelectWaveform and removeWaveform functions. This handle is necessary when working with more than one waveform at a time. Without a handle, only the most recently downloaded waveform can be selected or removed.

example

Examples

collapse all

Define an arbitrary waveform as a numeric array, then download that waveform to a Quick Control function generator.

f = fgen(rsrc,drvr);
f.Waveforem = 'Arb';
w = 1:0.001:2;
downloadWaveform (f,w);
enableOutput(f)
    ⋮
disableOutput(f)
removeWaveform(f)

Download multiple arbitrary waveforms and select one for the Quick Control function generator output.

f = fgen(rsrc,drvr);
f.Waveforem = 'Arb';
w1 = 1:0.001:2;
w2 = 2:-0.001:1
wh1 = downloadWaveform (f,w1);
selectWaveform(f,wh1);
enableOutput(f)
    ⋮
disableOutput(f)
removeWaveform(f,wh1)

Input Arguments

collapse all

Quick Control function generator instrument, specified as an FGen object.

Example: fginstr = fgen(...)

Data Types: object

Arbitrary waveform defined as a numeric array of points.

Example: [0:.01:.99,.99:-.01:0]

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Waveform handle, appropriate for use with removeWaveform and selectWaveform functions. If you do not return the waveform handle, you can download and remove only one waveform at a time.

Version History

Introduced in R2012a