EasyManuals Logo

Rigol DS1204B Programming Guide

Rigol DS1204B
152 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #141 background imageLoading...
Page #141 background image
Programming Examples RIGOL
Programming Guide for DS1000B Series
3-9
5. Dblclick CH1 button to enter the programming environment, add the following
codes to achieve the control to it. (for CH2, CH3 and CH4, the methods are
similar)
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 ' reserve to acquire the equipment ID.
' acquire USB resource of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' open the equipment
Call viOpen(defrm, matches, 0, 0, vi)
' send the command to query the state of CH1
Call viVPrintf(vi, ":CHAN1:DISP?" + Chr$(10), 0)
' get the state of CH1
Call viVScanf(vi, "%t", strRes)
If strRes = 1 Then
' send the setting command
Call viVPrintf(vi, ":CHAN1:DISP 0" + Chr$(10), 0)
Label1(0).ForeColor = &H808080 ' gray
Else
Call viVPrintf(vi, ":CHAN1:DISP 1" + Chr$(10), 0)
Label1(0).ForeColor = &HFFFF& ' yellow
End If
' close the resource
Call viClose(vi)
Call viClose(defrm)
6. Save and run the project, you will get a single executable program about demo.
When the oscilloscope has been successfully connected with PC, you can
open/close each channel conveniently by clicking the button.

Other manuals for Rigol DS1204B

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Rigol DS1204B and is the answer not in the manual?

Rigol DS1204B Specifications

General IconGeneral
BrandRigol
ModelDS1204B
CategoryTest Equipment
LanguageEnglish

Related product manuals