Sets the Function Generator square waveform period and duty cycle.
Gx3348PulseGenGetPeriod (nHandle, dwPeriod, dDutyCycle, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle for the PXI board. |
dwPeriod |
DWORD |
Function Generator square waveform period. The square waveform period can be set from 2000 uSec to ~4294.9 Sec in 1 uSec resolution. |
dDutyCycle |
DOUBLE |
Function Generator square waveform duty cycle. The square waveform duty cycle can be set from 0.00% to 99.99% or 1000 uSec whichever is bigger. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The square waveform offset voltage can be set to any voltage between -20V to +20. The amplitude can be set form 0.0V to 40V peak-to-peak. The peak square waveform voltage can be Amplitude/2+Offset<=32.0 volts, and Amplitude/2-Offset>=-20.0 volts. The square waveform period can be set form 2000 uSec to ~4294.9 Sec in 1 uSec resolution.
Note: Function Generator functionality is only supported by firmware version 0x0000AC00 and above, use the Gx3348FuncGenIsSupported() API to check if supported.
The following example sets the Function Generator square waveform period 2000usec and the duty cycle to 50% and returns settings.
Note: see the Gx3348FuncGenTrigger() API for a complete C example.
SHORT nHandle, nStatus;
DWORD dwPeriod;
DOUBLE dDutyCycle;
Gx3348FuncGenGetPeriod (nHandle, 2000, 50.0, &nStatus);
Gx3348FuncGenGetPeriod (nHandle, &dwPeriod, &dDutyCycle, &nStatus);
Gx3348FuncGenIsSupported, Gx3348FuncGenSetLevels, Gx3348FuncGenSetMode, Gx3348FuncGenPulseSetTiming, Gx3348FuncGenSetState, Gx3348FuncGenTrigger, GxPdoGetErrorString