GtWaveFuncSetSquareWaveDutyCycle

Supported By

GX1110, GX1120

Applies To

Function Generator mode only.

Purpose

Sets the square wave duty cycle.

Syntax

GtWaveFuncSetSquareWaveDutyCycle (nHandle, nChannel, dDutyCycle, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX11X0 board.
nChannel
SHORT
Specified Channel number.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
1 = GTWAVE_CHANNEL_B: Channel B.
dDutyCycle
DOUBLE
Square wave duty cycle is in precentage and can be between 10% to 90%.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Function Generator needs to be loaded with a Square wave prior calling this function.

Example

The following example sets square wave duty cycle to 15%:

 

GtWaveFuncSetSquareWaveDutyCycle (nHandle, GTWAVE_CHANNEL_A, 15, &nStatus);

 

See Also

GtWaveFuncSetWaveform, GtWaveFuncGetSquareWaveDutyCycle, GtWaveFuncSetFrequency, GtWaveFuncSetOutToSquareState, GtWaveFuncSetPhase, GtWaveGetErrorString