Rigol DS1000D Instrukcja Użytkownika Strona 126

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 137
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 125
RIGOL
Programming Guide for DS1000E, DS1000D Series
3-22
4. Choose ProjectProject1 PropertiesGeneral, select Form1 from the
drop down box of Startup Object.
5. Dblclick CH1 button to enter the programming environment, add the following
codes to achieve the control to it. (for CH2, the method is 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 ' reserve to acquire the equipment ID.
' acquire USB resource of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' open the equipment
Call viOpen(defrm, matches, 0, 0, vi)
' send the command to query the state of CH1
Call viVPrintf(vi, ":CHAN1:DISP?" + Chr$(10), 0)
' get the state of CH1
Call viVScanf(vi, "%t", strRes)
If Left(strRes, 2) = "ON" Then
' send the setting command
Call viVPrintf(vi, ":CHAN1:DISP 0" + Chr$(10), 0)
Label1(0).ForeColor = &H808080 ' gray
Else
Call viVPrintf(vi, ":CHAN1:DISP 1" + Chr$(10), 0)
Label1(0).ForeColor = &HFFFF& ' yellow
End If
' close the resource
Call viClose(vi)
Call viClose(defrm)
Przeglądanie stron 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 136 137

Komentarze do niniejszej Instrukcji

Brak uwag