RIGOL DS1000D User Manual

Page 116

Advertising
background image

RIGOL

Programming Guide for DS1000E, DS1000D Series

3-12

Example 2: Read the waveform data


This example shows you how to create a Demo to read the waveform data.
Open Visual Basic 6.0, take the following steps:

1. Create a Standard EXE project and copy the Dynamic Link Library

RigolTMCUsb_UI.dll from Demo files into the new project for easier use.

2. Named Form1 “Demo”. Then add two Commandbuttons (CH1 and CH2) and

a PictureBox for showing the waveform data about CH1 and CH2, please see
the figure below:

3. Project→Add Module, create a Module for declaring the global variable

rcv_buffer as follows:

Global rcv_buffer(10240) As Byte

Note: For the waveform data returned from the oscilloscope are too much to
save, please use this buffer.

4. Enter into the programming environment, then, quote the functions

(ReadUSB,WriteUSB,GetDeviceNum) in the Dynamic Link Library
RigolTMCUsb_UI.dll
and add the following codes in the area of project code:

Private Declare Function ReadUSB Lib "RigolTMCUsb_UI.dll" (ByVal Index As
Long, ByVal lpszLength As Long, ByVal lpszBuffer As Long) As Boolean

Private Declare Function WriteUSB Lib "RigolTMCUsb_UI.dll" (ByVal Index As
Long, ByVal msgid As Long, ByVal tag As Long, ByVal length As Long, ByVal

Advertising
This manual is related to the following products: