Visual Basic Programming Demo - Rigol DS1000Z Series Programming Manual

Digital oscilloscope
Hide thumbs Also See for DS1000Z Series:
Table of Contents

Advertisement

Chapter 3 Programming Demos

Visual Basic Programming Demo

The program used in this demo: Visual Basic 6.0
The function realized in this demo: control the on/off state of any channel.
Enter Visual Basic 6.0 and operate according to the following steps:
1.
Build a standard application program project (Standard EXE) and name it as Demo.
2.
Click the Existing tab of ProjectAdd Module. Search for the visa32.bas file in the include folder
under the NI-VISA installation path and add the file.
3.
Add four CommandButton controls to represent CH to CH4 respectively. Add four Label controls
(Label1(0), Label1(1), Label1(2) and Label1(3)) to represent the status of CH1 to CH4 respectively
(when the channel is enabled, it dispays the color of the channel; when the channel is disabled, it
displays gray).The layout of the controls is as shown in the figure below.
Open the General tab in ProjectProject1 Properties and select Form1 in the Startup Object
4.
dropdown box.
5.
Double-click CH1 to enter the programming environment. Add the following codes to control CH1 to
CH4. The codes of CH1 are as shown below; the codes of 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
DS1000Z Programming Guide
RIGOL
3-13

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ds1104zDs1074zDs1104z-sDs1074z-s

Table of Contents