Chapter 3 Programming Examples RIGOL
MSO7000/DS7000 Programming Guide 3-15
viOpenDefaultRM (&defaultRM);
//Acquire the USB resource of VISA
viFindRsrc(defaultRM, "USB?*", &list,&nmatches, matches);
viOpen (defaultRM,matches,VI_NULL,VI_NULL,&vi);
//Send the command received
m_combox.GetLBText(m_combox.GetCurSel(),strTemp);
strTemp = strTemp + "\n";
stringTemp = (char*)(LPCTSTR)strTemp;
viPrintf (vi,stringTemp);
//Read the results
viScanf (vi, "%t\n", &buf);
//Display the results
UpdateData (TRUE);
m_receive = buf;
UpdateData (FALSE);
viClose (vi);
viClose (defaultRM);
9. Save, compile, and run the project to obtain a single exe file. When the oscilloscope is correctly
connected to the PC, enter a command (for example, *IDN?) and click Send and Read to execute the
command. Then, the reading results will be returned.