EasyManuals Logo
Home>Rigol>Test Equipment>DS2000E Series

Rigol DS2000E Series Programming Guide

Rigol DS2000E Series
365 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 #364 background imageLoading...
Page #364 background image
RIGOL 3 Programming Demos
3-18 DS2000E Programming Guide
8. Add codes.
Double-click Send and Read to enter the programming environment. Declare the #include
<visa.h> of the visa library in the header file and then add the following codes.
ViSession defaultRM, vi;
char buf [256] = {0};
CString s,strTemp;
char* stringTemp;
ViChar buffer [VI_FIND_BUFLEN];
ViRsrc matches=buffer;
ViUInt32 nmatches;
ViFindList list;
viOpenDefaultRM (&defaultRM);
// Acquire the USB resource of visa
viFindRsrc(defaultRM, "USB?*", &list,&nmatches, matches);
viOpen (defaultRM,matches,VI_NULL,VI_NULL,&vi);
viPrintf (vi, "*RST\n");
// Send the command received
m_combox.GetLBText(m_combox.GetCurSel(),strTemp);
strTemp = strTemp + "\n";
stringTemp = (char *)(LPCTSTR)strTemp;
viPrintf (vi,stringTemp);
// Read the result
viScanf (vi, "%t\n", &buf);
// Display the result
UpdateData (TRUE);
m_receive = buf;
UpdateData (FALSE);
viClose (vi);

Table of Contents

Other manuals for Rigol DS2000E Series

Questions and Answers:

Question and Answer IconNeed help?

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

Rigol DS2000E Series Specifications

General IconGeneral
BrandRigol
ModelDS2000E Series
CategoryTest Equipment
LanguageEnglish

Related product manuals