From 2e4c59d3b59bc35e16cd335ed202795abc239e43 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 11 Oct 2016 09:09:04 +0200 Subject: [PATCH] Keithley Multimeter supports simulation mode. --- .../Keithley/Multimeter_2010_RS232/Multimeter.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TestBenchFramework/BenchControl/Keithley/Multimeter_2010_RS232/Multimeter.cs b/TestBenchFramework/BenchControl/Keithley/Multimeter_2010_RS232/Multimeter.cs index 974ea9e59..7cf80a64d 100644 --- a/TestBenchFramework/BenchControl/Keithley/Multimeter_2010_RS232/Multimeter.cs +++ b/TestBenchFramework/BenchControl/Keithley/Multimeter_2010_RS232/Multimeter.cs @@ -200,6 +200,8 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232 /// Run this device public void RunDeviceBefore() { + if (multimeterCfg.DebugLevel == DebugMode.Simulate) return; + receivedData.Append(serialPort.ReadExisting()); if (scanState == ScanState.Read_Receive) @@ -242,6 +244,8 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232 /// Run this device public void RunDeviceAfter() { + if (multimeterCfg.DebugLevel == DebugMode.Simulate) return; + switch (scanState) { case ScanState.Start_Reset: @@ -291,6 +295,8 @@ namespace TBF.BenchControl.Keithley.Multimeter_2010_RS232 /// Stop this device public void StopDevice() { + if (multimeterCfg.DebugLevel == DebugMode.Simulate) return; + serialPort.Close(); } }