Specifications

RIGOL Chapter 4 Programming Demos
4-40 M300 Programming Guide
private void btnRemoveChannel_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;
}
//Remove the specified channelfrom scanlist
if (cmboxScanlist.Text != "")
{
strCommand = "ROUT:SCAN:REM " + "(@" + cmboxScanlist.Text + ")";
Device_Send(strCommand);
}
else
{
MessageBox.Show("Please Select the channel to remove from the scan list");
}
}
4) Send command.
private void btnSend_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;
}
if (txtSendCommand.Text != "")
{
Device_Send(txtSendCommand.Text);
}
else
{