GxAoStandardWaveformEnable

Purpose

Starts or stops the generation of standard waveforms based on the loaded waveform configurations.

Applied To

GX1632e

Syntax

GxAoStandardWaveformEnable (nHandle, bEnable, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX1632e board.
bEnable
BOOL
True to begin output waveform generation based on the programmed waveform characteristics. False will stop all waveform generation.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

Comments

When enabling standard waveforms, all waveform characteristics programmed using GxAoStandardWaveformSetConfiguration are loaded into memory and output is enabled.  These waveforms will continue to play until this function is called with bEnable set to FALSE disable output.

Seamless Transition

Under normal user, the channels are configured and waveform generation is started using this API with bEnable=TRUE and stopped with bEnable=FALSE.  When the waveform is started, it always begins executing the specified waveforms at the same starting point. Since the API is called via software, the waveform will stop at some unknown time and all channels will hold their last programmed value and output DC waves.

If a waveform is already streaming and this API is called again with bEnable=TRUE, a seamless transition will occur.  Changes made using GxAoStandardWaveformSetConfiguration and GxAoStandardWaveformSetChannelOutput will be appended to the end of the GX1632e’s memory and the transition will occur when the transition point in memory is reached.  The moment when this occurs will depend of how much of the GX1632e’s memory is utilized when the command is sent and how fast the sample clock is running.

Example

The following example sets up a few waveforms and then start waveform generation:

 

SHORT nStatus;

 

GxAoStandardWaveformSetConfiguration(nHandle, GXAO_GROUPA, GXAO_CHANNEL_0, GXAO_1632_WAVEFORM_SINE, 2, 0, 1000, 0, &nStatus);

GxAoStandardWaveformSetConfiguration(nHandle, GXAO_GROUPB, GXAO_CHANNEL_1, GXAO_1632_WAVEFORM_TRIANGLE, 4, 2, 1000, 0, &nStatus);

GxAoStandardWaveformSetConfiguration(nHandle, GXAO_GROUPC, GXAO_CHANNEL_2, GXAO_1632_WAVEFORM_RAMP_UP, 6, 4, 1000, 0, &nStatus);

GxAoStandardWaveformEnable(nHandle, TRUE, &nStatus);

 

See Also

GxAoStandardWaveformIsRunning, GxAoStandardWaveformSetChannelOutput, GxAoStandardWaveformSetConfiguration, GxAoGetErrorString