GxAoStandardWaveformSetConfiguration

Purpose

Sets the waveform configuration for a specified channel.

Applied To

GX1632e

Syntax

GxAoStandardWaveformSetConfiguration (nHandle, nGroup, nChannel, nWaveformType, dAmplitude, dOffset, dFrequency, dStartPhase, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX16xx board.
nGroup
SHORT
Group number:
0.      GXAO_GROUPA
1.      GXAO_GROUPB
2.      GXAO_GROUPC
3.    GXAO_GROUPD
nChannel
SHORT
Channel number:
0.      GXAO_CHANNEL_0
1.      GXAO_CHANNEL_1
2.      GXAO_CHANNEL_2
3.      GXAO_CHANNEL_3
4.      GXAO_CHANNEL_4
5.      GXAO_CHANNEL_5
6.      GXAO_CHANNEL_6
7.    GXAO_CHANNEL_7
nWaveformType
SHORT
Waveform type:
0.      GXAO_1632_WAVEFORM_SINE
1.      GXAO_1632_WAVEFORM_SQUARE
2.      GXAO_1632_WAVEFORM_TRIANGLE
3.      GXAO_1632_WAVEFORM_RAMP_UP
4.      GXAO_1632_WAVEFORM_RAMP_DOWN
5.    GXAO_1632_WAVEFORM_DC
dAmplitude
DOUBLE
Waveform peak-to-peak amplitude voltage, valid range is 0 to 50. 
dOffset
DOUBLE
DC offset applied to the waveform, valid range is -25 to 25 Volts.
dFrequency
DOUBLE
Frequency of the waveform in Hertz, valid range is 50 to 100000 (50 Hz to 100 kHz).
dStartPhase
DOUBLE
Start phase of the waveform in degrees, valid range is -360 to 360.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Using this function will only load the waveform characteristics to cached memory; it will not initiate waveform generation or update any currently outputting channel.  To start or update the waveform output, you must call GxAoStandardWaveformEnable

Example

The following example programs channel 3 of group C to output a sine wave that runs from 2.5 to 7.5V, frequency of 100 kHz, and 180-degree start phase shift:

 

SSHORT nStatus;

 

GxAoStandardWaveformSetConfiguration(nHandle, GXAO_GROUPC, GXAO_CHANNEL_3, GXAO_1632_WAVEFORM_SINE, 5, 5, 100000, 180, &nStatus);

 

See Also

GxAoStandardWaveformEnable, GxAoStandardWaveformGetChannelOutput, GxAoStandardWaveformGetConfiguration, GxAoStandardWaveformSetChannelsOutput, GxAoStandardWaveformIsRunning, GxAoGetErrorString