Gets the waveform configuration for a specified channel.
Applied To
GX1632e
GxAoStandardWaveformGetConfiguration (nHandle, nGroup, nChannel, pnWaveformType, pdAmplitude, pdOffset, pdFrequency, pdStartPhase, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1632e board. |
nGroup |
SHORT |
Group number:0. GXAO_GROUPA1. GXAO_GROUPB2. GXAO_GROUPC3. GXAO_GROUPD |
nChannel |
SHORT |
Channel number:0. GXAO_CHANNEL_01. GXAO_CHANNEL_12. GXAO_CHANNEL_23. GXAO_CHANNEL_34. GXAO_CHANNEL_45. GXAO_CHANNEL_56. GXAO_CHANNEL_67. GXAO_CHANNEL_7 |
pnWaveformType |
PSHORT |
Waveform type:0. GXAO_1632_WAVEFORM_SINE1. GXAO_1632_WAVEFORM_SQUARE2. GXAO_1632_WAVEFORM_TRIANGLE3. GXAO_1632_WAVEFORM_RAMP_UP4. GXAO_1632_WAVEFORM_RAMP_DOWN5. GXAO_1632_WAVEFORM_DC |
pdAmplitude |
PDOUBLE |
Waveform peak-to-peak amplitude voltage, valid range is 0 to 50. |
pdOffset |
PDOUBLE |
DC offset applied to the waveform, valid range is -25 to 25 Volts. |
pdFrequency |
PDOUBLE |
Frequency of the waveform in Hertz, valid range is 50 to 100000 (50 Hz to 100 kHz). |
pdStartPhase |
PDOUBLE |
Start phase of the waveform in degrees, valid range is -360 to 360. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Using this function will only read the waveform characteristics currently programmed to cached memory. It does not measure any of the characteristics from the active waveform.
The following example reads the programmed waveform configuration from the specified channel:
SHORT nWaveformType, nStatus;
DOUBLE dAmplitude, dOffset, dFrequency, dStartPhase;
GxAoStandardWaveformGetConfiguration(nHandle, GXAO_GROUPD, GXAO_CHANNEL_2, &nWaveformType, &dAmplitude, &dOffset, &dFrequency, &dStartPhase, &nStatus);