Main Content

Quick-Control Function Generator Properties

The fgen function can use the following properties.

PropertyDescription
AMDepth

Specifies the extent of Amplitude modulation the function generator applies to the carrier signal. The units are a percentage of full modulation. At 0% depth, the output amplitude equals the carrier signal's amplitude. At 100% depth, the output amplitude equals twice the carrier signal's amplitude. This property affects function generator behavior only when the Mode is set to 'AM' and ModulationResource is set to 'internal'.

Amplitude

Specifies the amplitude of the standard waveform. The value is the amplitude at the output terminal. The units are volts peak-to-peak (Vpp). For example, to produce a waveform ranging from -5.0 to +5.0 volts, set this value to 10.0 volts. Does not apply if Waveform is of type 'Arb'.

ArbWaveformGain

Specifies the factor by which the function generator scales the arbitrary waveform data. Use this property to scale the arbitrary waveform to ranges other than -1.0 to +1.0. When set to 2.0, the output signal ranges from -2.0 to +2.0 volts. Only applies if Waveform is of type 'Arb'.

BurstCount

Specifies the number of waveform cycles that the function generator produces after it receives a trigger. Only applies if Mode is set to 'burst'.

ChannelNames

This read-only property provides available channel names in a cell array.

Driver

This property is optional. Use only if necessary to specify the underlying driver used to communicate with an instrument. If the DriverDetectionMode property is set to 'manual', use the Driver property to specify the instrument driver.

DriverDetectionMode

Sets up criteria for connection. Valid values are 'auto' and 'manual'. The default value is 'auto', which means you do not need to set a driver name before connecting to an instrument. If set to 'manual', a driver name needs to be provided using the Driver property before connecting to instrument.

FMDeviation

Specifies the maximum frequency deviation the modulating waveform applies to the carrier waveform. This deviation corresponds to the maximum amplitude level of the modulating signal. The units are Hertz (Hz). This property affects function generator behavior only when Mode is set to 'FM' and ModulationSource is set to 'internal'.

Frequency

Specifies the rate at which the function generator outputs an entire arbitrary waveform when Waveform is set to 'Arb'. It specifies the frequency of the standard waveform when Waveform is set to standard waveform types. The units are Hertz (Hz).

Mode

Specifies run mode. Valid values are 'continuous', 'burst', 'AM', or 'FM'. Specifies how the function generator produces waveforms. It configures the instrument to generate output continuously or to generate a discrete number of waveform cycles based on a trigger event. It can also be set to AM and FM.

ModulationFrequency

Specifies the frequency of the standard waveform that the function generator uses to modulate the output signal. The units are Hertz (Hz). This attribute affects function generator behavior only when Mode is set to 'AM' or 'FM' and the ModulationSource attribute is set to 'internal'.

ModulationSource

Specifies the signal that the function generator uses to modulate the output signal. Valid values are 'internal' and 'external'. This attribute affects function generator behavior only when Mode is set to 'AM' or 'FM'.

ModulationWaveform

Specifies the standard waveform type that the function generator uses to modulate the output signal. This affects function generator behavior only when Mode is set to 'AM' or 'FM' and the ModulationSource is set to 'internal'. Valid values are 'sine', 'square', 'triangle', 'RampUp', 'RampDown', and 'DC'.

Offset

Uses the standard waveform DC offset as input arguments if the waveform is not of type 'Arb'. Use Arb Waveform Offset as input arguments if the waveform is of type 'Arb'.

Specifies the DC offset of the standard waveform when Waveform is set to standard waveform. For example, a standard waveform ranging from +5.0 volts to 0.0 volts has a DC offset of 2.5 volts. When Waveform is set to 'Arb', this property shifts the arbitrary waveform's range. For example, when it is set to 1.0, the output signal ranges from 2.0 volts to 0.0 volts.

OutputImpedance

Specifies the function generator's output impedance at the output connector.

Resource

Set this before connecting to the instrument. It is the VISA resource string for your instrument.

SelectedChannelReturns the selected channel name that was set using the selectChannel function.
StartPhase

Specifies the horizontal offset in degrees of the standard waveform the function generator produces. The units are degrees of one waveform cycle. For example, a 180-degree phase offset means output generation begins halfway through the waveform.

Status

This read-only property indicates the communication status of your instrument session. It is either 'open' or 'closed'.

TriggerRate

Specifies the rate at which the function generator's internal trigger source produces a trigger, in triggers per second. This property affects function generator behavior only when the TriggerSource is set to 'internal'. Only applies if Mode is set to 'burst'.

TriggerSource

Specifies the trigger source. After the function generator receives a trigger, it generates an output signal if Mode is set to 'burst'. Valid values are 'internal' or 'external'.

Waveform

Uses the waveform type as an input argument. Valid values are 'Arb', for an arbitrary waveform, or these standard waveform types – 'Sine', 'Square', 'Triangle', 'RampUp', 'RampDown', and 'DC'.