RIGOL
Programming Guide for DS1000E, DS1000D Series
3-20
8.
Add the codes.
Dblclick the
Button
, enter the programming environment. First of all, declare
“#include <visa.h>” in header file, 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 USB resource of visa
viFindRsrc(defaultRM, "USB?*", &list,&nmatches, matches);
viOpen (defaultRM,matches,VI_NULL,VI_NULL,&vi);
// send the receiving commands
m_combox.GetLBText(m_combox.GetCurSel(),strTemp);
strTemp = s "\n";
stringTemp = (char *)(LPCTSTR)strTemp;
viPrintf (vi,stringTemp);
// read the result
viScanf (vi, "%t\n", &buf);
// display the results
UpdateData (TRUE);
m_receive = buf;
UpdateData (FALSE);
viClose (vi);
viClose (defaultRM);
9.
Save, build and run the project, you will get an EXE file. When the oscilloscope
has been successfully connected with PC, choose a command such as
*IDN?
and click
“Send
a
nd Read”
, the oscilloscope will return the result.
Содержание DS1000E Series, DS1000D Series
Страница 1: ...RIGOL Programming Guide DS1000E DS1000D Series Digital Oscilloscope July 2009 RIGOL Technologies Inc ...
Страница 2: ......
Страница 6: ......
Страница 86: ...RIGOL Command Systems Programming Guide for DS1000E DS1000D Series 2 74 LA GROU1 SIZ The query returns SMALL ...
Страница 102: ......
Страница 129: ...Programming Guide for DS1000E DS1000D Series 3 27 After you set the Start event see the result below ...
Страница 132: ......