
FSE
Programming Examples
1065.6016.12
7.7
E-16
Example:
Dim ibsta As Integer ’ Status variable
Dim iberr As Integer ’ Error variable
Dim ibcntl As Long ’ Count variable
Dim ud As Integer ’ Handle for measuring instrument
Dim Result As String ’ Buffer for simple results
Dim Digits As Byte ’ Number of digits of length indication
Dim TraceBytes As Long ’ Length of trace data in bytes
Dim TraceData(501) As Single ’ Buffer for floating point
’ Binary data
’ Set up connection to instrument
ud = RSDLLibfind("89.10.38.97", ibsta, iberr, ibcntl)
’ Query trace data in real format
Call RSDLLibwrt(ud, "FORM:DATA REAL,32", ibsta, iberr, ibcntl)
Call RSDLLibwrt(ud, "TRACE? TRACE1", ibsta, iberr, ibcntl)
’Read number of digits of length indication
Result = Space$(20)
Call RSDLLilrd(ud, Result, 2, ibsta, iberr, ibcntl)
Digits = Val(Mid$(Result, 2, 1))
’Read length indication
Result = Space$(20)
Call RSDLLilrd(ud, Result, Digits, ibsta, iberr, ibcntl)
TraceBytes = Val(Left$(Result, Digits)) ’and store
’ Read out trace data
Call RSDLLilrdTraceReal(ud, TraceData(0), TraceBytes, ibsta, iberr,ibcntl)
Programming examples:
•
In this example, the start frequency of the instrument is queried.
Dim ibsta As Integer ’ Status variable
Dim iberr As Integer ’ Error variable
Dim ibcntl As Long ’ Count variable
Dim ud As Integer ’ Handle for measuring instrument
Dim Response As String ’ Response string
’ Set up connection to measuring instrument
ud = RSDLLibfind("89.10.38.97", ibsta, iberr, ibcntl)
If (ud < 0) Then
’ Error treatment
End If
’ Send query command
Call RSDLLibwrt(ud, "FREQ:START?", ibsta, iberr, ibcntl)
’ Provide space for response
Response = Space$(100)
’ Read response from measuring instrument
Call RSDLLibrd(ud, Response, ibsta, iberr, ibcntl)
Содержание 1065.6000.20
Страница 3: ......
Страница 5: ......
Страница 17: ......
Страница 57: ...Contents Description of Commands FSE 1065 6016 12 I 6 4 E 16...
Страница 379: ...Contents Programming Examples FSE 1065 6016 12 I 7 2 E 1...
Страница 391: ......
Страница 393: ...Contents Maintenance and Instrument Interfaces FSE 1065 6016 12 I 8 2 E 15...
Страница 419: ......
Страница 421: ...Contents Error Messages FSE 1065 6016 12 I 9 2 E 1...
Страница 429: ......