Sets the waveform output mode.
Gx3722ArbSetMode (nHandle, nMode, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3722 board. |
nMode |
SHORT |
Waveform output modes are:0. GX3722_ARB_MODE_CONTINUES: Output waveform runs continuously after starting waveform generation by calling Gx3722ArbStart() API.1. GX3722_ARB_MODE_SINGLE_SHOT: Only one waveform will be generated after starting waveform generation by calling Gx3722ArbStart() API. |
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.
Output mode is common to both channels.
The following example loads a sine wave with an amplitude of 4.5 Vpp and a frequency of 15 kHz, sets the mode to continuously, and then triggers it:
SHORT nStatus;
Gx3722ArbLoadWaveform(nHandle, GX3722_ARB_CH1, 4.5, 15000, GX3722_ARB_SHAPE_SINE, &nStatus);
Gx3722ArbSetMode(nHandle, GX3722_ARB_MODE_CONTINUES, &nStatus);
Gx3722ArbStart(nHandle, GX3722_ARB_CH1, &nStatus);
Gx3722ArbWriteStatic, Gx3722ArbWriteWaveform, Gx3722ArbReadWaveform, Gx3722ArbStart, Gx3722ArbStop, Gx3722ArbLoadWaveform, Gx3722ArbPulseWaveform, Gx3722ArbGetMode, GxFpgaGetErrorString