RIGOL DS1000D User Manual

Page 118

Advertising
background image

RIGOL

Programming Guide for DS1000E, DS1000D Series

3-14


Read_USB = rSize

End Function

6. Dblclick CH1 and add the following codes:

Dim i As Long
Dim sendbuf As String
Dim DataLen As Long
Dim stepW As Integer
Dim stepH As Integer

sendbuf = ":WAV:DATA? CHAN1"

'initialize the USB device
i = GetTMCDeviceNum

'send a query command and read the results
Call SendToUSB(sendbuf)
DataLen = Read_USB()
stepW = Picture1.Width
stepH = Picture1.Height / 256

'clear the waveform

Picture1.Cls
For i = 0 To DataLen - 1

'link the waveform points and set the waveform color to yellow
Picture1.Line ((i * stepW / DataLen), (rcv_buffer(i)) * stepH)-(((i + 1) * stepW /

DataLen), (rcv_buffer((i + 1))) * stepH), &HFFFF&

Next i

Note: Codes of CH2 are similar to CH1, users can modify homologous

parameters to get its codes and add them to CH2.


Advertising
This manual is related to the following products: