Chapter 4 Programming Examples
RIGOL
DG900 Programming Guide
4-15
Visual Basic Programming Example
Program used in this example: Visual Basic 6.0
Function realized in this example: enable the two channels of the signal generator and show the
corresponding colors of the channels.
1.
Run Visual Basic 6.0, and build a standard application program project (Standard EXE), and name it
"DG900_Demo_VB".
2.
Click Project
Add Module to open the Add Module dialog box. In the dialog box, click the
Existing tab to search for the visa32.bas file from the "include" folder under the NI-VISA installation
path and add the file.
3.
Add two Command Button controls to represent CH1 and CH2 respectively. Add two Label controls
(Label1(0) and Label1(1)) to represent the status of the two channels respectively (by default, the
Label control is gray; when the channel is enabled, it displays the corresponding color of the channel).
The layout of the controls is 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 list under Startup
Object.
Summary of Contents for DG952
Page 2: ......
Page 168: ......
Page 181: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 7 ...
Page 185: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 11 ...
Page 187: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 13 ...
Page 199: ...Chapter 4 Programming Examples RIGOL DG900 Programming Guide 4 25 ...
Page 200: ......