Sets the Function Generator Square waveform offset and amplitude voltage setting.
Gx3348FuncGenSetLevels (nHandle, dOffset, dAmplitude, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle for the PXI board. |
dOffset |
DOUBLE |
Function Generator offset voltage setting range is -20V to +20V |
dAmplitude |
DOUBLE |
Function Generator amplitude voltage setting range is 0.0V to +20V peak-to-peak |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The square waveform offset voltage can be set to any voltage between -20V to +20. The amplitude can be set form 0.0V to 40V peak-to-peak. The peak square waveform voltage can be Amplitude/2+Offset<=32.0 volts, and Amplitude/2-Offset>=-20.0 volts.
Note: Function Generator functionality is only supported by firmware version 0x0000AC00 and above, use the Gx3348FuncGenIsSupported() API to check if supported.
The following example sets the Function Generator offset voltage to 0V, and amplitude peak-to-peak voltage to 10V, and returning the settings:
Note: see the Gx3348FuncGenTrigger() API for a complete C example.
SHORT nHandle, nStatus;
DOUBLE dOffset, dAmplitude;
Gx3348FuncGenSetLevels (nHandle, 0.0, 10.0, &nStatus);
Gx3348FuncGenGetLevels (nHandle, &dOffset, &dAmplitude, &nStatus);
Gx3348FuncGenIsSupported, Gx3348FuncGenSetMode, Gx3348FuncGenPulseSetTiming, Gx3348FuncGenSetState, Gx3348FuncGenTrigger, GxPdoGetErrorString