Loads a pre-defined waveform to memory.
Gx3722ArbLoadWaveform (nHandle, nChannel, dAmplitude, dFrequency, nShape, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3722 board. |
nChannel |
SHORT |
Channel number:1. GX3722_ARB_CH1.2. GX3722_ARB_CH2. |
dAmplitude |
DOUBLE |
Specifies the peak-to-peak voltage, 0 to 10 Volts. |
dFrequency |
DOUBLE |
Specifies the frequency, 35 to 204800 Hz. |
nShape |
SHORT |
Waveform shape to create:0. GX3722_ARB_SHAPE_SINE.1. GX3722_ARB_SHAPE_SQUARE.2. GX3722+ARB_SHAPE_RAMP_DOWN.3. GX3722+ARB_SHAPE_RAMP_UP.4. GX3722+ARB_SHAPE_TRIANGLE. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The arbitrary waveform memory cannot not be written to and read from at the same time. Calling this function will stop any Arb playback in progress, similar to a call to Gx3722ArbStop() API. Waveform oscillates around ground with voltage values between ±½ of the programmed amplitude.
The following example loads a sine wave with an amplitude of 4.5 Vpp and a frequency of 15 kHz and then triggers it:
SHORT nStatus;
Gx3722ArbLoadWaveform(nHandle, GX3722_ARB_CH1, 4.5, 15000, GX3722_ARB_SHAPE_SINE, &nStatus);
Gx3722ArbStart(nHandle, GX3722_ARB_CH1, &nStatus);
Gx3722ArbWriteStatic, Gx3722ArbWriteWaveform, Gx3722ArbReadWaveform, Gx3722ArbStart, Gx3722ArbStop, Gx3722ArbPulseWaveform, Gx3722ArbSetMode, GxFpgaGetErrorString