RIGOL
Chapter 3
Programming Examples
Programming Guide for DSA1000A series
3-14
If (status < VI_SUCCESS) Then
MsgBox "
Failed to read from the instrument! "
Exit Function
End If
'Close the system
status = viClose(sesn)
status = viClose(dfltRM)
'
Remove the space at the end of the string
strTemp1 = Left(strTemp0, rSize)
InstrRead = strTemp1
End Function
5.
Add control event codes
1)
Connect the instrument
'
Connect to the instrument
Private Sub CmdConnect_Click()
Const MAX_CNT = 200
Dim status As Long
Dim dfltRM As Long
Dim sesn As Long
Dim fList As Long
Dim buffer As String * MAX_CNT, Desc As String * 256
Dim nList As Long, retCount As Long
Dim rsrcName(19) As String * VI_FIND_BUFLEN, instrDesc As String *
VI_FIND_BUFLEN
Dim i, j As Long
Dim strRet As String
Dim bFindDSA As Boolean
„Initialize the system
status = viOpenDefaultRM(dfltRM)
'
Initialize failed
If (status < VI_SUCCESS) Then
MsgBox "
No VISA resource was opened
!
"
Exit Sub
End If
Summary of Contents for DSA1000A Series
Page 1: ...RIGOL Programming Guide DSA1000A Series Spectrum Analyzer May 2011 RIGOL Technologies Inc...
Page 2: ......
Page 14: ......
Page 137: ...Chapter 3 Programming Examples RIGOL Programming Guide for DSA1000A series 3 3...
Page 154: ...RIGOL Chapter 3 Programming Examples Programming Guide for DSA1000A series 3 20 6 Exit code...
Page 158: ...RIGOL Chapter 3 Programming Examples Programming Guide for DSA1000A series 3 24...