RIGOL Chapter 4 Programming Instances
4-14 DL3000 Programming Guide
8. Add codes.
Double-click Send and Read to enter the programming environment. Declare the VISA library
"#include <visa.h>" in the header file and then add the following codes:
ViSessiondefaultRM, vi;
charbuf [256] = {0};
CStrings,strTemp;
char* stringTemp;
ViChar buffer [VI_FIND_BUFLEN];
ViRsrc matches=buffer;
ViUInt32 nmatches;
ViFindList list;
viOpenDefaultRM (&defaultRM);
//obtain 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 received command
m_combox.GetLBText(m_combox.GetCurSel(),strTemp);