GxAoStandardWaveformSetDutyCycle

Purpose

Sets the duty cycle for a specified channel.

Applied To

GX1632e

Syntax

GxAoStandardWaveformSetDutyCycle (nHandle, nGroup, nChannel, dDutyCycle, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX1632e 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
dDutyCycle
DOUBLE
Sets the duty cycle, 0.0 to 100.0.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

A duty cycle can be programmed for any channel, but it will only be used when the waveform type is set to Square.

Example

The following example sets up a pulse with 20% duty cycle:

 

SHORT nStatus;

 

GxAoStandardWaveformSetConfiguration(nHandle, GXAO_GROUPB, GXAO_CHANNEL_4, GXAO_1632_WAVEFORM_SQUARE, 2.5, 0, 250, 0, &nStatus);

GxAoStandardWaveformSetDutyCycle(nHandle, GXAO_GROUPB, GXAO_CHANNEL_4, 20, &nStatus);

 

See Also

GxAoStandardWaveformGetDutyCycle, GxAoGetErrorString