Rigol DS7034 User Programming Manual page 255

Mso7000 series; ds7000 series; digital oscilloscope
Hide thumbs Also See for DS7034:
Table of Contents

Advertisement

Chapter 3 Programming Examples
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
Dim s32Disp As Integer
' Obtain the usb resource of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' Turn on the instrument
Call viOpen(defrm, matches, 0, 0, vi)
' Send a command to query the status of CH1
Call viVPrintf(vi, ":CHAN1:DISP?" + Chr$(10), 0)
' Obtain the status of CH1
Call viVScanf(vi, "%t", strRes)
s32Disp = CInt(strRes)
If (s32Disp = 1) Then
' Send the setting command
Call viVPrintf(vi, ":CHAN1:DISP 0" + Chr$(10), 0)
Label1(0).ForeColor = &H808080
Else
Call viVPrintf(vi, ":CHAN1:DISP 1" + Chr$(10), 0)
Label1(0).ForeColor = &HFFFF&
End If
' Close the resource
Call viClose(vi)
Call viClose(defrm)
6.
Save and run the project to obtain a single exe program for demo. When the oscilloscope is correctly
connected to the PC, you can control the on/off status of any channel.
MSO7000/DS7000 Programming Guide
' Reserve the obtained device number
'Gray
'Yellow
RIGOL
3-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ds7054Ds7024Ds7014Mso7034Mso7024Mso7014 ... Show all

Table of Contents