Instructions
RIGOL  Chapter 5 Programming Examples 
5-14  RSA3000E Programming Guide 
j = InStr(strRet, "RSA") 
If (j >= 0) Then 
bFindRSA = True 
Exit For 
End If 
Call viFindNext(fList + i - 1, rsrcName(i)) 
Next i 
'Display 
If (bFindRSA = True) Then 
TxtInsAddr.Text = rsrcName(i) 
Else 
TxtInsAddr.Text = "" 
End If 
End Sub 
2)  Write Operation 
'Write the command to the instrument 
Private Sub CmdWrite_Click() 
If (TxtInsAddr.Text = "") Then 
MsgBox ("Please write the instrument address!") 
End If 
InstrWrite TxtInsAddr.Text, TxtCommand.Text 
End Sub 
3)  Read Operation 
'Read the return value from the instrument 
Private Sub CmdRead_Click() 
Dim strTemp As String 
strTemp = InstrRead(TxtInsAddr.Text) 
TxtReturn.Text = strTemp 
End Sub 
6.  Run the results. 
1)  Click Connect to search for the spectrum analyzer; 
2)  Input "*IDN?" in the "Command" edit box; 
3)  Click Write to write the command into the spectrum analyzer; 
4)  Click Read to read the return value. 
The execution result is as shown in the figure below. 










