Specifications
Chapter 4 Programming Demos RIGOL
M300 Programming Guide 4-39
//Configure Alarm Channel
if(cmboxSource.Text != "")
{
strCommand = "OUTP:" + cmboxSource.Text + ":SOUR " + "(@" +
txtChannels.Text + ")";
Device_Send(strCommand);
}
//Confirm the measurement is same with the specified measurement for all of the
specified channels
strCommand = "CONF? " + "(@" + txtChannels.Text + ")";
Device_Send(strCommand);
Thread.Sleep(500);
strReturn = ReadFromDev();
strScanList = strReturn.Split(' ');
// the specified measurement is not suit for the specified channels
if (strReturn == "")
{
MessageBox.Show("ERRor:+305,Not able to perform requested operation");
return;
}
// the specified measurement is not suit for the specified channels
else
{
for (int i = 0; i < strScanList.Length-1; i++)
{
if (strScanList[i].Contains(strMeasurement))
{
bMeasIsSuit = true;
}
else
{
bMeasIsSuit = false;
break;
}
}
// the specified measurement is suit for the specified channels
if (bMeasIsSuit == true)
{
// Add the former channels and the specified channels to the scan list.
strChNum = strChNum + txtChannels.Text;
strCommand = "ROUT:SCAN " + "(@" + strChNum + ")";
Device_Send(strCommand);
Thread.Sleep(300);
}
else
{
MessageBox.Show("ERRor:+305,Not able to perform requested
operation");
return;
}
}
}
else
{
MessageBox.Show("please input channel number");
}
}
3) Remove the specified channel from the scan list.