IviFgen_ConfigureStandardWaveform

CVI/LabWindows IVI Class Driver

IviFgen_ConfigureStandardWaveform

IviFgenStdFunc Capability Group

C Function Prototype

ViStatus IviFgen_ConfigureStandardWaveform (ViSession vi, ViConstString channelName, ViInt32 waveform, ViReal64 amplitude, ViReal64 DCOffset, ViReal64 frequency, ViReal64 startPhase);

Purpose

This function configures the attributes of the function generator that affect standard waveform generation. These attributes are the waveform, amplitude, DC offset, frequency, and start phase.

Parameters

Name Type Description
vi ViSession The instrument handle that you obtain from the IviFgen_init or IviFgen_InitWithOptions functions. The handle identifies a particular IVI session.
channelName ViConstString Pass the virtual channel name that you assign to the instrument in MAX.

Virtual channel names are aliases for instrument specific channel strings. The instrument specific channel strings can differ from one instrument to another. Virtual channel names allow you to use and swap instruments without having to change the channel names in your source code. You assign a virtual channel name to an instrument specific channel through MAX. This control accepts virtual channel names you have assigned to the specific instrument you are using. It also accepts the instrument specific channel names.

Note  You can specify the channel name as a string variable or as a literal enclosed in double quotes.
waveform ViInt32 Pass the standard waveform that you want the function generator to produce. The driver sets the IVIFGEN_ATTR_FUNC_WAVEFORM attribute to this value.

Defined Values

amplitude ViReal64 Pass the amplitude of the standard waveform that you want the function generator to produce. This value is the amplitude at the output terminal. The driver sets the IVIFGEN_ATTR_FUNC_AMPLITUDE attribute to this value. For example, to produce a waveform ranging from -5.00 to +5.00 V, set the amplitude to 10.00 V. Units: V peak-to-peak (Vpp)

Note  This parameter is ignored when you set the waveform parameter to IVIFGEN_VAL_WFM_DC.
DCOffset ViReal64 Pass the DC offset of the standard waveform that you want the function generator to produce. This value is the offset at the output terminal. The value is the offset from ground to the center of the waveform you specify with the waveform parameter. The driver sets the IVIFGEN_ATTR_FUNC_DC_OFFSET attribute to this value. For example, to configure a waveform with an amplitude of 10.00 V to range from 0.00 V to +10.00 V, set the DC Offset to 5.00 V. Units: volts (V)
frequency ViReal64 Pass the frequency of the standard waveform that you want the function generator to produce. The driver sets the IVIFGEN_ATTR_FUNC_FREQUENCY attribute to this value.

Units: hertz (Hz)

Note  This parameter is ignored when you set the waveform parameter to IVIFGEN_VAL_WFM_DC.
startPhase ViReal64 Pass the horizontal offset of the standard waveform you want the function generator to produce. You specify this attribute in degrees of one waveform cycle. The driver sets the IVIFGEN_ATTR_FUNC_START_PHASE attribute to this value. A start phase of 180 degrees means output generation begins halfway through the waveform. A start phase of 360 degrees offsets the output by an entire waveform cycle, which is identical to a start phase of 0 degrees. Units: Degrees of one cycle.

Note  This parameter is ignored when you set the waveform parameter to IVIFGEN_VAL_WFM_DC.

Return Values