Gx3348FuncGenGetPeriod

Purpose

Returns the Function Generator square waveform period and duty cycle.

Syntax

Gx3348PulseGenGetPeriod (nHandle, pdwPeriod, pdDutyCycle, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle for the PXI board.
pdwPeriod
PDWORD
Returns the Function Generator square waveform period. The square waveform period can be set from 2000 uSec to ~4294.9 Sec in 1 uSec resolution.
pdDutyCycle
PDOUBLE
Returns the Function Generator square waveform duty cycle. The square waveform duty cycle can be set from 0.00% to 99.99% or 1usec whichever is bigger.  
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

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.

Example

The following example sets the Function Generator square waveform period 2000 uSec 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);

 

See Also

Gx3348FuncGenIsSupported, Gx3348FuncGenSetLevels, Gx3348FuncGenSetMode, Gx3348FuncGenPulseSetTiming, Gx3348FuncGenSetState, Gx3348FuncGenTrigger, GxPdoGetErrorString