Gx3722ArbSetMode

Purpose

Sets the waveform output mode.

Syntax

Gx3722ArbSetMode (nHandle, nMode, pnStatus)

Parameters

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.

Comments

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.

Example

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);

 

See Also

Gx3722ArbWriteStatic, Gx3722ArbWriteWaveform, Gx3722ArbReadWaveform, Gx3722ArbStart,  Gx3722ArbStop, Gx3722ArbLoadWaveform, Gx3722ArbPulseWaveform, Gx3722ArbGetMode,  GxFpgaGetErrorString