3. Add three CommandButton controls to represent CH1, CH2 and CH3 respectively.
Add three Text controls (Label1(0), Label1(1), and Label1(2)) to represent the
status of the three channels respectively (it displays gray by default; when the
channel is enabled, it displays the color of the channel), as shown in the figure
below.
4. Click Project > Project1 Properties to open the Project1 – Project Properties
dialog box. In the dialog box, click on the General tab and select Form1 from the
drop-down button under Startup Object.
5. Double-click CH1 to enter the programming environment. Add the following
codes to control CH1-CH3. The codes of CH1 are as shown below; the codes of the
other channels 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 'Reserve the obtained device number
Dim s32Disp As Integer
' Obtain the usb resource of visa
Call viOpenDefaultRM(defrm)
Programming Examples
Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.
127
Содержание DP900 Series
Страница 1: ......
Страница 133: ...d Exit Programming Examples Copyright RIGOL TECHNOLOGIES CO LTD All rights reserved 125 ...
Страница 141: ......