status = viFindNext(*findList,instrDesc);
}
if (bFindDSG == false)
{
MessageBox("Didn't find any DSG!");
}
UpdateData(false);
}
b. Write Operation
void CDSG5000_DEMO_VCDlg::OnSend()
{
//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);
}
c. Read Operation
void CDSG5000_DEMO_VCDlg::OnRead()
{
//TODO: Add your control notification handler code here
UpdateData(true);
InstrRead(m_strInstrAddr,&m_strResult);
UpdateData(false);
}
8. Run the results.
a. Click Connect to find and connect the microwave signal generator. If the
instrument is successfully connected, the corresponding USB VISA descriptor
will be displayed in the address bar.
b. Input command in the "Command" edit box; for example, :SWE:DIR?.
c. Click Send to send the command.
d. Click Read to read the return value.
The execution result is as shown in the figure below.
Programming Examples
132
Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.