Agilent e1439 programmer's reference – Agilent Technologies VXI E1439 User Manual
Page 136

126
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 o
f
’
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
.
See Also
,