Agilent E1439 Programmer's Reference

Functions listed alphabetically

*interpolate = in;

return;

}

The equivalent Visual Basic example follows:

Private Sub rawFreq(dblFreq as Double)

Dim dblFx As Double

Dim lngIn As Long

Dim lngPh As Long

dblFx = -1048576# * dblFreq lngPh = Fix(Abs(dblFx))0

lngIn = Fix(((Abs(dblFx) - CDbl(lngPh)) * 37109375) + 0.5) If (dblFx < 0) Then

lngPh = (-1) - lngPh If (lngIn) Then

lngIn = 37109375 - lngIn Else

lngPh = lngPh + 1 End If

End If

Call age1439_frequency_center_raw(lngId, lngPh, lngIn)

End Sub

Example

An example of this in VB is included in the Front Panel code and can be activated by changing the following declaration in frmMain of E1439.vbp.

Const constFreqCentRaw = False

’When TRUE, set center frequency with

’age1439_frequency_center_raw()instead of

age1439_frequency_center()

Return Value

AGE1439_SUCCESS indicates that a function was successful.

Values other than AGE1439_SUCCESS indicate an error condition or other important status condition. To determine the error message, pass the return value to “age1439_error_message” on page 102.

See Also

“age1439_init” on page 132, “age1439_frequency_setup” on page 128, “age1439_frequency_ center_raw_compute” on page 127

126

Page 136
Image 136
Agilent Technologies E1439 manual 126