RIGOL
Chapter 3
Programming Examples
Programming Guide for DSA1000A series
3-32
}
int
main()
{
DemoForDSA demo;
char
temp[50];
if
(!demo.ConnectInstr())
{
cout<<
"can not connect the equipment!"
<<endl;
return
0;
}
else
{
cout<<
"\n
connect equipment success!"
<<endl;
cout<<
" the equipment address is :"
<<demo.m_strInstrAddr<<endl;
}
while
(1)
{
menudisplay();
//cin>>demo.m_strCommand;
cin.getline(temp,50);
demo.m_strCommand=temp;
if
(demo.m_strCommand[0]==
'r'
&& demo.m_strCommand[1]==
'e'
&& demo.m_strCommand[2]==
'a'
&&
demo.m_strCommand[3]==
'd'
)
{
//demo.InstrWrite(demo.m_strInstrAddr,"*IDN?");
//demo.InstrRead(demo.m_strInstrAddr,demo.m_strResult);
cout<<
"read result:"
<<demo.m_strResult<<endl;
demo.m_strResult=
""
;
}
else
if
(demo.m_strCommand[0]==
'w'
&&
demo.m_strCommand[1]==
'r'
&& demo.m_strCommand[2]==
'i'
&& demo.m_strCommand[3]==
't'
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...