RIGOL
Chapter 3
Programming Examples
Programming Guide for DSA1000A series
3-8
status = viRead(instr, RecBuf, MAX_REC_SIZE, &retCount);
//close the system
status = viClose(instr);
status = viClose(defaultRM);
(*pstrResult).Format("%s",RecBuf);
return bReadOK;
}
7.
Add the control message in order to response to codes.
1)
Connect the instrument
void CDemoForDSADlg::OnBtConnectInstr()
//
Connect to the instrument
{
// TODO: Add your control notification handler code here
ViStatus status;
ViSession defaultRM;
ViString expr = "?*";
ViPFindList findList = new unsigned long;
ViPUInt32 retcnt = new unsigned long;
ViChar instrDesc[1000];
CString strSrc = "";
CString strInstr = "";
unsigned long i = 0;
bool bFindDSA = false;
status = viOpenDefaultRM(&defaultRM);
if (status < VI_SUCCESS)
{
// Error Initializing VISA...exiting
MessageBox("No VISA instrument was opened ! ");
return ;
}
memset(instrDesc,0,1000);
//
Find resource
Summary of Contents for DSA1000A Series
Page 1: ...RIGOL Programming Guide DSA1000A Series Spectrum Analyzer May 2011 RIGOL Technologies Inc...
Page 2: ......
Page 14: ......
Page 137: ...Chapter 3 Programming Examples RIGOL Programming Guide for DSA1000A series 3 3...
Page 154: ...RIGOL Chapter 3 Programming Examples Programming Guide for DSA1000A series 3 20 6 Exit code...
Page 158: ...RIGOL Chapter 3 Programming Examples Programming Guide for DSA1000A series 3 24...