MagFlux: - api 1.0.2.49

This commit is contained in:
Thomas Wiedebusch 2024-09-19 15:06:41 +02:00
parent bcc19ac7b9
commit a4e62405d3
13 changed files with 267 additions and 132 deletions

View File

@ -9,15 +9,15 @@
<!--CalibrationHelper-->
<target name="CalibrationHelper" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\CalibrationHelper.log" CreateDirs="True" layout ="${longdate} | ${level} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="C:\GenesisLog\${shortdate}\${processname}\{##}_CalibrationHelper.log" />
<!--LedRawData-->
<target xsi:type="BufferingWrapper"
name="TargetLedRawDataBase"
bufferSize="10000"
flushTimeout="-1"
slidingTimeout="true"
>
<target name="LedRawDataBase" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\LedRawData_BASE.log" CreateDirs="True" layout ="${longdate} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="C:\GenesisLog\${shortdate}\${processname}\{##}_LedRawData_BASE.log" />
</target>
<!--LedRawData-->
<target xsi:type="BufferingWrapper"
name="TargetLedRawDataBase"
bufferSize="10000"
flushTimeout="-1"
slidingTimeout="true"
>
<target name="LedRawDataBase" xsi:type="File" fileName="${BasePath}\${shortdate}\${processname}\LedRawData_BASE.log" CreateDirs="True" layout ="${longdate} | ${message} ${exception:format=toString}" archiveAboveSize="50000000" archiveFileName="C:\GenesisLog\${shortdate}\${processname}\{##}_LedRawData_BASE.log" />
</target>
<!--C:\GenesisLog\${shortdate}
C:\GenesisLog\${shortdate}-->

View File

@ -56,12 +56,6 @@ namespace XYLEM
/// <param name="baudRate">Like 9600 (default on RS485)</param>
/// <param name="parity">Like Parity.Even (default on RS485)</param>
/// <returns></returns>
Boolean Connect(string comport, UInt16 id, UInt32 baudRate, Parity parity);
/// <summary>
/// Close communication connection to Meter
/// </summary>
/// <returns>true on okay or false on error</returns>
Boolean CloseConnection();
Boolean Connect(string comport, UInt16 id, UInt32 baudRate, Parity parity);
}
}

View File

@ -1,11 +1,11 @@
using System.IO.Ports;
using System;
using System.IO.Ports;
using XYLEM.Device;
namespace XYLEM
{
public interface IMagFluxAPI
{
/// <summary>
/// Make communication connection to Meter
///
@ -36,5 +36,12 @@ namespace XYLEM
/// <returns>Return a MagFlux device or "null" if failing connect</returns>
/// <exception cref="InvalidDataException"> if the configuration is not valid</exception>
IMagFluxRequestProtocol Connect(string comport, ushort id, uint baudRate, Parity parity, string log_path = null, RUN_TYPE runAs = RUN_TYPE.Normal);
/// <summary>
/// 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(...)
/// </summary>
/// <returns>true on okay or false on error</returns>
Boolean CloseConnections();
}
}

View File

@ -16,6 +16,20 @@ namespace XYLEM
/// <returns>true if yes</returns>
Boolean IsConnected();
/// <summary>
/// Close communication connection to Meter
/// </summary>
/// <returns>true on okay or false on error</returns>
Boolean CloseConnection();
/// <summary>
/// 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
/// </summary>
/// <returns>true on okay or false on error</returns>
Boolean Reconnect();
/// <summary>
/// Get current device Modbus ID / Device Address
/// </summary>
@ -147,6 +161,22 @@ namespace XYLEM
/// <returns>true on okay or false on error</returns>
Boolean GetFlowRate_lps(out Single value_out);
/// <summary>
/// Average Electrode measurement used for Device calibration verification
/// </summary>
/// <param name="value_out"> Average Electrode [mV] </param>
/// <returns>true on okay or false on error</returns>
Boolean GetAverage_Electrode_mV(out Single value_out);
/// <summary>
/// Standard deviation electrode measurement used for Device calibration verification
/// Note: update will only happen after x seconds, depending on filter config in device
/// </summary>
/// <param name="value_out"> Average Electrode [mV] </param>
/// <returns>true on okay or false on error</returns>
Boolean GetStdDev_Electrode_mV(out Single value_out);
/// <summary>
/// !!! Warning make sure to turn off simulation, when calibration off sensor is done !!!
/// ----

View File

@ -37,6 +37,14 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
{
#region Variables and Properties
///// <summary>
///// Reminder for ignore empty pipe detection
///// </summary>
//private Boolean _lastIgnoreEmptyPipeDetection;
///// <summary>
///// Reminder for simulated flow
///// </summary>
//private Boolean _lastSimulatedFlowActive;
/// <summary>
/// Reminder for status bits
/// </summary>
@ -51,6 +59,20 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
/// </summary>
private Boolean _enableRawDataLogging;
/// <summary>
/// Simulated flow activity
/// </summary>
public Boolean SimulatedFlowIsActive
{
get; set;
}
/// <summary>
/// Empty pipe ignore
/// </summary>
public Boolean IgnoreEmptyPipeDetection
{
get; set;
}
/// <summary>
/// to reduce the IrdA communication in test bench, preparation will be done once (when SkipPreparationForTestBench is true)
/// </summary>
@ -123,6 +145,22 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
get; private set;
}
/// <summary>
/// Average of the electrode in milli Volts
/// </summary>
public Single AverageElectrode_mV
{
get; private set;
}
/// <summary>
/// Standard deviation of the electrode in milli Volts
/// </summary>
public Single StandardDeviationElectrode_mV
{
get; private set;
}
/// <summary>
/// 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
}
/// <inheritdoc />
///
public List<MeasurementResults> 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
/// </summary>
public void WriteCalibration(List<Calibration> 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<Calibration> calibrationsCmPerH)
{
calibrationsCmPerH = null;
_logger.Info($"Slot:{Slot} - Read calibration values from MagFlux");
RequestProtocol?.GetCalibrationPoints(out calibrationsCmPerH);
RequestProtocol?.CloseConnection();
}
///// <summary>
///// Turn on/off fixed test flow output from MagFlux
///// Used for getting a fixed simulated flow from MagFlux
///// </summary>
///// <param name="testFlowOn"></param>
///// <returns>true on okay or false on error</returns>
//public Boolean SetSimulatedFlowActive(Boolean testFlowOn)
//{
// _logger.Info($"Slot:{Slot} - Set test flow");
// return RequestProtocol.SetSimulatedFlowActive(on);
//}
/// <summary>
/// Average Electrode measurement used for Device calibration verification
/// </summary>
/// <param name="u_mV"> Average Electrode [mV] </param>
/// <returns>true on okay or false on error</returns>
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;
}
///// <summary>
///// Is the fixed test flow active
///// Used for getting a fixed simulated flow from MagFlux
///// </summary>
///// <returns>true if ON</returns>
//public Boolean IsSimulatedFlowActive()
//{
// _logger.Info($"Slot:{Slot} - Get test flow setting");
// return RequestProtocol.IsSimulatedFlowActive();
//};
/// <summary>
/// Standard deviation electrode measurement used for Device calibration verification
/// Note: update will only happen after x seconds, depending on filter config in device
/// </summary>
/// <param name="u_mV"> Average Electrode [mV] </param>
/// <returns>true on okay or false on error</returns>
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;
}
/// <summary>
/// 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
/// </summary>
/// <param name="ignoreEmptyPipeStatus"></param>
/// <returns>true on okay or false on error</returns>
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;
}
/// <summary>
/// Set PCB settings and PCB calibrations to default.
/// </summary>
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
/// </summary>
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
/// </summary>
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
/// <inheritdoc />
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}");
}
/// <inheritdoc />
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}");
//}
}
/// <inheritdoc />
public void LogRawData(Boolean on)
{
_enableRawDataLogging = on;
if (StreamingPort is LedSerialPort port)
{
port.RecordStreamingRawData = _enableRawDataLogging;

View File

@ -137,21 +137,21 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
return retVal;
}
///// <summary>
///// Wrapper to get the simulated flow setting
///// </summary>
///// <returns></returns>
///// <remarks date="2024-Aug-23" author="T.Wiedebusch">
///// - Initial
///// </remarks>
//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;
//}
/// <summary>
/// Wrapper to get the simulated flow setting
/// </summary>
/// <returns></returns>
/// <remarks date="2024-Aug-23" author="T.Wiedebusch">
/// - Initial
/// </remarks>
public Boolean IsSimulatedFlowActive()
{
if (_magFluxRequestProtocol == null)
return false;
var retVal = _magFluxRequestProtocol.IsSimulatedFlowActive();
_logger.Debug($"{_ident} Simulated flow active read back returns: {retVal}");
return retVal;
}
///// <summary>
///// Wrapper to set the simulated flow setting
@ -163,45 +163,48 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
///// </remarks>
//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;
//}
///// <summary>
///// Wrapper to get the ignore empty pipe mode status
///// </summary>
///// <returns></returns>
///// <remarks date="2024-Aug-23" author="T.Wiedebusch">
///// - Initial
///// </remarks>
//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;
//}
/// <summary>
/// Wrapper to get the ignore empty pipe mode status
/// </summary>
/// <returns></returns>
/// <remarks date="2024-Aug-23" author="T.Wiedebusch">
/// - Initial
/// </remarks>
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;
}
///// <summary>
///// Wrapper to set the ignore empty pipe mode
///// </summary>
///// <param name="on">true to ignore state</param>
///// <returns></returns>
///// <remarks date="2024-Aug-23" author="T.Wiedebusch">
///// - Initial
///// </remarks>
//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;
//}
/// <summary>
/// Wrapper to set the ignore empty pipe mode
/// </summary>
/// <param name="on">true to ignore state</param>
/// <returns></returns>
/// <remarks date="2024-Aug-23" author="T.Wiedebusch">
/// - Initial
/// </remarks>
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;
}
/// <summary>
/// Wrapper to get the empty pipe bits
@ -221,6 +224,41 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
return retVal;
}
/// <summary>
/// Wrapper to get the standard deviation value of the electrode in milli Volts
/// </summary>
/// <param name="u_mV"></param>
/// <returns></returns>
/// <remarks date="2024-Sep-19" author="T.Wiedebusch">
/// - Initial
/// </remarks>
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;
}
/// <summary>
/// Wrapper to get the standard deviation value of the electrode in milli Volts
/// </summary>
/// <param name="u_mV"></param>
/// <returns></returns>
/// <remarks date="2024-Sep-19" author="T.Wiedebusch">
/// - Initial
/// </remarks>
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;
}
/// <summary>
/// Wrapper to get the board calibration value
/// </summary>

View File

@ -1 +1 @@
89102b0142e574de38a9f47d370f3334e5e6c268
8fbe991b217e7692af4817ad205b768685aa5a72

View File

@ -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;

View File

@ -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;
}
/// <summary>
@ -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)

View File

@ -120,7 +120,7 @@
<metadata name="tmrProgressUpdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>274, 17</value>
</metadata>
<metadata name="dlgOpenLuFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="dlgOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>144, 17</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -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.*")]