GX1110, GX1120
Function Generator mode only.
Sets the output to square state.
GtWaveFuncSetOutToSquareState (nHandle, nChannel, bState, pnStatus)
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. |
bState |
BOOL |
Output to square state:0=FALSE: Out to square state not active.1=TRUE: Out to square state active. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function is only applicable when generating a sine waveform. When enabled, a comparator is connected to the sine waveforms and convert the output to a square waveform. The duty cycle of that square waveform can be programmed by calling thGtWaveFuncSetOutToSquareDutyCycle API. The output square wave is much cleaner waveform since it was derived directly from a sine wave.
The following example sets the output to square state:
GtWaveFuncSetOutToSquareState (nHandle, GTWAVE_CHANNEL_A, TRUE, &nStatus);
GtWaveFuncGetOutToSquareDutyCycle, GtWaveFuncSetWaveform, GtWaveFuncSetSquareWaveDutyCycle, GtWaveFuncSetFrequency, GtWaveFuncSetOutToSquareState, GtWaveFuncSetPhase, GtWaveGetErrorString