Specifications
RIGOL Chapter 4 Programming Demos
4-38 M300 Programming Guide
//Configure Scaling
if (chkEnableScaling.Checked == true)
{
// Set the square parameter of scaling
strCommand = "CALC:SCAL:SQU " + txtA.Text+ ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
// Set the gain parameter of scaling
strCommand = "CALC:SCAL:GAIN " + txtB.Text + ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
// Set the offset parameter of scaling
strCommand = "CALC:SCAL:OFFS " + txtC.Text + ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
// Set the constant parameter of scaling
strCommand = "CALC:SCAL:CONS " + txtX1.Text + ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
// Enable the function of scaling
strCommand = "CALC:SCAL:STAT ON" + ",(@" + txtChannels.Text + ")";
Device_Send(strCommand);
}
else { }
//Configure Upper Alarm
if (chkEnaUpperLimit.Checked == true)
{
if (txtUpper.Text != "")
{
strCommand = "CALC:LIM:UPP " + txtUpper.Text + ",(@" +
txtChannels.Text + ")";
Device_Send(strCommand);
strCommand = "CALC:LIM:UPP:STAT ON" + ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
}
else
{
MessageBox.Show("please input the upper limit");
}
}
//Configure Lower Alarm
if (chkEnalowerLimit.Checked == true)
{
if (txtLower.Text != "")
{
strCommand = "CALC:LIM:LOW " + txtLower.Text + ",(@" +
txtChannels.Text + ")";
Device_Send(strCommand);
strCommand = "CALC:LIM:LOW:STAT ON" + ",(@" + txtChannels.Text +
")";
Device_Send(strCommand);
}
else
{
MessageBox.Show("please input the lower limit");
}
}