User manual
Chapter 4 Programming Examples RIGOL
DP700 Programming Guide 4-9
serialPort.StopBits = StopBits.One;
}
//Initialize the parity
if (checkBox.Text.Trim() == "None")
{
serialPort.Parity = Parity.None;
}
else if (checkBox.Text.Trim() == "Odd")
{
serialPort.Parity = Parity.Odd;
}
else
{
serialPort.Parity = Parity.Even;
}
try
{
serialPort.Open();
}
catch (Exception)
{
MessageBox.Show("Error!");
}
}
6. Run the results.
(1) Select a serial port from the "COM1" drop-down list box.
(2) Click "Open Serial".
(3) Click "Open Power".
Run the results: the output of the power supply is turned on. The "Open Power" button is changed to
the "Close Power" button.