Rigol DS2000 Series Specifikace Strana 615

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 616
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 614
3 Programming Demos RIGOL
DS2000 Programming Guide
3-25
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 source 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);
viClose (defaultRM);
Zobrazit stránku 614
1 2 ... 610 611 612 613 614 615 616

Komentáře k této Příručce

Žádné komentáře