GtWaveFuncGetSquareWaveDutyCycle

Supported By

GX1110, GX1120

Applies To

Function Generator mode only.

Purpose

Returns the square wave duty cycle.

Syntax

GtWaveFuncGetSquareWaveDutyCycle (nHandle, nChannel, pdDutyCycle, 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.
pdDutyCycle
PDOUBLE
Square wave duty cycle is in percentage and can be 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 returns the square wave duty cycle:

 

DOUBLEdDutyCycle;

GtWaveFuncGetSquareWaveDutyCycle (nHandle, GTWAVE_CHANNEL_A, &dDutyCycle, &nStatus);

 

See Also

GtWaveFuncSetWaveform, GtWaveFuncSetSquareWaveDutyCycle, GtWaveFuncSetFrequency, GtWaveFuncSetPhase, GtWaveGetErrorString