Rigol DS1000D Instrukcja Użytkownika Strona 124

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 137
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 123
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 = strTemp + "\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 and Read”, the oscilloscope will return the result.
Przeglądanie stron 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 136 137

Komentarze do niniejszej Instrukcji

Brak uwag