Add MagFlux Zeroflow
This commit is contained in:
@@ -155,7 +155,7 @@
|
|||||||
</site>
|
</site>
|
||||||
<site name="MeterProcessState" id="2">
|
<site name="MeterProcessState" id="2">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
|
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:56011:localhost" />
|
<binding protocol="http" bindingInformation="*:56011:localhost" />
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
|
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
|
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
|
||||||
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>
|
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>
|
||||||
@@ -103,9 +103,7 @@
|
|||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup>
|
<PropertyGroup />
|
||||||
<NoWin32Manifest>true</NoWin32Manifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
@@ -159,6 +157,7 @@
|
|||||||
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
|
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="PreAdjustmentSettingsContainer.cs" />
|
<Compile Include="PreAdjustmentSettingsContainer.cs" />
|
||||||
|
<Compile Include="Processes\Actions\MagFluxZeroFlow.cs" />
|
||||||
<Compile Include="Processes\Actions\PressureTestProcess.cs" />
|
<Compile Include="Processes\Actions\PressureTestProcess.cs" />
|
||||||
<Compile Include="Processes\Actions\FlushProcess.cs" />
|
<Compile Include="Processes\Actions\FlushProcess.cs" />
|
||||||
<Compile Include="Processes\Actions\PrepareTestProcess.cs" />
|
<Compile Include="Processes\Actions\PrepareTestProcess.cs" />
|
||||||
|
|||||||
@@ -1676,6 +1676,11 @@ namespace CordonelPreadjustmentUi
|
|||||||
|
|
||||||
List<IProcess> listOfProgrammParts = new List<IProcess>();
|
List<IProcess> listOfProgrammParts = new List<IProcess>();
|
||||||
|
|
||||||
|
if ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
listOfProgrammParts.Add(new PrepareTestProcess("PrepareTest", StatusPanelItems.Detect, string.Empty, string.Empty, 1 * 60));
|
listOfProgrammParts.Add(new PrepareTestProcess("PrepareTest", StatusPanelItems.Detect, string.Empty, string.Empty, 1 * 60));
|
||||||
|
|
||||||
listOfProgrammParts.Add(new LoginProcess("Login", StatusPanelItems.Detect, PredefinedMessages.WaitUntilLoginFinished(pp.Setting.Culture), PredefinedMessages.LoginFailed(pp.Setting.Culture), 1 * 60));
|
listOfProgrammParts.Add(new LoginProcess("Login", StatusPanelItems.Detect, PredefinedMessages.WaitUntilLoginFinished(pp.Setting.Culture), PredefinedMessages.LoginFailed(pp.Setting.Culture), 1 * 60));
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
using CordonelPreadjustmentUi.Processes;
|
||||||
|
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||||
|
|
||||||
|
namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Processes.Actions
|
||||||
|
{
|
||||||
|
public class MagFluxZeroFlowProcess : BaseProcess
|
||||||
|
{
|
||||||
|
public MagFluxZeroFlowProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public override List<Task> StartWork()
|
||||||
|
{
|
||||||
|
return doWorkProcess(base.CurrentProcessProgress);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Task> doWorkProcess(ProcessProgress currentProcessProgress)
|
||||||
|
{
|
||||||
|
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||||
|
|
||||||
|
var listOfProcessTask = new List<Task>();
|
||||||
|
|
||||||
|
listOfProcessTask.Add(new Task<bool>(() =>
|
||||||
|
{
|
||||||
|
|
||||||
|
pp.DebugMessage($"Performing {ProcessName} procedure", null, "APP");
|
||||||
|
|
||||||
|
var ZeroOffsetTime = DateTimeOffset.UtcNow.AddMinutes(2);
|
||||||
|
|
||||||
|
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while (FlushTime > DateTimeOffset.UtcNow)
|
||||||
|
{
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
return listOfProcessTask;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -8,7 +8,6 @@ using Xylem.Common.Hardware.Interfaces.Protocols.ProtocolCore.EventArguments;
|
|||||||
using Xylem.Common.Utils.Logging;
|
using Xylem.Common.Utils.Logging;
|
||||||
using XYLEM.Device;
|
using XYLEM.Device;
|
||||||
|
|
||||||
|
|
||||||
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
|
namespace Xylem.Common.Hardware.WaterMeter.MagFlux.Protocols.RequestProtocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1a3d4919c9c702245832d925951f2b7cb72fc333
|
5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
f64d563def603c89cafafa61a3219ba97e1e344c
|
0d85a5b3a7561b41163c20e5dc7713bcd0d65555
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Xylem.Common.CommonCore.Consts;
|
using Xylem.Common.CommonCore.Consts;
|
||||||
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
|
||||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
using Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore;
|
||||||
|
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters;
|
using Xylem.Common.Ui.CordonelPreadjustmentUi.Parameters;
|
||||||
using Xylem.Common.Utils.Logging;
|
using Xylem.Common.Utils.Logging;
|
||||||
using XylemCommonUiLegacyGenCtl.DataPackage;
|
using XylemCommonUiLegacyGenCtl.DataPackage;
|
||||||
@@ -30,6 +32,9 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
private ILogger _logger = null;
|
private ILogger _logger = null;
|
||||||
private List<int> MetersFinallyPassed = new List<int>();
|
private List<int> MetersFinallyPassed = new List<int>();
|
||||||
private TestSetupContainer TestsetuptContainer;
|
private TestSetupContainer TestsetuptContainer;
|
||||||
|
|
||||||
|
public MeterTypes Mode { get; private set; }
|
||||||
|
|
||||||
public PreAdjWr()
|
public PreAdjWr()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -169,6 +174,8 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
TestsetuptContainer.ProductionMode = false;
|
TestsetuptContainer.ProductionMode = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var numberOfPaths = (TestsetuptContainer.AllChanelsRequired ? 3 : 1);
|
var numberOfPaths = (TestsetuptContainer.AllChanelsRequired ? 3 : 1);
|
||||||
|
|
||||||
_logger.Info($"PrepareAction [numberOfPaths = {numberOfPaths},slotCount = {slotCount},cultureStr = {cultureStr}, size = { TestsetuptContainer.MeterSize}]");
|
_logger.Info($"PrepareAction [numberOfPaths = {numberOfPaths},slotCount = {slotCount},cultureStr = {cultureStr}, size = { TestsetuptContainer.MeterSize}]");
|
||||||
@@ -195,17 +202,26 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// s.TempSouce = TestsetuptContainer.TempSouce;
|
// s.TempSouce = TestsetuptContainer.TempSouce;
|
||||||
_logger.Info($"SetSettings [{s.ToString()}]");
|
_logger.Info($"SetSettings [{s.ToString()}]");
|
||||||
wrappedControl.SetSettings(s);
|
wrappedControl.SetSettings(s);
|
||||||
|
|
||||||
s.Production = TestsetuptContainer.ProductionMode;
|
s.Production = TestsetuptContainer.ProductionMode;
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in TestsetuptContainer?.meterTestSettings.Where(f => f != null && f.PreAdjustment && (!string.IsNullOrEmpty(f.SerialNr) && f.SerialNr != "-")))
|
foreach (var item in TestsetuptContainer?.meterTestSettings.Where(f => f != null && f.PreAdjustment && (!string.IsNullOrEmpty(f.SerialNr) && f.SerialNr != "-")))
|
||||||
{
|
{
|
||||||
EnableMeter(item.Slot, true, item.SerialNr);
|
EnableMeter(item.Slot, true, item.SerialNr);
|
||||||
}
|
}
|
||||||
|
Mode = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.MeterTypes.Cordonel;
|
||||||
|
|
||||||
|
if (TestsetuptContainer.meterTestSettings.All(a => a.meterType == Xylem.Common.Hardware.WaterMeter.WaterMeterCore.MeterTypes.MagFlux))
|
||||||
|
{
|
||||||
|
Mode = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.MeterTypes.MagFlux;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -236,15 +252,72 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var item in TestsetuptContainer?.meterTestSettings)
|
if (Mode == MeterTypes.Cordonel)
|
||||||
{
|
{
|
||||||
if (item != null && item.PreAdjustment)
|
|
||||||
{
|
|
||||||
wrappedControl.EnableMeter(item.Slot, true, item.SerialNr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wrappedControl.AutoStart();
|
|
||||||
|
foreach (var item in TestsetuptContainer?.meterTestSettings)
|
||||||
|
{
|
||||||
|
if (item != null && item.PreAdjustment)
|
||||||
|
{
|
||||||
|
wrappedControl.EnableMeter(item.Slot, true, item.SerialNr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wrappedControl.AutoStart();
|
||||||
|
}
|
||||||
|
else if (Mode == MeterTypes.MagFlux)
|
||||||
|
{
|
||||||
|
var meterBatch = new MeterBatch();
|
||||||
|
|
||||||
|
foreach (var item in TestsetuptContainer?.meterTestSettings)
|
||||||
|
{
|
||||||
|
if (item != null && item.PreAdjustment && item.meterType == MeterTypes.MagFlux)
|
||||||
|
{
|
||||||
|
var newMeter = new MagFluxMeter();
|
||||||
|
newMeter.Login();
|
||||||
|
newMeter.SerialNumber = item.SerialNr;
|
||||||
|
meterBatch.AddMeter(newMeter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
meterBatch.MetersStartMeasurement();
|
||||||
|
var testTime = 60;
|
||||||
|
var ZeroOffsetTime = DateTimeOffset.UtcNow.AddSeconds(testTime);
|
||||||
|
while (ZeroOffsetTime > DateTimeOffset.UtcNow)
|
||||||
|
{
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
meterBatch.MetersStopMeasurement();
|
||||||
|
ZeroOffsetTime = DateTimeOffset.UtcNow.AddSeconds(10);
|
||||||
|
while (ZeroOffsetTime > DateTimeOffset.UtcNow)
|
||||||
|
{
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
var c = TestsetuptContainer.meterTestSettings.Count();
|
||||||
|
|
||||||
|
TestsetuptContainer.meterTestResults = new MeterTestResults[c];
|
||||||
|
for (int i = 0; i <= c; i++)
|
||||||
|
{
|
||||||
|
TestsetuptContainer.meterTestResults[c] = new MeterTestResults();
|
||||||
|
TestsetuptContainer.meterTestResults[c].Results = new List<Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.FlowDeviations>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var meter in meterBatch.ListOfMeters)
|
||||||
|
{
|
||||||
|
var resU = meter.GetMainMeasurementResult(0, testTime);
|
||||||
|
|
||||||
|
TestsetuptContainer.meterTestResults[meter.Slot - 1].meterType = MeterTypes.MagFlux;
|
||||||
|
TestsetuptContainer.meterTestResults[meter.Slot - 1].Slot = meter.Slot;
|
||||||
|
TestsetuptContainer.meterTestResults[meter.Slot - 1].SerialNr = meter.SerialNumber;
|
||||||
|
TestsetuptContainer.meterTestResults[meter.Slot - 1].Results.Add(new Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords.FlowDeviations() { RefTimeS = testTime, MeasuredRefFlowQmPerH = 0, RequierdTimeS = testTime, RequierdFlowQmPerH = 0, MeasuredDutFlowQmPerH = resU.DutFlowRateCmPh.Value, DutTimeS = resU.DutTimeS });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -259,84 +332,87 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void SetFlushIsDone()
|
public void SetFlushIsDone()
|
||||||
|
{
|
||||||
|
wrappedControl?.SetFlushIsDone();
|
||||||
|
pollingAction = PollingAction.IsBusy;
|
||||||
|
|
||||||
|
}
|
||||||
|
public void SetTestBenchTemp(double Temp)
|
||||||
|
{
|
||||||
|
wrappedControl?.SetTestBenchTemp(Temp);
|
||||||
|
pollingAction = PollingAction.IsBusy;
|
||||||
|
|
||||||
|
}
|
||||||
|
public PollingAction GetPollingAction()
|
||||||
|
{
|
||||||
|
return pollingAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (wrappedControl != null)
|
||||||
|
{
|
||||||
|
wrappedControl.CloseConnections();
|
||||||
|
wrappedControl.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool GetMeterIsDone(int Slot)
|
||||||
|
{
|
||||||
|
if (MetersFinallyPassed.Contains(Slot))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetTestSetupContainer(dynamic vbContainer)
|
||||||
|
{
|
||||||
|
if (vbContainer is TestSetupContainer container)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.AppendLine($"WatingForDecision={container.WatingForDecision}");
|
||||||
|
sb.AppendLine($"TempSouce={container.TempSouce}");
|
||||||
|
sb.AppendLine($"MeterSize={container.MeterSize}");
|
||||||
|
sb.AppendLine($"DelayInSBeforStart={container.DelayInSBeforStart}");
|
||||||
|
sb.AppendLine($"AllChanelsRequired={container.AllChanelsRequired}");
|
||||||
|
sb.AppendLine($"ProductionMode={container.ProductionMode}");
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var item in container.meterTestSettings)
|
||||||
{
|
{
|
||||||
wrappedControl?.SetFlushIsDone();
|
if (item == null)
|
||||||
pollingAction = PollingAction.IsBusy;
|
|
||||||
|
|
||||||
}
|
|
||||||
public void SetTestBenchTemp(double Temp)
|
|
||||||
{
|
|
||||||
wrappedControl?.SetTestBenchTemp(Temp);
|
|
||||||
pollingAction = PollingAction.IsBusy;
|
|
||||||
|
|
||||||
}
|
|
||||||
public PollingAction GetPollingAction()
|
|
||||||
{
|
|
||||||
return pollingAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (wrappedControl != null)
|
|
||||||
{
|
{
|
||||||
wrappedControl.CloseConnections();
|
continue;
|
||||||
wrappedControl.Dispose();
|
|
||||||
}
|
}
|
||||||
|
sb.AppendLine($"Slot={item.Slot}");
|
||||||
|
sb.AppendLine($"SerialNr={item.SerialNr}");
|
||||||
|
sb.AppendLine($"FlowTesting={item.FlowTesting}");
|
||||||
|
sb.AppendLine($"PreAdjustment={item.PreAdjustment}");
|
||||||
|
sb.AppendLine($"FlowAdjustment={item.FlowAdjustment}");
|
||||||
|
sb.AppendLine($"FlowAdjustmentTarget={item.FlowAdjustmentTarget}");
|
||||||
|
sb.AppendLine($"FlowAdjustmentTarget={item.meterType}");
|
||||||
|
|
||||||
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GetMeterIsDone(int Slot)
|
_logger.Info($"SetTestSetupContainer ({sb}) ");
|
||||||
{
|
TestsetuptContainer = vbContainer;
|
||||||
if (MetersFinallyPassed.Contains(Slot))
|
}
|
||||||
{
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTestSetupContainer(dynamic vbContainer)
|
|
||||||
{
|
|
||||||
if (vbContainer is TestSetupContainer container)
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
sb.AppendLine($"WatingForDecision={container.WatingForDecision}");
|
|
||||||
sb.AppendLine($"TempSouce={container.TempSouce}");
|
|
||||||
sb.AppendLine($"MeterSize={container.MeterSize}");
|
|
||||||
sb.AppendLine($"DelayInSBeforStart={container.DelayInSBeforStart}");
|
|
||||||
sb.AppendLine($"AllChanelsRequired={container.AllChanelsRequired}");
|
|
||||||
sb.AppendLine($"ProductionMode={container.ProductionMode}");
|
|
||||||
|
|
||||||
foreach (var item in container.meterTestSettings)
|
|
||||||
{
|
|
||||||
if (item == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
sb.AppendLine($"Slot={item.Slot}");
|
|
||||||
sb.AppendLine($"SerialNr={item.SerialNr}");
|
|
||||||
sb.AppendLine($"FlowTesting={item.FlowTesting}");
|
|
||||||
sb.AppendLine($"PreAdjustment={item.PreAdjustment}");
|
|
||||||
sb.AppendLine($"FlowAdjustment={item.FlowAdjustment}");
|
|
||||||
sb.AppendLine($"FlowAdjustmentTarget={item.FlowAdjustmentTarget}");
|
|
||||||
}
|
|
||||||
|
|
||||||
_logger.Info($"SetTestSetupContainer ({sb}) ");
|
|
||||||
TestsetuptContainer = vbContainer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
testSetup.meterTestSettings[Slot - 1].FlowAdjustmentTarget = Convert.ToDecimal(FlowAdjustmentTarget);
|
testSetup.meterTestSettings[Slot - 1].FlowAdjustmentTarget = Convert.ToDecimal(FlowAdjustmentTarget);
|
||||||
testSetup.meterTestSettings[Slot - 1].PreAdjustment = PreAdjustment;
|
testSetup.meterTestSettings[Slot - 1].PreAdjustment = PreAdjustment;
|
||||||
testSetup.meterTestSettings[Slot - 1].FlowTesting = FlowTesting;
|
testSetup.meterTestSettings[Slot - 1].FlowTesting = FlowTesting;
|
||||||
testSetup.meterTestSettings[Slot - 1].meterType = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.MeterTypes.Cordonel ;
|
testSetup.meterTestSettings[Slot - 1].meterType = Xylem.Common.Hardware.WaterMeter.WaterMeterCore.MeterTypes.Cordonel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -765,7 +765,6 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
meter.SerialNumber = item.SerialNr;
|
meter.SerialNumber = item.SerialNr;
|
||||||
meter.CurrentActionText = "FlowTest";
|
meter.CurrentActionText = "FlowTest";
|
||||||
meter.SetupFromConfigFile(item.Slot, false, _useRequest, true);
|
meter.SetupFromConfigFile(item.Slot, false, _useRequest, true);
|
||||||
@@ -787,8 +786,8 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//;
|
//;
|
||||||
uniMeter.WriteLog("Add from AddAllMeters");
|
uniMeter.WriteLog("Add from AddAllMeters");
|
||||||
}
|
}
|
||||||
@@ -1098,14 +1097,20 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
|
|
||||||
_logger.Debug($"Add Meter To Grid {meter.Slot}");
|
_logger.Debug($"Add Meter To Grid {meter.Slot}");
|
||||||
|
|
||||||
if (!(meter is GenesisMeter genesisMeter))
|
if ((meter is GenesisMeter genesisMeter))
|
||||||
{
|
{
|
||||||
AddMeterToGrid(meter.Slot, meter.SerialNumber, "-", IsFlyingStartStop);
|
AddMeterToGrid(meter.Slot, meter.SerialNumber, genesisMeter.PcbId, IsFlyingStartStop);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if ((meter is MagFluxMeter fluxMeter))
|
||||||
|
{
|
||||||
|
AddMeterToGrid(meter.Slot, meter.SerialNumber, fluxMeter.PcbId, IsFlyingStartStop);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AddMeterToGrid(meter.Slot, meter.SerialNumber, "-", IsFlyingStartStop);
|
||||||
|
|
||||||
AddMeterToGrid(meter.Slot, meter.SerialNumber, genesisMeter.PcbId, IsFlyingStartStop);
|
|
||||||
}
|
}
|
||||||
//todo : roland check SkipPrepearationForTestBench
|
//todo : roland check SkipPrepearationForTestBench
|
||||||
//((GenesisMeter)meter).SkipPrepearationForTestBench = true;
|
//((GenesisMeter)meter).SkipPrepearationForTestBench = true;
|
||||||
@@ -2260,9 +2265,10 @@ namespace XylemCommonUiLegacyGenCtl
|
|||||||
sb.AppendLine($"PreAdjustment={item.PreAdjustment}");
|
sb.AppendLine($"PreAdjustment={item.PreAdjustment}");
|
||||||
sb.AppendLine($"FlowAdjustment={item.FlowAdjustment}");
|
sb.AppendLine($"FlowAdjustment={item.FlowAdjustment}");
|
||||||
sb.AppendLine($"FlowAdjustmentTarget={item.FlowAdjustmentTarget}");
|
sb.AppendLine($"FlowAdjustmentTarget={item.FlowAdjustmentTarget}");
|
||||||
|
sb.AppendLine($"meterType={item.meterType}");
|
||||||
}
|
}
|
||||||
_logger.Info($"SetTestSetupContainer ({sb}) ");
|
_logger.Info($"SetTestSetupContainer ({sb}) ");
|
||||||
//MessageBox.Show(sb.ToString());
|
MessageBox.Show(sb.ToString());
|
||||||
TestSetupContainer = vbContainer;
|
TestSetupContainer = vbContainer;
|
||||||
_currentState = BatchState.TestContainerIsReady;
|
_currentState = BatchState.TestContainerIsReady;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user