radio system state need a logout to refresh
This commit is contained in:
@@ -70,7 +70,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
//var url = $"http://localhost:56011/api/FinalCheck/GetProgrammingParameters?PcbID={base.Meter.PcbId}";
|
||||
var url = $"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetProgrammingParameters?PcbID={base.Meter.PcbId}";
|
||||
var csdRet = LocalWebRequest.GetRequest(url, 80000);
|
||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
||||
|
||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<IList<ProgrammingParameters>>(csdRet);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
+15
-11
@@ -1,12 +1,8 @@
|
||||
using ProductionUiCordonel.ProductionProcesses.Enum;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using ProductionUiCordonel.UserControls.FinalTest;
|
||||
using System.Threading;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Threading;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
|
||||
@@ -39,7 +35,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
//clear
|
||||
}
|
||||
|
||||
|
||||
public override void StartProcess()
|
||||
{
|
||||
try
|
||||
@@ -73,10 +69,18 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
Meter.ReadRegister(dic.GetIdent(), 32);
|
||||
break;
|
||||
default:
|
||||
Meter.ReadRegister(dic.GetIdent());
|
||||
if (dic.DataType == typeof(UInt64) || dic.DataType == typeof(Int64))
|
||||
{
|
||||
Meter.ReadRegister(dic.GetIdent(), 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
Meter.ReadRegister(dic.GetIdent());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
base.Progress = (Int32)Math.Round(((Double)done / (Double)total.Count) * 100, 0);
|
||||
}
|
||||
@@ -97,7 +101,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -291,6 +291,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
stm.initialise((byte)ByteCOMPort);
|
||||
SIRTCOM.Wrapper wrp = new SIRTCOM.Wrapper();
|
||||
stm.StartLoggin("C:\\GenesisLog\\log.txt");
|
||||
|
||||
// ist wohl nicht nötig da der SIRT richtig konfiguroert ist:
|
||||
// wrp.ActivateSirt(byte modul1, byte modul2, byte actTimeout, out byte outP12_01, out byte outP12_02);
|
||||
|
||||
|
||||
+31
-12
@@ -85,8 +85,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
Meter.WriteLog("Login failed");
|
||||
}
|
||||
}
|
||||
|
||||
if ( writeList.All(a => a == true) )
|
||||
|
||||
if (writeList.All(a => a == true))
|
||||
{
|
||||
if (doRestart)
|
||||
{
|
||||
@@ -101,10 +101,10 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
StoreConfigEnable = true
|
||||
};
|
||||
var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute();
|
||||
|
||||
|
||||
Thread.Sleep(10000);
|
||||
Meter.Login();
|
||||
|
||||
|
||||
|
||||
bool? hasDiffrences = null;
|
||||
foreach (var item in CheckValuesAufterBoot)
|
||||
@@ -124,22 +124,26 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
|
||||
if (rebootSucceeded && hasDiffrences.HasValue && !hasDiffrences.Value)
|
||||
{
|
||||
|
||||
Meter.WriteRegister("SENSUSRADIO_SystemState", 0xFF, true, false);
|
||||
Meter.Logout();
|
||||
Thread.Sleep(5000);
|
||||
Meter.Login();
|
||||
var SENSUSRADIO_MainAlarmMask = Meter.ReadRegister("SENSUSRADIO_MainAlarmMask");
|
||||
var SENSUSRADIO_ExtendedAlarmMask = Meter.ReadRegister("SENSUSRADIO_ExtendedAlarmMask");
|
||||
var SENSUSRADIO_SystemState = Meter.ReadRegister("SENSUSRADIO_SystemState");
|
||||
if (SENSUSRADIO_SystemState[0] == 0x02 && SENSUSRADIO_MainAlarmMask[0] != 0)
|
||||
{
|
||||
base.currentProcessState = ProductionProcessState.Done;
|
||||
}else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
Meter.WriteLog("resetRadio Failed");
|
||||
base.currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -149,7 +153,22 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
}
|
||||
else
|
||||
{
|
||||
base.currentProcessState = ProductionProcessState.Done;
|
||||
Meter.WriteRegister("SENSUSRADIO_SystemState", 0xFF, true, false);
|
||||
Meter.Logout();
|
||||
Thread.Sleep(5000);
|
||||
Meter.Login();
|
||||
var SENSUSRADIO_MainAlarmMask = Meter.ReadRegister("SENSUSRADIO_MainAlarmMask");
|
||||
var SENSUSRADIO_ExtendedAlarmMask = Meter.ReadRegister("SENSUSRADIO_ExtendedAlarmMask");
|
||||
var SENSUSRADIO_SystemState = Meter.ReadRegister("SENSUSRADIO_SystemState");
|
||||
if (SENSUSRADIO_SystemState[0] == 0x02 && SENSUSRADIO_MainAlarmMask[0] != 0)
|
||||
{
|
||||
base.currentProcessState = ProductionProcessState.Done;
|
||||
}
|
||||
else
|
||||
{
|
||||
Meter.WriteLog("resetRadio Failed");
|
||||
base.currentProcessState = ProductionProcessState.Error;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -179,11 +198,11 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
StoreConfigEnable = true
|
||||
};
|
||||
var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute();
|
||||
|
||||
|
||||
Thread.Sleep(10000);
|
||||
Meter.Login();
|
||||
|
||||
|
||||
|
||||
|
||||
bool? hasDiffrences = null;
|
||||
foreach (var item in CheckValuesAufterBoot)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user