Specifications
Chapter 4 Programming Demos RIGOL
M300 Programming Guide 4-41
MessageBox.Show("Please input command", "Tip", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
5) Initiate a scan.
private void btnInitScan_Click(object sender, EventArgs e)
{
string strCommand = "INIT";
Device_Send(strCommand);
}
6) Query the configuration of the scan list.
private void btnQueryScanlist_Click(object sender, EventArgs e)
{
string strCommand = "*IDN?";
string strReturn = "";
//make sure M300 is connected to PC
try
{
Device_Send(strCommand);
strReturn = ReadFromDev();
if (strReturn == "")
{
throw new ArgumentNullException();
}
}
catch
{
MessageBox.Show("Please make sure the M300 was connected");
return;
}
strCommand = "CONF?";
Device_Send(strCommand);
Thread.Sleep(300);
strReturn = ReadFromDev();
txtReadFromM300.Text = strReturn;
}
7) Enable the monitor mode.
private void btnMonitorON_Click(object sender, EventArgs e)
{
string strCommand = "ROUte:MON:STAT ON";
Device_Send(strCommand);
}
8) Disable the monitor mode.
private void btnMonitorOFF_Click(object sender, EventArgs e)
{
string strCommand = "ROUte:MON:STAT OFF";
Device_Send(strCommand);
}
9) Query the system error.
private void btnSysError_Click(object sender, EventArgs e)
{
string strCommand = "*IDN?";
string strReturn = "";
//make sure M300 is connected to PC
try
{
Device_Send(strCommand);