Instructions

RIGOL Chapter 4 Programming Examples
4-24 DG2000 Programming Guide
{
// TODO: Add your control notification handler code here
UpdateData(true);
if (m_strInstrAddr.IsEmpty())
{
MessageBox("Please connect to the instrument first!");
}
InstrWrite(m_strInstrAddr,m_strCommand);
m_strResult.Empty();
UpdateData(false);
}
3) Read Operation
void CDG2000_Demo_VCDlg::OnRead()
{
// TODO: Add your control notification handler code here
UpdateData(true);
InstrRead(m_strInstrAddr,&m_strResult);
UpdateData(false);
}
8. Run the program and enter the following operation interface.
Perform the following steps:
1) Click the Connect button to search for the signal generator and connect it;
2) Input "*IDN?" in the "Command" edit box;
3) Click the Send button to send the command;
4) Click Read to read the returned value.
The execution result is as shown in the figure below.