Keithley.Multimeter_2010_RS232.Multimeter shut-down bug fix, ver. 2.12.536

This commit is contained in:
Milan Hanajik 2017-04-10 12:11:20 +02:00
parent 460b40c9cd
commit 71cc77bee1
2 changed files with 9 additions and 5 deletions

View File

@ -200,7 +200,7 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232
/// <summary>Run this device</summary>
public void RunDeviceBefore()
{
if (multimeterCfg.DebugLevel == DebugMode.Simulate) return;
if (serialPort == null) return;
receivedData.Append(serialPort.ReadExisting());
@ -244,7 +244,7 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232
/// <summary>Run this device</summary>
public void RunDeviceAfter()
{
if (multimeterCfg.DebugLevel == DebugMode.Simulate) return;
if (serialPort == null) return;
switch (scanState)
{
@ -297,7 +297,11 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232
{
if (multimeterCfg.DebugLevel == DebugMode.Simulate) return;
serialPort.Close();
if (serialPort != null)
{
serialPort.Close();
serialPort = null;
}
}
}
}

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.12.535.1")]
[assembly: AssemblyFileVersion("2.12.535.1")]
[assembly: AssemblyVersion("2.12.536.1")]
[assembly: AssemblyFileVersion("2.12.536.1")]