Specifications
RIGOL Chapter 4 Programming Demos
4-30 M300 Programming Guide
MessageBox.Show(this, "Din't found any instrument! ", "Tip",
MessageBoxButtons.OK, MessageBoxIcon.Information);
txtM300Info.Text = "";
return;
}
// judge whether the instrument is M300 or not and dispaly M300 Information
for (int j = 0; (j < 10) && (DevResource[j] != null); j++)
{
if (DevResource[j].Substring(22, 4) == "M300")
{
CurrentDeviceM300 = DevResource[j];
break;
}
}
if (CurrentDeviceM300.Substring(22, 4) == "M300")
{
intFuncReturn = viOpen(g_i32RsrcManager, CurrentDeviceM300, 0, 3000, ref
g_i32VisaIO);
if (intFuncReturn >= 0)
{
Device_Send("*IDN?");
DevInfoReturn = ReadFromDev();
try
{
if (DevInfoReturn.Substring(0, 23) == "RIGOL TECHNOLOGIES,M300")
{
DevInfoReturn = DevInfoReturn + "\r\n";
for (int i = 0; i < 5; i++)
{
strSlotTemp = Convert.ToString(i + 1);
Device_Send(CMD_SYST_INFO[i]);
strCMDReturn[i] = ReadFromDev();
DevInfoReturn = DevInfoReturn + "Slot" + strSlotTemp + ":" +
strCMDReturn[i].Substring(19) + "\r\n";
}
txtM300Info.Text = DevInfoReturn;
}
else
{
viClose(g_i32VisaIO);
MessageBox.Show(this, "Not RIGOL M300! ", "Message",
MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Refresh();
}
}
catch
{
MessageBox.Show("The M300 information is not correct!", "Tip",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
Device_Send("*CLS");
}
}
else
{
viClose(g_i32VisaIO);