RIGOL
Chapter 4 Programming Examples
4-16
DG900 Programming Guide
5.
Double-click CH1 to enter the programming environment. Add the following codes to control CH1 and
CH2. The codes of CH1 are as shown below; 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
' Obtain the usb resource of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' Turn on the instrument
Call viOpen(defrm, matches, 0, 0, vi)
' Send a command to query the status of CH1
Call viVPrintf(vi, ":OUTP1?" + Chr$(10), 0)
' Acquire the status of CH1
Call viVScanf(vi, "%t", strRes)
If strRes = "ON" Then
' Send the setting command
Call viVPrintf(vi, ":OUTP1 OFF" + Chr$(10), 0)
Label1(0).ForeColor = &H808080 'Gray
Else
Call viVPrintf(vi, ":OUTP1 ON" + Chr$(10), 0)
Label1(0).ForeColor = &HFFFF& 'Yellow
End If
Содержание DG952
Страница 2: ......
Страница 168: ......
Страница 181: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 7 ...
Страница 185: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 11 ...
Страница 187: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 13 ...
Страница 199: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 25 ...
Страница 200: ......