fgen
Connection to Quick-Control Function Generator instrument
Description
The Quick-Control Function Generator can be used for any function generator that uses an underlying IVI-C driver. You do not have to directly deal with the underlying driver.
For information on the prerequisites for using fgen
, see Quick-Control Function Generator Requirements.
Creation
Description
myFGen = fgen
creates an object to connect to your function
generator. To connect to the function generator specified by myFGen
,
use connect(myFGen)
.
myFGen = fgen(
creates a connection
to the function generator with the specified resource string,
resource
)resource
.
Input Arguments
Properties
Object Functions
Use these object functions with any Quick Control interface.
drivers | List of available instrument drivers for Quick-Control interfaces |
resources | List of available instrument resources for Quick-Control interfaces |
connect | Connect device object to instrument |
disconnect | Disconnect device object from instrument |
Use these object functions with a Quick Control function generator.
Function | Description |
---|---|
selectChannel | Specifies the channel name from which the function generator produces the waveform. Example: selectChannel(myFGen,'1'); |
selectWaveform | Specifies which arbitrary waveform the function generator produces. Example: selectWaveform(myFGen,wh); where
|
downloadWaveform | Downloads an arbitrary waveform to the function generator. If you provide
an output variable, a waveform handle is returned. It can be used in the
If you do not provide an output variable, function generator overwrites the waveform when a new waveform is downloaded and deletes it upon disconnection. Example: % Download the following waveform to fgen
w = 1:0.001:2;
downloadWaveform(myFGen,w); % Download a waveform to fgen and return a waveform handle
wh = downloadWaveform(myFGen,w); |
removeWaveform | Removes a previously created arbitrary waveform from the function generator's memory. If a waveform handle is provided, it removes the waveform represented by the waveform handle. Example: % Remove a waveform from fgen with waveform handle 10000
removeWaveform(myFGen,10000); |
enableOutput | Enables the function generator to produce a signal that appears at the
output connector. This function produces a waveform defined by the
Example: enableOutput(myFGen) |
disableOutput | Disables the signal that appears at the output connector. Disables the selected channel. Example: disableOutput(myFGen) |
reset | Sets the function generator to factory state. Example: reset(myFGen) |
Examples
Version History
Introduced in R2012a