Specifications

RIGOL 3 Programming Demos
3-20 DS2000 Programming Guide
3-20
4. Open the General tab in ProjectProject1 Properties and select Form1 in
the Startup Object dropdown box.
5. Double-click CH1 to enter the programming environment and add the following
codes to realize the control of CH1 and CH2. Below are the codes of CH1 and the
codes of CH2 are similar.
Dim defrm As Long
Dim vi As Long
Dim strRes As String * 200
Dim list As Long
Dim nmatches As Long
Dim matches As String * 200 ' keep the acquisition device number
Dim s32Disp As Integer
' acquire the usb source of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' turn the device on
Call viOpen(defrm, matches, 0, 0, vi)
' send command to query the state of CH1
Call viVPrintf(vi, ":CHAN1:DISP?" + Chr$(10), 0)
' acquire the CH1 state
Call viVScanf(vi, "%t", strRes)
s32Disp = CInt(strRes)
If (s32Disp = 1) Then
' send the setting command
Call viVPrintf(vi, ":CHAN1:DISP 0" + Chr$(10), 0)