diff --git a/Common/.shared/NlogConfig.xml b/Common/.shared/NlogConfig.xml
index 2943dea5..454f2fee 100644
--- a/Common/.shared/NlogConfig.xml
+++ b/Common/.shared/NlogConfig.xml
@@ -9,15 +9,15 @@
-
-
-
-
+
+
+
+
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFlux.cs b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFlux.cs
index 900a6477..f336d76d 100644
--- a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFlux.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFlux.cs
@@ -56,12 +56,6 @@ namespace XYLEM
/// Like 9600 (default on RS485)
/// Like Parity.Even (default on RS485)
///
- Boolean Connect(string comport, UInt16 id, UInt32 baudRate, Parity parity);
-
- ///
- /// Close communication connection to Meter
- ///
- /// true on okay or false on error
- Boolean CloseConnection();
+ Boolean Connect(string comport, UInt16 id, UInt32 baudRate, Parity parity);
}
}
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxAPI.cs b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxAPI.cs
index b6c16d95..9b7a7e94 100644
--- a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxAPI.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxAPI.cs
@@ -1,11 +1,11 @@
-using System.IO.Ports;
+using System;
+using System.IO.Ports;
using XYLEM.Device;
namespace XYLEM
{
public interface IMagFluxAPI
{
-
///
/// Make communication connection to Meter
///
@@ -36,5 +36,12 @@ namespace XYLEM
/// Return a MagFlux device or "null" if failing connect
/// if the configuration is not valid
IMagFluxRequestProtocol Connect(string comport, ushort id, uint baudRate, Parity parity, string log_path = null, RUN_TYPE runAs = RUN_TYPE.Normal);
+
+ ///
+ /// Close communication connection to all Meters and clean up for a fresh connection of all devices.
+ /// Note to continue, all devices needs initialized to be reconnected with Connect(...)
+ ///
+ /// true on okay or false on error
+ Boolean CloseConnections();
}
}
\ No newline at end of file
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxRequestProtocol.cs b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxRequestProtocol.cs
index 0e48929e..afc8440a 100644
--- a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxRequestProtocol.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/api_doc/IMagFluxRequestProtocol.cs
@@ -16,6 +16,20 @@ namespace XYLEM
/// true if yes
Boolean IsConnected();
+ ///
+ /// Close communication connection to Meter
+ ///
+ /// true on okay or false on error
+ Boolean CloseConnection();
+
+ ///
+ /// Try reconnect communication to a Meter that already had a communication connection
+ /// Note: will reuse already used communication settings and CloseConnection() is not already closed before call.
+ /// Used for reestablished communication to Meter when fail to respond during normal operation
+ ///
+ /// true on okay or false on error
+ Boolean Reconnect();
+
///
/// Get current device Modbus ID / Device Address
///
@@ -147,6 +161,22 @@ namespace XYLEM
/// true on okay or false on error
Boolean GetFlowRate_lps(out Single value_out);
+
+ ///
+ /// Average Electrode measurement used for Device calibration verification
+ ///
+ /// Average Electrode [mV]
+ /// true on okay or false on error
+ Boolean GetAverage_Electrode_mV(out Single value_out);
+
+ ///
+ /// Standard deviation electrode measurement used for Device calibration verification
+ /// Note: update will only happen after x seconds, depending on filter config in device
+ ///
+ /// Average Electrode [mV]
+ /// true on okay or false on error
+ Boolean GetStdDev_Electrode_mV(out Single value_out);
+
///
/// !!! Warning make sure to turn off simulation, when calibration off sensor is done !!!
/// ----
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/magflux_api.dll b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/magflux_api.dll
index 64799264..a6aa83ca 100644
Binary files a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/magflux_api.dll and b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/magflux_api.dll differ
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/shared_code.dll b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/shared_code.dll
index 46e9859e..418ba806 100644
Binary files a/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/shared_code.dll and b/Common/Hardware/WaterMeter/MagFlux/MagFluxApi/shared_code.dll differ
diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs b/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
index 9eee69f4..792844db 100644
--- a/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
@@ -37,6 +37,14 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
{
#region Variables and Properties
+ /////
+ ///// Reminder for ignore empty pipe detection
+ /////
+ //private Boolean _lastIgnoreEmptyPipeDetection;
+ /////
+ ///// Reminder for simulated flow
+ /////
+ //private Boolean _lastSimulatedFlowActive;
///
/// Reminder for status bits
///
@@ -51,6 +59,20 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
///
private Boolean _enableRawDataLogging;
+ ///
+ /// Simulated flow activity
+ ///
+ public Boolean SimulatedFlowIsActive
+ {
+ get; set;
+ }
+ ///
+ /// Empty pipe ignore
+ ///
+ public Boolean IgnoreEmptyPipeDetection
+ {
+ get; set;
+ }
///
/// to reduce the IrdA communication in test bench, preparation will be done once (when SkipPreparationForTestBench is true)
///
@@ -123,6 +145,22 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
get; private set;
}
+ ///
+ /// Average of the electrode in milli Volts
+ ///
+ public Single AverageElectrode_mV
+ {
+ get; private set;
+ }
+
+ ///
+ /// Standard deviation of the electrode in milli Volts
+ ///
+ public Single StandardDeviationElectrode_mV
+ {
+ get; private set;
+ }
+
///
/// Represents Empty Pipe Detection control bits
/// Bit0="EPD disabled", 1="Enabled w. Flags only", 2="EPD enabled full"
@@ -300,6 +338,7 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
private readonly CancellationTokenSource _keepSessionToken = new CancellationTokenSource();
private ILogger _logger;
+ //private ILogger _loggerRawData;
#endregion
@@ -859,9 +898,21 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
{
EpdControlBits = epd_cntl_bits;
}
-
- RequestProtocol?.GetCalibrationPoints(out _);
- StreamingProtocol?.SetDecodingMask(SensorSerialNo, uniqueId);
+ if (RequestProtocol.GetStdDev_Electrode_mV(out var u_mV))
+ {
+ StandardDeviationElectrode_mV = u_mV;
+ }
+ if (RequestProtocol.GetAverage_Electrode_mV(out u_mV))
+ {
+ AverageElectrode_mV = u_mV;
+ }
+
+ SimulatedFlowIsActive = RequestProtocol.IsSimulatedFlowActive();
+ IgnoreEmptyPipeDetection = RequestProtocol.GetIgnoreFailOnEmptyPipeOnHealthy();
+
+ RequestProtocol.GetCalibrationPoints(out _);
+ StreamingProtocol.SetDecodingMask(SensorSerialNo, uniqueId);
+
return IsLoggedOn;
}
@@ -886,7 +937,7 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
}
else
{
- WriteLog("Wait on measurement start");
+ WriteLog($"Slot:{Slot} - Wait on measurement start");
}
ProcessStatus = ProcessState.WaitForMeasurement;
}
@@ -937,7 +988,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
}
///
- ///
public List GetAllMeasurementResults(Double? refVolume, Double? refTimeS, Boolean intermediateMeasurement = false,
Int32? channel = null, MeasurementDirection dir = MeasurementDirection.TakeBoth)
{
@@ -1052,7 +1102,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
///
public void WriteCalibration(List calibrationsCmPerH)
{
- _logger.Info($"Slot:{Slot} - Write calibration values to MagFlux");
RequestProtocol?.SetCalibrationPoints(calibrationsCmPerH);
RequestProtocol?.CloseConnection();
}
@@ -1062,40 +1111,58 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
public void ReadCalibration(out List calibrationsCmPerH)
{
calibrationsCmPerH = null;
- _logger.Info($"Slot:{Slot} - Read calibration values from MagFlux");
RequestProtocol?.GetCalibrationPoints(out calibrationsCmPerH);
RequestProtocol?.CloseConnection();
}
- /////
- ///// Turn on/off fixed test flow output from MagFlux
- ///// Used for getting a fixed simulated flow from MagFlux
- /////
- /////
- ///// true on okay or false on error
- //public Boolean SetSimulatedFlowActive(Boolean testFlowOn)
- //{
- // _logger.Info($"Slot:{Slot} - Set test flow");
- // return RequestProtocol.SetSimulatedFlowActive(on);
- //}
+ ///
+ /// Average Electrode measurement used for Device calibration verification
+ ///
+ /// Average Electrode [mV]
+ /// true on okay or false on error
+ public Boolean GetAverage_Electrode_mV(out Single u_mV)
+ {
+ u_mV = 0;
+ var retVal = RequestProtocol.GetAverage_Electrode_mV(out u_mV);
+ AverageElectrode_mV = u_mV;
+ return retVal;
+ }
- /////
- ///// Is the fixed test flow active
- ///// Used for getting a fixed simulated flow from MagFlux
- /////
- ///// true if ON
- //public Boolean IsSimulatedFlowActive()
- //{
- // _logger.Info($"Slot:{Slot} - Get test flow setting");
- // return RequestProtocol.IsSimulatedFlowActive();
- //};
+ ///
+ /// Standard deviation electrode measurement used for Device calibration verification
+ /// Note: update will only happen after x seconds, depending on filter config in device
+ ///
+ /// Average Electrode [mV]
+ /// true on okay or false on error
+ public Boolean GetStdDev_Electrode_mV(out Single u_mV)
+ {
+ u_mV = 0;
+ //_logger.Info($"Slot:{Slot} - Read standard deviation of electrode voltage");
+ var retVal = RequestProtocol.GetStdDev_Electrode_mV(out u_mV);
+ StandardDeviationElectrode_mV = u_mV;
+ return retVal;
+ }
+
+ ///
+ /// Ignore Empty pipe flag on Healthy, because it is not yet working correct
+ /// Note: Not 100% secure all test is working during empty pipe, metrology board firmware may not allow running during detection of empty pipe
+ ///
+ ///
+ /// true on okay or false on error
+ public Boolean SetIgnoreFailOnEmptyPipeOnHealthy(Boolean ignoreEmptyPipeStatus)
+ {
+ //_logger.Info($"Slot:{Slot} - Set ignore empty pipe status");
+ var retVal = RequestProtocol.SetIgnoreFailOnEmptyPipeOnHealthy(ignoreEmptyPipeStatus);
+ if (retVal)
+ IgnoreEmptyPipeDetection = ignoreEmptyPipeStatus;
+ return retVal;
+ }
///
/// Set PCB settings and PCB calibrations to default.
///
public Boolean SetPCBToDemoDefaults()
{
- _logger.Info($"Slot:{Slot} - Set PCB settings and PCB calibrations to default");
if (RequestProtocol == null)
return false;
var retVal = RequestProtocol.SetPCBToDemoDefaults();
@@ -1108,7 +1175,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
///
public Boolean SetMeterSizeMm(UInt16 meterSize_mm)
{
- _logger.Info($"Slot:{Slot} - Set meter size in mm");
if (RequestProtocol == null)
return false;
var retVal = RequestProtocol.SetMeterSizeMm(meterSize_mm);
@@ -1121,7 +1187,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
///
public Boolean SetSensorSerialNo(UInt32 sensorSerialNo)
{
- _logger.Info($"Slot:{Slot} - Set sensor serial no.");
if (RequestProtocol == null)
return false;
var retVal = RequestProtocol.SetSensorSerialNo(sensorSerialNo);
@@ -1132,7 +1197,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
///
public void InitCalibration()
{
- _logger.Info($"Slot:{Slot} - Init calibration and set calibration values of all channels to default");
if (RequestProtocol == null)
return;
if (RequestProtocol.PrepareDeviceForCalibration())
@@ -1194,6 +1258,12 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
public void WriteLog(String text)
{
_logger.Info($"Slot:{Slot} - {text}");
+ }
+
+ ///
+ public void LogRawData(Boolean on)
+ {
+ _enableRawDataLogging = on;
//if (_enableRawDataLogging)
//{
// if (_loggerRawData == null)
@@ -1202,14 +1272,7 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
// StreamingPort.GetPortName(), "", "LedRawData", "TargetLedRawDataBase", "LedRawDataBase");
// }
- // _loggerRawData.Info($"{text}");
//}
- }
-
- ///
- public void LogRawData(Boolean on)
- {
- _enableRawDataLogging = on;
if (StreamingPort is LedSerialPort port)
{
port.RecordStreamingRawData = _enableRawDataLogging;
diff --git a/Common/Hardware/WaterMeter/MagFlux/Protocols/RequestProtocol/RequestProtocol.cs b/Common/Hardware/WaterMeter/MagFlux/Protocols/RequestProtocol/RequestProtocol.cs
index 3c7562f7..d270b997 100644
--- a/Common/Hardware/WaterMeter/MagFlux/Protocols/RequestProtocol/RequestProtocol.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/Protocols/RequestProtocol/RequestProtocol.cs
@@ -137,21 +137,21 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
return retVal;
}
- /////
- ///// Wrapper to get the simulated flow setting
- /////
- /////
- /////
- ///// - Initial
- /////
- //public Boolean GetSimulatedFlowOn()
- //{
- // if (_magFluxRequestProtocol == null) return false;
- // var retVal = _magFluxRequestProtocol.IsSimulatedFlowActive();
- // _logger.Debug(retVal ? $"{_ident} Simulated flow active read back returns: true" :
- // $"{_ident} Read back simulated flow status failed!");
- // return retVal;
- //}
+ ///
+ /// Wrapper to get the simulated flow setting
+ ///
+ ///
+ ///
+ /// - Initial
+ ///
+ public Boolean IsSimulatedFlowActive()
+ {
+ if (_magFluxRequestProtocol == null)
+ return false;
+ var retVal = _magFluxRequestProtocol.IsSimulatedFlowActive();
+ _logger.Debug($"{_ident} Simulated flow active read back returns: {retVal}");
+ return retVal;
+ }
/////
///// Wrapper to set the simulated flow setting
@@ -163,45 +163,48 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
/////
//public Boolean SetSimulatedFlowActive(Boolean on)
//{
- // if (_magFluxRequestProtocol == null) return false;
+ // if (_magFluxRequestProtocol == null)
+ // return false;
// var retVal = _magFluxRequestProtocol.SetSimulatedFlowActive(on);
- // _logger.Debug(retVal ? $"{_ident} Simulated flow active set to: {on}" :
+ // _logger.Debug(retVal ? $"{_ident} Simulated flow active set to: {on}" :
// $"{_ident} Simulated flow active setup failed!");
// return retVal;
//}
- /////
- ///// Wrapper to get the ignore empty pipe mode status
- /////
- /////
- /////
- ///// - Initial
- /////
- //public Boolean GetIgnoreEmptyPipeStatus()
- //{
- // if (_magFluxRequestProtocol == null) return false;
- // var retVal = _magFluxRequestProtocol.IgnoreFailOnEmptyPipeOnHealthy();
- // _logger.Debug(retVal ? $"{_ident} Ignore empty pipe status read back returns: {retVal}" :
- // $"{_ident} Read back empty pipe status failed!");
- // return retVal;
- //}
+ ///
+ /// Wrapper to get the ignore empty pipe mode status
+ ///
+ ///
+ ///
+ /// - Initial
+ ///
+ public Boolean GetIgnoreFailOnEmptyPipeOnHealthy()
+ {
+ if (_magFluxRequestProtocol == null)
+ return false;
+ var retVal = _magFluxRequestProtocol.GetIgnoreFailOnEmptyPipeOnHealthy();
+ _logger.Debug($"{_ident} Ignore empty pipe status read back returns: {retVal}");
+ return retVal;
+ }
- /////
- ///// Wrapper to set the ignore empty pipe mode
- /////
- ///// true to ignore state
- /////
- /////
- ///// - Initial
- /////
- //public Boolean SetIgnoreEmptyPipeStatus(Boolean on)
- //{
- // if (_magFluxRequestProtocol == null) return false;
- // var retVal = _magFluxRequestProtocol.IgnoreFailOnEmptyPipeOnHealthy(on);
- // _logger.Debug(retVal ? $"{_ident} Ignore empty pipe status adjusted to: {on}" :
- // $"{_ident} Setup empty pipe status request failed!");
- // return retVal;
- //}
+ ///
+ /// Wrapper to set the ignore empty pipe mode
+ ///
+ /// true to ignore state
+ ///
+ ///
+ /// - Initial
+ ///
+ public Boolean SetIgnoreFailOnEmptyPipeOnHealthy(Boolean on)
+ {
+ if (_magFluxRequestProtocol == null)
+ return false;
+ _magFluxRequestProtocol.SetIgnoreFailOnEmptyPipeOnHealthy(on);
+ var retVal = _magFluxRequestProtocol.GetIgnoreFailOnEmptyPipeOnHealthy();
+ _logger.Debug(retVal == on ? $"{_ident} Ignore empty pipe status adjusted to: {on}" :
+ $"{_ident} Ignore empty pipe status setup failed!");
+ return retVal == on;
+ }
///
/// Wrapper to get the empty pipe bits
@@ -221,6 +224,41 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
return retVal;
}
+ ///
+ /// Wrapper to get the standard deviation value of the electrode in milli Volts
+ ///
+ ///
+ ///
+ ///
+ /// - Initial
+ ///
+ public Boolean GetStdDev_Electrode_mV(out Single u_mV)
+ {
+ u_mV = 0;
+ if (_magFluxRequestProtocol == null) return false;
+ var retVal = _magFluxRequestProtocol.GetStdDev_Electrode_mV(out u_mV);
+ _logger.Debug(retVal ? $"{_ident} Standard deviation of electrode: {u_mV:F6} mV" :
+ $"{_ident} Standard deviation of electrode request failed!");
+ return retVal;
+ }
+ ///
+ /// Wrapper to get the standard deviation value of the electrode in milli Volts
+ ///
+ ///
+ ///
+ ///
+ /// - Initial
+ ///
+ public Boolean GetAverage_Electrode_mV(out Single u_mV)
+ {
+ u_mV = 0;
+ if (_magFluxRequestProtocol == null) return false;
+ var retVal = _magFluxRequestProtocol.GetAverage_Electrode_mV(out u_mV);
+ _logger.Debug(retVal ? $"{_ident} Average of electrode: {u_mV:F6} mV" :
+ $"{_ident} Average of electrode request failed!");
+ return retVal;
+ }
+
///
/// Wrapper to get the board calibration value
///
diff --git a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache
index 8865d283..8d4994b0 100644
--- a/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache
+++ b/Common/Hardware/WaterMeter/WaterMeterCore/WaterMeterRegisters/obj/Debug/WaterMeterRegisters.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-89102b0142e574de38a9f47d370f3334e5e6c268
+8fbe991b217e7692af4817ad205b768685aa5a72
diff --git a/Common/Ui/MagFluxToolBox/FrmTest.Designer.cs b/Common/Ui/MagFluxToolBox/FrmTest.Designer.cs
index adbc7bf9..daddc803 100644
--- a/Common/Ui/MagFluxToolBox/FrmTest.Designer.cs
+++ b/Common/Ui/MagFluxToolBox/FrmTest.Designer.cs
@@ -42,7 +42,7 @@
this.lblActualProcess = new System.Windows.Forms.Label();
this.barOverallProgressUpdate = new System.Windows.Forms.ProgressBar();
this.tmrProgressUpdate = new System.Windows.Forms.Timer(this.components);
- this.dlgOpenLuFile = new System.Windows.Forms.OpenFileDialog();
+ this.dlgOpenFile = new System.Windows.Forms.OpenFileDialog();
this.lblSoftwareVersion = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.label9 = new System.Windows.Forms.Label();
@@ -99,7 +99,7 @@
this.cbxStatus1 = new System.Windows.Forms.CheckBox();
this.cbxStatus0 = new System.Windows.Forms.CheckBox();
this.lblMagFluxApi = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.grpControl = new System.Windows.Forms.GroupBox();
this.cbxIgnoreEmptyPipeStatus = new System.Windows.Forms.CheckBox();
this.cbxSimulatedFlow = new System.Windows.Forms.CheckBox();
this.lblSharedCode = new System.Windows.Forms.Label();
@@ -111,7 +111,7 @@
this.grpCalibration.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridViewCalib)).BeginInit();
this.grpStatus.SuspendLayout();
- this.groupBox1.SuspendLayout();
+ this.grpControl.SuspendLayout();
this.SuspendLayout();
//
// grpSetup
@@ -256,9 +256,9 @@
this.tmrProgressUpdate.Interval = 200;
this.tmrProgressUpdate.Tick += new System.EventHandler(this.tmrProgressUpdate_Tick);
//
- // dlgOpenLuFile
+ // dlgOpenFile
//
- this.dlgOpenLuFile.Filter = "metrology lookup tables (*.lut)|*.lut";
+ this.dlgOpenFile.Filter = "metrology lookup tables (*.lut)|*.lut";
//
// lblSoftwareVersion
//
@@ -859,16 +859,16 @@
this.lblMagFluxApi.Text = "MagFlux API 0.0.0.00";
this.lblMagFluxApi.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
- // groupBox1
+ // grpControl
//
- this.groupBox1.Controls.Add(this.cbxIgnoreEmptyPipeStatus);
- this.groupBox1.Controls.Add(this.cbxSimulatedFlow);
- this.groupBox1.Location = new System.Drawing.Point(314, 2);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(159, 280);
- this.groupBox1.TabIndex = 44;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Detailed Status";
+ this.grpControl.Controls.Add(this.cbxIgnoreEmptyPipeStatus);
+ this.grpControl.Controls.Add(this.cbxSimulatedFlow);
+ this.grpControl.Location = new System.Drawing.Point(314, 2);
+ this.grpControl.Name = "grpControl";
+ this.grpControl.Size = new System.Drawing.Size(159, 280);
+ this.grpControl.TabIndex = 44;
+ this.grpControl.TabStop = false;
+ this.grpControl.Text = "Control";
//
// cbxIgnoreEmptyPipeStatus
//
@@ -879,11 +879,11 @@
this.cbxIgnoreEmptyPipeStatus.TabIndex = 1;
this.cbxIgnoreEmptyPipeStatus.Text = "Ignore Empty Pipe Status";
this.cbxIgnoreEmptyPipeStatus.UseVisualStyleBackColor = true;
- this.cbxIgnoreEmptyPipeStatus.Visible = false;
this.cbxIgnoreEmptyPipeStatus.CheckedChanged += new System.EventHandler(this.cbxIgnoreEmptyPipeStatus_CheckedChanged);
//
// cbxSimulatedFlow
//
+ this.cbxSimulatedFlow.AutoCheck = false;
this.cbxSimulatedFlow.AutoSize = true;
this.cbxSimulatedFlow.Location = new System.Drawing.Point(10, 20);
this.cbxSimulatedFlow.Name = "cbxSimulatedFlow";
@@ -891,7 +891,6 @@
this.cbxSimulatedFlow.TabIndex = 0;
this.cbxSimulatedFlow.Text = "Simulated Flow Active";
this.cbxSimulatedFlow.UseVisualStyleBackColor = true;
- this.cbxSimulatedFlow.Visible = false;
this.cbxSimulatedFlow.CheckedChanged += new System.EventHandler(this.cbxSimulatedFlow_CheckedChanged);
//
// lblSharedCode
@@ -914,7 +913,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(824, 581);
this.Controls.Add(this.lblSharedCode);
- this.Controls.Add(this.groupBox1);
+ this.Controls.Add(this.grpControl);
this.Controls.Add(this.lblMagFluxApi);
this.Controls.Add(this.grpStatus);
this.Controls.Add(this.grpCalibration);
@@ -950,8 +949,8 @@
((System.ComponentModel.ISupportInitialize)(this.gridViewCalib)).EndInit();
this.grpStatus.ResumeLayout(false);
this.grpStatus.PerformLayout();
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
+ this.grpControl.ResumeLayout(false);
+ this.grpControl.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -969,7 +968,7 @@
private System.Windows.Forms.Label lblActualProcess;
private System.Windows.Forms.Label lblOverall;
private System.Windows.Forms.ProgressBar barSingleProgressUpdate;
- private System.Windows.Forms.OpenFileDialog dlgOpenLuFile;
+ private System.Windows.Forms.OpenFileDialog dlgOpenFile;
private System.Windows.Forms.Label lblSoftwareVersion;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Label lblWaitingForMeterResponse;
@@ -1029,7 +1028,7 @@
private System.Windows.Forms.CheckBox cbxStatus10;
private System.Windows.Forms.Label lblBoardCalibration;
private System.Windows.Forms.TextBox tbxBoardCalibration;
- private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.GroupBox grpControl;
private System.Windows.Forms.CheckBox cbxIgnoreEmptyPipeStatus;
private System.Windows.Forms.CheckBox cbxSimulatedFlow;
private System.Windows.Forms.Label lblSharedCode;
diff --git a/Common/Ui/MagFluxToolBox/FrmTest.cs b/Common/Ui/MagFluxToolBox/FrmTest.cs
index 6cfc1e7e..a0f044aa 100644
--- a/Common/Ui/MagFluxToolBox/FrmTest.cs
+++ b/Common/Ui/MagFluxToolBox/FrmTest.cs
@@ -83,7 +83,6 @@ namespace Xylem.Common.Ui.MagFluxToolBox
var cultureInfo = new CultureInfo("en-GB");
Thread.CurrentThread.CurrentUICulture = cultureInfo;
Thread.CurrentThread.CurrentCulture = cultureInfo;
- //_version = Assembly.GetExecutingAssembly().GetName().Version;
}
///
@@ -443,6 +442,10 @@ namespace Xylem.Common.Ui.MagFluxToolBox
cbxStatus10.Checked = (_magFluxMeter.EpdControlBits & 0x01) == 0x01;
cbxStatus11.Checked = (_magFluxMeter.EpdControlBits & 0x02) == 0x02;
cbxStatus12.Checked = (_magFluxMeter.EpdControlBits & 0x04) == 0x04;
+ cbxIgnoreEmptyPipeStatus.Checked = _magFluxMeter.IgnoreEmptyPipeDetection;
+ cbxSimulatedFlow.Checked = _magFluxMeter.SimulatedFlowIsActive;
+ cbxSimulatedFlow.ForeColor = _magFluxMeter.SimulatedFlowIsActive ? Color.Red : SystemColors.ControlText;
+
CheckUpdateEnabled();
}
}));
@@ -632,12 +635,13 @@ namespace Xylem.Common.Ui.MagFluxToolBox
private void cbxIgnoreEmptyPipeStatus_CheckedChanged(Object sender, EventArgs e)
{
- //_magFluxMeter?.SetIgnoreEmptyPipeStatus(cbxIgnoreEmptyPipeStatus.Checked);
+ var retVal = _magFluxMeter?.SetIgnoreFailOnEmptyPipeOnHealthy(cbxIgnoreEmptyPipeStatus.Checked);
+ cbxIgnoreEmptyPipeStatus.ForeColor = retVal == null || (Boolean) retVal == false ? Color.Red : SystemColors.ControlText;
}
private void cbxSimulatedFlow_CheckedChanged(Object sender, EventArgs e)
{
- //_magFluxMeter?.SetSimulatedFlowActive(cbxSimulatedFlow.Checked);
+ // _magFluxMeter?.SetSimulatedFlowActive(cbxSimulatedFlow.Checked);
}
private void btnInitPcb_Click(Object sender, EventArgs e)
diff --git a/Common/Ui/MagFluxToolBox/FrmTest.resx b/Common/Ui/MagFluxToolBox/FrmTest.resx
index 2aa2e415..319b5714 100644
--- a/Common/Ui/MagFluxToolBox/FrmTest.resx
+++ b/Common/Ui/MagFluxToolBox/FrmTest.resx
@@ -120,7 +120,7 @@
274, 17
-
+
144, 17
diff --git a/Common/Ui/MagFluxToolBox/Properties/AssemblyInfo.cs b/Common/Ui/MagFluxToolBox/Properties/AssemblyInfo.cs
index ec58b559..3a959d95 100644
--- a/Common/Ui/MagFluxToolBox/Properties/AssemblyInfo.cs
+++ b/Common/Ui/MagFluxToolBox/Properties/AssemblyInfo.cs
@@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0.*")]
+[assembly: AssemblyVersion("2.2.0.*")]