Merge branch 'main' of https://slm.sms-esaap.com/la_operations/laa_production
This commit is contained in:
commit
b73d8a3df9
@ -14,4 +14,4 @@ using System.Reflection;
|
||||
//[assembly: AssemblyVersion("1.2.*.0")]
|
||||
|
||||
|
||||
[assembly: AssemblyVersion("2.7.1.*")]
|
||||
[assembly: AssemblyVersion("2.7.2.*")]
|
||||
|
||||
@ -716,47 +716,52 @@
|
||||
},
|
||||
"statictype": "dynamic"
|
||||
},
|
||||
{
|
||||
"type": "uint32_t",
|
||||
"privilege": {
|
||||
"lvl1": "RO",
|
||||
"lvl2": "RO",
|
||||
"lvl3": "RW",
|
||||
"lvl4": "RO",
|
||||
"lvl5": "RW",
|
||||
"lvl6": "RW",
|
||||
"lvl7": "RW",
|
||||
"lvl8": "RW"
|
||||
{
|
||||
"type": "uint32_t",
|
||||
"privilege": {
|
||||
"lvl1": "RO",
|
||||
"lvl2": "RO",
|
||||
"lvl3": "RW",
|
||||
"lvl4": "RO",
|
||||
"lvl5": "RW",
|
||||
"lvl6": "RW",
|
||||
"lvl7": "RW",
|
||||
"lvl8": "RW"
|
||||
},
|
||||
"description": "Any set bits manually clear the corresponding alarm.",
|
||||
"version": {
|
||||
"first": 111,
|
||||
"last": 164
|
||||
},
|
||||
"values": {
|
||||
"default": 4294967295,
|
||||
"minimum": 0,
|
||||
"maximum": 4294967295
|
||||
},
|
||||
"statictype": "dynamic",
|
||||
"production": {
|
||||
"required": true,
|
||||
"kitron": false,
|
||||
"csd": null,
|
||||
"vako": false,
|
||||
"operation_calibration": true,
|
||||
"runtime_ignore": false,
|
||||
"responsible": [],
|
||||
"remarks": "Cancel all alarms at the end of production.",
|
||||
"region": {
|
||||
"emea": {
|
||||
"values": {
|
||||
"default": 4294967295
|
||||
}
|
||||
},
|
||||
"description": "Any set bits manually clear the corresponding alarm.",
|
||||
"version": {
|
||||
"first": 111,
|
||||
"last": 164
|
||||
},
|
||||
"statictype": "dynamic",
|
||||
"production": {
|
||||
"required": true,
|
||||
"kitron": false,
|
||||
"csd": null,
|
||||
"vako": false,
|
||||
"operation_calibration": true,
|
||||
"runtime_ignore": false,
|
||||
"responsible": [],
|
||||
"remarks": "Cancel all alarms at the end of production.",
|
||||
"region": {
|
||||
"emea": {
|
||||
"values": {
|
||||
"default": 4294967295
|
||||
}
|
||||
},
|
||||
"na": {
|
||||
"values": {
|
||||
"default": 4294967295
|
||||
}
|
||||
}
|
||||
}
|
||||
"na": {
|
||||
"values": {
|
||||
"default": 4294967295
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"AlarmStatus2": {
|
||||
|
||||
@ -75,6 +75,22 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
|
||||
new RecoveryRegisterItem("_StoreConfiguration", new Byte[]{0x01}, new Byte[]{0x00})
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// A list of all known registers to trigger a rest of the input bit.
|
||||
/// EXAMPLES:
|
||||
/// - CUSTOMER_TriggerAlarmCancel register value
|
||||
/// before input 0000 0001 0001 1111
|
||||
/// new reset input 0000 1111 1111 0000
|
||||
/// output 0000 0000 0000 1111
|
||||
///
|
||||
/// </summary>
|
||||
private static readonly List<RecoveryRegisterItem> SpecialRegisterResetBits = new List<RecoveryRegisterItem>
|
||||
{
|
||||
// (partial) name placeholder for input and output
|
||||
new RecoveryRegisterItem("CUSTOMER_TriggerAlarmCancel", new Byte[4]),
|
||||
};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The root path for all mock FwPackaged.
|
||||
/// </summary>
|
||||
@ -857,9 +873,39 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
|
||||
/// <remarks date="2024-Dec-10" author="Thomas Wiedebusch">
|
||||
/// - Initial MockGenesis simulation.
|
||||
/// </remarks>
|
||||
private static void CheckAndModifySpecialReplies(String regName, Byte[] data)
|
||||
/// <remarks date="2025-Jul-11" author="Thomas Wiedebusch">
|
||||
/// - Simulation of reset bits.
|
||||
/// </remarks>
|
||||
private void CheckAndModifySpecialReplies(String regName, Byte[] data)
|
||||
{
|
||||
// Reset a bit mask
|
||||
if (SpecialRegisterResetBits.Any(n => regName.Contains(n.RegisterIdent)))
|
||||
{
|
||||
var readValue = ReadRegister(regName);
|
||||
if (readValue != null)
|
||||
{
|
||||
for (var c = 0; c < data.Length; c++)
|
||||
{
|
||||
if (c < readValue.Length)
|
||||
{
|
||||
data[c] = (Byte)(readValue[c] & (Byte)~data[c]);
|
||||
}
|
||||
else
|
||||
{
|
||||
data[c] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var c = 0; c < data.Length; c++)
|
||||
{
|
||||
data[c] = 0x00;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Input value forces a constant reply if the input matches
|
||||
if (SpecialRegisterReplies.Any(n => regName.Contains(n.RegisterIdent)))
|
||||
{
|
||||
foreach (var special in SpecialRegisterReplies.Where(special =>
|
||||
|
||||
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.Csd;
|
||||
using Xylem.Common.Logic.ProductionOrderCore.Vako;
|
||||
@ -158,6 +159,21 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
|
||||
ident += vakoData.KeyValues.First(k => k.Key == "Nennweite").Charcode;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(csdIdent))
|
||||
{
|
||||
var csdTokens = csdIdent.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (csdTokens.Length >= 2)
|
||||
{
|
||||
var csdNr = csdTokens[1];
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(csdNr))
|
||||
{
|
||||
csdIdent = csdNr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={csdIdent}&GroupId=1&ProductIdent={ident}&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0", 8000);
|
||||
var retListRealCsd = JsonConvert.DeserializeObject<List<CsdParameterResult>>(retStr);
|
||||
if (retListRealCsd != null && retListRealCsd.Any())
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -30,7 +30,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
|
||||
{
|
||||
#region ------------------------------------------ Variables --------------------------------------------------
|
||||
// remind manually changed culture setting
|
||||
private static readonly CultureInfo _cultureInfo = Thread.CurrentThread.CurrentCulture;
|
||||
private static readonly CultureInfo _cultureInfo = CultureInfo.CurrentUICulture;
|
||||
|
||||
// user defined control for main screen
|
||||
protected UserControl UserControl
|
||||
|
||||
@ -99,6 +99,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
}
|
||||
ActualProcessProgress++;
|
||||
|
||||
// Get the time in UTC to program the time for the Cordonel in seconds since 01. Jan 2000
|
||||
// to set the new UTC after reboot
|
||||
@ -112,6 +113,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// This is the manufacturing date of the Cordonel
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("IRDA_MfgDate", rawSeconds,
|
||||
ProgrammingSource.ProgramInternal));
|
||||
ActualProcessProgress++;
|
||||
// Reset reboot counter
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("CUSTOMER_RebootCount", new Byte[] { 0x00 },
|
||||
ProgrammingSource.ProgramInternal));
|
||||
@ -136,22 +138,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Reset periodic log reset counter
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("PERIODICLOG_ResetCounter",
|
||||
new Byte[] { 0x00 }, ProgrammingSource.ProgramInternal));
|
||||
|
||||
// Reset main and extended alarm mask
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_MainAlarmMask",
|
||||
new Byte[] { 0 }, ProgrammingSource.ProgramInternal));
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_ExtendedAlarmMask",
|
||||
new Byte[] { 0 }, ProgrammingSource.ProgramInternal));
|
||||
|
||||
// System state sensus radio to 0xFF for re-initialize
|
||||
// System state sensus radio to 0xFF for re-initialize
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_SystemState",
|
||||
new Byte[] { 0xFF }, ProgrammingSource.ProgramInternal));
|
||||
|
||||
// Read back alarm masks
|
||||
var mainAlarmMask =
|
||||
RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_MainAlarmMask"));
|
||||
var extendedAlarmMask =
|
||||
RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_ExtendedAlarmMask"));
|
||||
ActualProcessProgress++;
|
||||
var finalRadioSystemState =
|
||||
RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_SystemState"));
|
||||
|
||||
@ -160,13 +151,12 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
ProgrammingSource.ProgramInternal);
|
||||
retValBol &= WriteRegisterLogAndProcessCtr(sensusRadioResetCtr);
|
||||
|
||||
if (!retValBol || mainAlarmMask != 0 || extendedAlarmMask !=0 || finalRadioSystemState != 0x02)
|
||||
if (!retValBol || finalRadioSystemState != 0x02)
|
||||
{
|
||||
ErrorMsgDispatcher(Resources.StrErrorMsgAlarmReset);
|
||||
EolProgress.RebootDoneChecked = EOLStatus.FAIL;
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SuccessMsgDispatcher(Resources.StrSuccessMsgAlarmReset);
|
||||
|
||||
@ -56,8 +56,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
||||
|
||||
// Decide which station Assembly-Line or Shipping-Line (EOL)
|
||||
var strStation = assemblyLine
|
||||
? $"{productionRequirements.RequiredLifeTimeYearsAssembly:F2} %"
|
||||
: $"{productionRequirements.RequiredLifeTimeYearsShipping:F2} %";
|
||||
? $"{productionRequirements.RequiredLifeTimeYearsAssembly:F2} "
|
||||
: $"{productionRequirements.RequiredLifeTimeYearsShipping:F2} ";
|
||||
// Build message for required versus calculated lifetime
|
||||
var lifeTime = $"{Resources.StrMsgRemainingLifeTime}: " +
|
||||
// Actual calculated lifetime based on readings from meter
|
||||
|
||||
@ -39,7 +39,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
||||
#region variables and properties
|
||||
private readonly ILogger _logger;
|
||||
// remind manually changed culture setting
|
||||
private static readonly CultureInfo _cultureInfo = Thread.CurrentThread.CurrentCulture;
|
||||
private static readonly AssemblyName _assemblyName = Assembly.GetExecutingAssembly().GetName();
|
||||
private static readonly String _assemblyExecRootPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
private static readonly Version _version = _assemblyName.Version;
|
||||
|
||||
@ -726,8 +726,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dt = dataacces.ExecuteQuery(sb.ToString());
|
||||
|
||||
@ -1435,7 +1434,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
|
||||
, MAX(c1.ID) AS CalId1
|
||||
, MAX(c2.ID) AS CalId2
|
||||
, MAX(c3.ID) AS CalId3
|
||||
FROM MapPcbIdToSerialNumber AS _map
|
||||
FROM MapPcbIdToSerialNumber AS _map
|
||||
LEFT JOIN GenesisMeterRegisterHistory AS c1
|
||||
ON c1.Address = '0F-0D'
|
||||
AND c1.Value IS NOT NULL
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<NameOfLastUsedPublishProfile>C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState\Properties\PublishProfiles\a.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>a</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user