Installation guide

API functions68
Copyright © 2008-2014 Pico Technology Ltd. All rights reserved.ps4000apg.en r1
4.47
ps4000aSetSigGenArbitrary
PICO_STATUS ps4000aSetSigGenArbitrary (
int16_t handle,
int32_t offsetVoltage, // see note 1
uint32_t pkToPk, // see note 1
uint32_t startDeltaPhase,
uint32_t stopDeltaPhase,
uint32_t deltaPhaseIncrement,
uint32_t dwellCount,
int16_t * arbitraryWaveform, // see note 1
int32_t arbitraryWaveformSize, // see
note 1
PS4000A_SWEEP_TYPE sweepType,
PS4000A_EXTRA_OPERATIONS operation, // see note 1
PS4000A_INDEX_MODE indexMode,
uint32_t shots,
uint32_t sweeps,
PS4000A_SIGGEN_TRIG_TYPE triggerType,
PS4000A_SIGGEN_TRIG_SOURCE triggerSource,
int16_t extInThreshold
)
This function programs the signal generator to produce an arbitrary waveform.
The arbitrary waveform generator uses direct digital synthesis (DDS). It maintains a
32-bit phase accumulator that indicates the present location in the waveform. The top
bits of the phase accumulator are used as an index into a buffer containing the
arbitrary waveform. The remaining bits act as the fractional part of the index, enabling
high-resolution control of output frequency and allowing the generation of lower
frequencies.
The generator steps through the waveform by adding a deltaPhase value between 1
and phaseAccumulatorSize-1 to the phase accumulator every dacPeriod (1/
dacFrequency). If deltaPhase is constant, the generator produces a waveform at a
constant frequency that can be calculated as follows:
( ) ( )
outputFrequency =
dacFrequency ×
deltaPhase
phaseAccumulatorSize
×
awgBufferSize
arbitraryWaveformSize
where:
outputFrequency = repetition rate of the complete arbitrary waveform
dacFrequency = update rate of AWG DAC (see table below)
deltaPhase = calculated from startDeltaPhase and
deltaPhaseIncrement
phaseAccumulatorSize = maximum count of phase accumulator (see table
below)
awgBufferSize = maximum AWG buffer size (see table below)
arbitraryWaveformSize = length in samples of the user-defined waveform
Parameter
Value
dacFrequency
80 MHz
dacPeriod (= 1/dacFrequency)
12.5 ns
phaseAccumulatorSize
4 294 967 296 (2
32
)
awgBufferSize
16 384 (2
14
)