IviFgen_ConfigureArbWaveform

CVI/LabWindows IVI Class Driver

IviFgen_ConfigureArbWaveform

IviFgenArbWfm Capability Group

C Function Prototype

ViStatus IviFgen_ConfigureArbWaveform (ViSession vi, ViConstString channelName, ViInt32 waveformHandle, ViReal64 gain, ViReal64 offset);

Purpose

This function configures the attributes of the function generator that affect arbitrary waveform generation. These attributes are the arbitrary waveform handle, gain, and offset.

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.

waveform
Handle
ViInt32 Pass the handle of the arbitrary waveform that you want the function generator to produce. The driver sets the IVIFGEN_ATTR_ARB_WAVEFORM_HANDLE attribute to this value. You create an arbitrary waveform using the IviFgen_CreateArbWaveform function. The IviFgen_CreateArbWaveform function returns a handle that you use to identify the waveform.
gain ViReal64 Specifies the factor by which the function generator scales the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to a range of –1.00 to +1.00. You use this attribute to scale the arbitrary waveform to other ranges. The driver sets the IVIFGEN_ATTR_ARB_GAIN attribute to this value. For example, to configure the output signal to range from -2.00 V to +2.00 V, set the gain to 2.00.

Units: volts (V).
offset ViReal64 Specifies the value the function generator adds to the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to a range of –1.00 to +1.00. You use this parameter to shift the arbitrary waveform's range. The driver sets the IVIFGEN_ATTR_ARB_OFFSET attribute to this value. For example, to configure the output signal to range from 0.00 V to 2.00 V instead of –1.00 V to 1.00 V, set the offset to 1.00.

Units: volts (V).

Return Values