Sets the duty cycle for a specified channel.
Applied To
GX1632e
GxAoStandardWaveformSetDutyCycle (nHandle, nGroup, nChannel, dDutyCycle, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1632e board. |
nGroup |
SHORT |
Group number:0. GXAO_GROUPA1. GXAO_GROUPB2. GXAO_GROUPC3. GXAO_GROUPD |
nChannel |
SHORT |
Channel number:0. GXAO_CHANNEL_01. GXAO_CHANNEL_12. GXAO_CHANNEL_23. GXAO_CHANNEL_34. GXAO_CHANNEL_45. GXAO_CHANNEL_56. GXAO_CHANNEL_67. 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. |
A duty cycle can be programmed for any channel, but it will only be used when the waveform type is set to Square.
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);