Agilent Technologies E1439 User Manual page 135

Vxi 70 mhz if adc with filters and memory
Table of Contents

Advertisement

age1439_frequency_center_raw
Provides a fast way to set the center frequency
VXIplug&play Syntax
ViStatus age1439_frequency_center_raw(ViSession id, ViInt32 phase, ViInt32 interpolate);
ViStatus age1439_frequency_center_raw_get(ViSession id, ViPInt32 phasePtr, ViPInt32
Description
age1439_frequency_center_raw sets the center frequency without relying on the internal
Agilent E1439 microprocessor to do floating point computations, since the internal
microprocessor does not have a floating point co-processor. The parameters may be easily
computed with age1439_frequency_center_raw_compute.
Parameters
id
is the VXI instrument session pointer returned by the age1439_init function.
phase
specifies the phase part of the frequency.
interpolate
specifies the interpolation part of the frequency.
phasePtr
points to the current actual value of phase.
interpolatePtr
points to the value of interpolate.
Comments
The following examples are provided in case you want to compute your own parameter values
rather than use the recommended
The following C code segment shows how to compute these parameters, where freq is
(center frequency/sample rate):
static void rawFreq(double freq, long *phase, long *interpolate)
{
#include "age1439".h
interpolatePtr);
long ph, in;
freq *= -1048576.0;
ph = (long)fabs(freq);
in = (long)(((fabs(freq)-(double)ph)*37109375)+0.5);
if (freq < 0)
{
ph = -1 - ph;
if (in !=0);
in = 37109375 - in;
else;
ph = ph + 1;
}
*phase = ph;
Agilent E1439 Programmer's Reference
age1439_frequency_center_raw_compute
Functions listed alphabetically
function.
125

Advertisement

Table of Contents
loading

Table of Contents