From 1a3a47920b7e0b441c522322d669b843978c041a Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Fri, 21 Oct 2022 13:49:45 +0200 Subject: [PATCH 1/3] pui and legaxy fix (no no static check for meters) --- .../GenesisCore/_GenesisMeterMeasurement.cs | 14 +- .../Genesis/GenesisCore/configuration.json | 429 ++++++++++-------- ...erRegisters.csproj.CoreCompileInputs.cache | 2 +- .../FW/CordonelFWTypeEnum.cs | 3 +- .../OrderData/OrderProgrammingParameters.cs | 13 - Common/ProductionUiCordonel/MainWindow.xaml | 4 +- .../ProductionUiCordonel/MainWindow.xaml.cs | 50 +- .../Actions/ProductionCheckShippingState.cs | 3 +- Common/Ui/LegacyGenesisControl/ctlBatch.cs | 273 ++++++----- 9 files changed, 401 insertions(+), 390 deletions(-) diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/_GenesisMeterMeasurement.cs b/Common/Hardware/WaterMeter/Genesis/GenesisCore/_GenesisMeterMeasurement.cs index c20aea24..5d582301 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/_GenesisMeterMeasurement.cs +++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/_GenesisMeterMeasurement.cs @@ -45,8 +45,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore private void PreMeasurement() { - //if (!SkipPreparationForTestBench) - //{ + if (!SkipPreparationForTestBench) + { //TODO set display unit //TODO calculated overflow volume for display @@ -89,11 +89,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore WriteRegister(Register.Genesisflow.StoreConfiguration, 1); - //} - //else - //{ - // WriteLog($"wait for measurement is starting"); - //} + } + else + { + WriteLog($"wait for measurement is starting"); + } ProcessStatus = ProcessState.WaitForMeasurement; } diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json b/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json index 6c6066aa..23a17d48 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json +++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/configuration.json @@ -2691,7 +2691,7 @@ "id": 16, "version": { "first": 100, - "last": 493 + "last": 499 }, "registers": { "TxInterval": { @@ -2712,7 +2712,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 15, @@ -2741,7 +2741,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 3600, @@ -2770,7 +2770,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 3, @@ -2799,7 +2799,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 3, @@ -2828,7 +2828,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 7, @@ -2857,7 +2857,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 433, @@ -2886,7 +2886,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -2915,7 +2915,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -2944,7 +2944,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -2973,7 +2973,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3002,7 +3002,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3031,7 +3031,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3060,7 +3060,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3089,7 +3089,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3118,7 +3118,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "static" } @@ -3142,7 +3142,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 25, @@ -3171,7 +3171,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 360, @@ -3200,7 +3200,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 2500, @@ -3229,7 +3229,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 180, @@ -3258,7 +3258,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 160, @@ -3287,7 +3287,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 3, @@ -3316,7 +3316,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 600, @@ -3345,7 +3345,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 600, @@ -3374,7 +3374,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 60, @@ -3403,7 +3403,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3432,7 +3432,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3461,7 +3461,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 50, @@ -3490,7 +3490,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 2, @@ -3519,7 +3519,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 600, @@ -3548,7 +3548,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 600, @@ -3577,7 +3577,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 60, @@ -3606,7 +3606,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -3635,7 +3635,7 @@ "description": "An enumerator defining the currently active PulseWidth (0 ... 8 for non testmode values and 9 ... 15 for testmode)", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 4, @@ -3664,7 +3664,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -3693,7 +3693,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -3722,7 +3722,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "infrequentlyupdated" } @@ -3746,7 +3746,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "infrequentlyupdated" } @@ -3770,7 +3770,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 207, @@ -3799,7 +3799,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 60, @@ -3828,7 +3828,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 29, @@ -3857,7 +3857,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3886,7 +3886,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "static" } @@ -3910,7 +3910,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "static" } @@ -3934,7 +3934,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3963,7 +3963,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -3992,7 +3992,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4021,7 +4021,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4050,7 +4050,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4079,7 +4079,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 19, @@ -4108,7 +4108,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4137,7 +4137,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -4166,7 +4166,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "statictype": "dynamic" } @@ -4190,7 +4190,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4219,7 +4219,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 201335811, @@ -4248,7 +4248,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 60, @@ -4277,7 +4277,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 5, @@ -4306,7 +4306,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 201335811, @@ -4335,7 +4335,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 1, @@ -4364,7 +4364,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4393,7 +4393,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4422,7 +4422,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 4, @@ -4451,7 +4451,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 4, @@ -4480,7 +4480,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4509,7 +4509,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4538,7 +4538,7 @@ "description": "Lorem ipsum", "version": { "first": 100, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4567,7 +4567,7 @@ "description": "Lorem ipsum", "version": { "first": 412, - "last": 493 + "last": 499 }, "values": { "default": 4320000, @@ -4596,7 +4596,7 @@ "description": "Lorem ipsum", "version": { "first": 412, - "last": 493 + "last": 499 }, "values": { "default": 1000, @@ -4625,7 +4625,7 @@ "description": "Storage item for HistoricalErrorLimitCounters Reverse(1, hi) and Leak(0, lo)", "version": { "first": 437, - "last": 493 + "last": 499 }, "values": { "default": 16711935, @@ -4654,7 +4654,7 @@ "description": "Storage item for HistoricalErrorLimitCounters Magnet(3, hi) and Air(2, lo)", "version": { "first": 437, - "last": 493 + "last": 499 }, "values": { "default": 16711935, @@ -4683,7 +4683,7 @@ "description": "Storage item for HistoricalErrorLimitCounters PressureMin(5, hi) and PressureMax(4, lo)", "version": { "first": 437, - "last": 493 + "last": 499 }, "values": { "default": 16711935, @@ -4712,7 +4712,7 @@ "description": "Storage item for HistoricalErrorLimitCounters TempMin(7, hi) and TempMax(6, lo)", "version": { "first": 437, - "last": 493 + "last": 499 }, "values": { "default": 16711935, @@ -4741,7 +4741,7 @@ "description": "Lorem ipsum", "version": { "first": 483, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4770,7 +4770,7 @@ "description": "Lorem ipsum", "version": { "first": 482, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4799,7 +4799,7 @@ "description": "Lorem ipsum", "version": { "first": 482, - "last": 493 + "last": 499 }, "values": { "default": 0, @@ -4809,6 +4809,35 @@ "statictype": "infrequentlyupdated" } ] + }, + "OmsLastMessageCounter": { + "id": 77, + "details": [ + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Lorem ipsum", + "version": { + "first": 499, + "last": 499 + }, + "values": { + "default": 0, + "minimum": 0, + "maximum": 4294967295 + }, + "statictype": "infrequentlyupdated" + } + ] } }, "status": { @@ -4833,7 +4862,7 @@ "id": 4, "version": { "first": 3, - "last": 226 + "last": 227 }, "registers": { "Privilege": { @@ -4854,7 +4883,7 @@ "description": "Written to set the login level, followed by the password. Note, this can be read at any login level including 0.", "version": { "first": 3, - "last": 226 + "last": 227 }, "values": { "default": 0, @@ -4883,7 +4912,7 @@ "description": "Password for logging in, requires 3 consecutive writes", "version": { "first": 3, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -4907,7 +4936,7 @@ "description": "Remote file operations, use this to open a file on the meter, handle returned", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -4931,7 +4960,7 @@ "description": "Remote file operations, use this to close a file on the meter", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -4955,7 +4984,7 @@ "description": "Remote file operations, use this to read bytes from an open file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -4979,7 +5008,7 @@ "description": "Remote file operations, use this to write bytes to an open file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5003,7 +5032,7 @@ "description": "Remote file operations, use this to seek within an open file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5027,7 +5056,7 @@ "description": "Remote file operations, use this to determine position within an open file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5051,7 +5080,7 @@ "description": "Remote file operations, use this to delete a file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5075,7 +5104,7 @@ "description": "Remote file operations, use this determine whether the current position in an open file is the end of the file", "version": { "first": 20, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5099,7 +5128,7 @@ "description": "Returns a list of files in the filesystem that matches a string containing wildcards passed in", "version": { "first": 49, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5123,7 +5152,7 @@ "description": "String containing the PCB serial number. Note, this can be read at any login level including 0", "version": { "first": 59, - "last": 226 + "last": 227 }, "statictype": "static" } @@ -5147,7 +5176,7 @@ "description": "Bitmask of login levels permitted to manipulate dangerous files", "version": { "first": 59, - "last": 226 + "last": 227 }, "statictype": "static" } @@ -5171,7 +5200,7 @@ "description": "Remote file operations, use this to flush write buffers to an open file", "version": { "first": 66, - "last": 226 + "last": 227 }, "statictype": "dynamic" } @@ -5280,7 +5309,7 @@ "id": 21, "version": { "first": 1, - "last": 57 + "last": 58 }, "registers": { "EraseRMA": { @@ -5301,7 +5330,7 @@ "description": "Writing TRUE to this register erases the RMA area", "version": { "first": 7, - "last": 57 + "last": 58 }, "statictype": "dynamic" } @@ -5325,7 +5354,7 @@ "description": "Write to this to force an update of some data. 0 - NDEF readings, 1 - NDEF details, 2 - RMA details", "version": { "first": 49, - "last": 57 + "last": 58 }, "statictype": "dynamic" } @@ -5399,7 +5428,7 @@ "id": 0, "version": { "first": 141, - "last": 517 + "last": 521 }, "registers": { "TriggerUpgrade": { @@ -5420,7 +5449,7 @@ "description": "Writing TRUE to this register internally calls SysTriggerUpgrade() then returns the result.", "version": { "first": 141, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5444,7 +5473,7 @@ "description": "Writing an application id number allows the version number of that application to be read back.", "version": { "first": 150, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5468,7 +5497,7 @@ "description": "A string reporting the PCB serial number, this string must be set using production equipment.", "version": { "first": 169, - "last": 517 + "last": 521 }, "values": { "default": "" @@ -5495,7 +5524,7 @@ "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER1 must be used.", "version": { "first": 170, - "last": 517 + "last": 521 }, "values": { "default": "" @@ -5522,7 +5551,7 @@ "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER2 must be used.", "version": { "first": 170, - "last": 517 + "last": 521 }, "values": { "default": "" @@ -5549,7 +5578,7 @@ "description": "A string reported relating to the customer, this string can be written only once after manufacture. If subsequent changes are needed CUSTOMERSERIALNUMBER3 must be used.", "version": { "first": 170, - "last": 517 + "last": 521 }, "values": { "default": "" @@ -5576,7 +5605,7 @@ "description": "A string reported relating to the customer, this string can be written only once after manufacture. This is the last customer serial number change slot.", "version": { "first": 170, - "last": 517 + "last": 521 }, "values": { "default": "" @@ -5603,7 +5632,7 @@ "description": "The number of seconds since reboot.", "version": { "first": 176, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5627,7 +5656,7 @@ "description": "The number of seconds since 01-Jan-2000.", "version": { "first": 176, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5651,7 +5680,7 @@ "description": "A string reporting the product version string held in the system core binary.", "version": { "first": 196, - "last": 517 + "last": 521 }, "statictype": "static" } @@ -5675,7 +5704,7 @@ "description": "Writing a drive number returns the drive capacity in bytes, or 0 if the drive is not ready, or an error if the driver is not configured to be present.", "version": { "first": 233, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5699,7 +5728,7 @@ "description": "Writing an application id number allows the exit error number of that application to be read back.", "version": { "first": 258, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5723,7 +5752,7 @@ "description": "Reports the instruction set of the hosting microprocessor in b8-15 and allocated platform number in b0-7.", "version": { "first": 265, - "last": 517 + "last": 521 }, "statictype": "static" } @@ -5747,7 +5776,7 @@ "description": "Writing an application id number allows the CRC of that application to be read back.", "version": { "first": 279, - "last": 517 + "last": 521 }, "statictype": "dynamic" } @@ -5771,7 +5800,7 @@ "description": "Bitfield of permissions releated to firmware upgrade", "version": { "first": 470, - "last": 517 + "last": 521 }, "statictype": "static" } @@ -7402,7 +7431,7 @@ "id": 17, "version": { "first": 1, - "last": 73 + "last": 74 }, "registers": { "DataLogContents": { @@ -7423,7 +7452,7 @@ "description": "Bit Mask of the items to store in LOG memory", "version": { "first": 10, - "last": 73 + "last": 74 }, "values": { "default": 201335811, @@ -7452,7 +7481,7 @@ "description": "Storage Period of the LOG memory in minutes", "version": { "first": 10, - "last": 73 + "last": 74 }, "values": { "default": 60, @@ -7481,7 +7510,7 @@ "description": "Averiging period for the Min/Max calculation of LOG&FDR memory", "version": { "first": 10, - "last": 73 + "last": 74 }, "values": { "default": 5, @@ -7510,7 +7539,7 @@ "description": "Bit Mask of the items to store in FDR memory", "version": { "first": 10, - "last": 73 + "last": 74 }, "values": { "default": 201335811, @@ -7539,7 +7568,7 @@ "description": "The day of month the FDR storage will take place at 00:00", "version": { "first": 10, - "last": 73 + "last": 74 }, "values": { "default": 1, @@ -7568,7 +7597,7 @@ "description": "A counter used for internal purposes", "version": { "first": 15, - "last": 73 + "last": 74 }, "values": { "default": 0, @@ -7597,7 +7626,7 @@ "description": "A counter to monitor the application resets", "version": { "first": 20, - "last": 73 + "last": 74 }, "values": { "default": 0, @@ -8138,7 +8167,7 @@ "description": "The rate in Hz that each GP30 takes measurements", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 2, @@ -8263,7 +8292,7 @@ "description": "The first hit level in the upstream direction for channel 1, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -8388,7 +8417,7 @@ "description": "The first hit level in the upstream direction for channel 2, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -8513,7 +8542,7 @@ "description": "The first hit level in the upstream direction for channel 3, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -8638,7 +8667,7 @@ "description": "The first hit level in the downstream direction for channel 1, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -8763,7 +8792,7 @@ "description": "The first hit level in the downstream direction for channel 2, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -8888,7 +8917,7 @@ "description": "The first hit level in the downstream direction for channel 3, units of 0.88mV", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -9013,7 +9042,7 @@ "description": "The hit number to consider as the first hit", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 6, @@ -9138,7 +9167,7 @@ "description": "Where to stop running the amplitude peak detection", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 19, @@ -9263,7 +9292,7 @@ "description": "The number of pulses to fire for a measurement", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 17, @@ -9388,7 +9417,7 @@ "description": "The weight of the lowest display digit as a power of 10. The accepted range of values depends on the LCD present and the DisplayUnits chosen", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": -6, @@ -9513,7 +9542,7 @@ "description": "The units of volume to display. The accepted range of values depends on the LCD present and the DisplayPow10 chosen", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -9662,7 +9691,7 @@ "description": "The meter pipe size", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 1, @@ -9811,7 +9840,7 @@ "description": "The calibration factor for ultrasonic channel 1", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 15625, @@ -9960,7 +9989,7 @@ "description": "The calibration factor for ultrasonic channel 2", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 15625, @@ -10109,7 +10138,7 @@ "description": "The calibration factor for ultrasonic channel 3", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 15625, @@ -10258,7 +10287,7 @@ "description": "The delta time of flight expected on ultrasound channel 1 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -10407,7 +10436,7 @@ "description": "The delta time of flight expected on ultrasound channel 2 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -10556,7 +10585,7 @@ "description": "The delta time of flight expected on ultrasound channel 3 at zero flow. Value is in units 4 times smaller than usual time of flight scaling (ie LS bit is 2^-40 seconds)", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -10657,7 +10686,7 @@ "description": "The scaled volume value shown on the display. In the units and precision set by DisplayUnits and DisplayPow10 respectively. Decimal point is not represented in this value", "version": { "first": 47, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -10757,7 +10786,7 @@ "description": "Write 1 to reset all accumulated volume to zero", "version": { "first": 268, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -10862,7 +10891,7 @@ "description": "The forward flow direction. 0 - undecided, 1 - right, 2 - left", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -11011,7 +11040,7 @@ "description": "The type of data output by the green LED", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -11112,7 +11141,7 @@ "description": "Write 1 to store calibration values to non-volatile storage. Read back for status", "version": { "first": 54, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -11193,7 +11222,7 @@ "description": "The forward flow accumulator volume. The scale depends on the meter size", "version": { "first": 54, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -11274,7 +11303,7 @@ "description": "The reverse flow accumulator volume. The scale depends on the meter size", "version": { "first": 54, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -11379,7 +11408,7 @@ "description": "The volume that must pass in LowFlowMaxPeriod for it to be registered as real flow. Units of ml", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 200, @@ -11504,7 +11533,7 @@ "description": "The time during which LowFlowThreshold volume must pass for it to be registered as real flow. Units of seconds << 16", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 3932160, @@ -11629,7 +11658,7 @@ "description": "The amount of flow in ml to accumulate before updating the main scaled accumulators.", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -11754,7 +11783,7 @@ "description": "The net volume in ml that must flow in one direction for the forward arrow to be set", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 5000000, @@ -11879,7 +11908,7 @@ "description": "The fire buffer within the GP30 on channel 1 to be used", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 1, @@ -12004,7 +12033,7 @@ "description": "The fire buffer within the GP30 on channel 2 to be used", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 1, @@ -12129,7 +12158,7 @@ "description": "The fire buffer within the GP30 on channel 3 to be used", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 1, @@ -12249,7 +12278,7 @@ "description": "Write 1 to put GenesisFlow in Active mode. This is the normal measurement mode", "version": { "first": 268, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -12330,7 +12359,7 @@ "description": "Write 0 to put GenesisFlow in Active mode, otherwise put GenesisFlow in Idle mode. Idle mode displays just the number written to TriggerIdle. No measurements are performed. Read returns the number written", "version": { "first": 75, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -12455,7 +12484,7 @@ "description": "The maximum delta time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 309237, @@ -12580,7 +12609,7 @@ "description": "The maximum absolute time of flight, above this the measurement is deemed bad. In 2^-38 seconds units", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 24739011, @@ -12705,7 +12734,7 @@ "description": "The minimum absolute time of flight, below this the measurement is deemed bad. In 2^-38 seconds units", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 13743895, @@ -12830,7 +12859,7 @@ "description": "The percentage of the measured amplitude to use for the first hit level for channel 1", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -12955,7 +12984,7 @@ "description": "The percentage of the measured amplitude to use for the first hit level for channel 2", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -13080,7 +13109,7 @@ "description": "The percentage of the measured amplitude to use for the first hit level for channel 3", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -13205,7 +13234,7 @@ "description": "A value describing how long the amplitude is averaged over for calculating the first hit level. This is the amount each amplitude value is shifted down before being added to the moving average", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 4, @@ -13330,7 +13359,7 @@ "description": "Minimum absolute first hit level value", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 20, @@ -13455,7 +13484,7 @@ "description": "The number of ToF errors to allow before resetting the first hit levels to FirstHitMinimum", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 16, @@ -13580,7 +13609,7 @@ "description": "The period (in seconds) between first hit level updates", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 10, @@ -13705,7 +13734,7 @@ "description": "The time (in seconds) to maintain zero flow after leaving empty pipe", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 30, @@ -13830,7 +13859,7 @@ "description": "The calibration offset for the temperature measurement on channel 1. In units of 2^-38 seconds", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -13955,7 +13984,7 @@ "description": "The calibration offset for the temperature measurement on channel 2. In units of 2^-38 seconds", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -14080,7 +14109,7 @@ "description": "The calibration offset for the temperature measurement on channel 3. In units of 2^-38 seconds", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -14204,7 +14233,7 @@ "description": "Write the current temperature to this register to trigger a calibration step. In units of 2^-12 degrees celcius", "version": { "first": 205, - "last": 304 + "last": 305 }, "values": { "minimum": 0, @@ -14320,7 +14349,7 @@ "description": "Write 1 to store configuration values to non-volatile storage. Read back for status", "version": { "first": 268, - "last": 304 + "last": 305 }, "statictype": "dynamic" }, @@ -14425,7 +14454,7 @@ "description": "Write 1 to stop various display related registers being changed. Read back 1 for 'sealed' 0 for 'unsealed'", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -14550,7 +14579,7 @@ "description": "Write 1 to put GenesisFlow in Test mode. This differs from normal measurement mode in that the volume is presented to 3 extra decimal places if possible. Read back 1 for Test mode, 0 otherwise", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -14675,7 +14704,7 @@ "description": "Maximum amplitude for a valid signal in 2^-22mV units", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 2936012800, @@ -14800,7 +14829,7 @@ "description": "Minimum amplitude for a valid signal in 2^-22mV units", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 209715200, @@ -14925,7 +14954,7 @@ "description": "Number of hard errors to allow before declaring a fatal error", "version": { "first": 268, - "last": 304 + "last": 305 }, "values": { "default": 4, @@ -15026,7 +15055,7 @@ "description": "The timeout for an ultrasonic measurement (0 - 128us, 1 - 256us, 2 - 1024us, 3 - 4096us)", "version": { "first": 273, - "last": 304 + "last": 305 }, "values": { "default": 1, @@ -15127,7 +15156,7 @@ "description": "The maximum deviation of a valid delta tof from the recent mean. In 2^-38 seconds units", "version": { "first": 280, - "last": 304 + "last": 305 }, "values": { "default": 109951, @@ -15228,7 +15257,7 @@ "description": "The maximum range of temperatures between channels before one is rejected. In units of 2^-12 degrees celcius", "version": { "first": 289, - "last": 304 + "last": 305 }, "values": { "default": 8192, @@ -15329,7 +15358,7 @@ "description": "The maximum range of delta time of flight between channels before one is rejected. In 2^-38 seconds units", "version": { "first": 289, - "last": 304 + "last": 305 }, "values": { "default": 137438, @@ -15430,7 +15459,7 @@ "description": "Read for the current loaded lookup table CRC, write to set the expected CRC.", "version": { "first": 295, - "last": 304 + "last": 305 }, "statictype": "dynamic" } @@ -15454,7 +15483,7 @@ "description": "Whether to display leading zeros on row 2. If false leading zeros will be replaced with a space", "version": { "first": 302, - "last": 304 + "last": 305 }, "values": { "default": 0, @@ -16852,7 +16881,7 @@ "id": 26, "version": { "first": 1, - "last": 18 + "last": 19 }, "registers": { "UpgState": { @@ -16873,7 +16902,7 @@ "description": "Lorem Ipsum", "version": { "first": 2, - "last": 18 + "last": 19 }, "statictype": "dynamic" } @@ -16882,25 +16911,25 @@ "FwdlState": { "id": 1, "details": [ - { - "type": "uint32_t", - "privilege": { - "lvl1": "RW", - "lvl2": "RW", - "lvl3": "RW", - "lvl4": "RW", - "lvl5": "RW", - "lvl6": "RW", - "lvl7": "RW", - "lvl8": "RW" - }, - "description": "Lorem Ipsum", - "version": { - "first": 2, - "last": 18 - }, - "statictype": "dynamic" - } + { + "type": "uint32_t", + "privilege": { + "lvl1": "RW", + "lvl2": "RW", + "lvl3": "RW", + "lvl4": "RW", + "lvl5": "RW", + "lvl6": "RW", + "lvl7": "RW", + "lvl8": "RW" + }, + "description": "Lorem Ipsum", + "version": { + "first": 2, + "last": 19 + }, + "statictype": "dynamic" + } ] } }, 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 d8b5c8f6..f22623aa 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 @@ -1a3d4919c9c702245832d925951f2b7cb72fc333 +5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3 diff --git a/Common/Logic/ProductionOrderCore/FW/CordonelFWTypeEnum.cs b/Common/Logic/ProductionOrderCore/FW/CordonelFWTypeEnum.cs index 803b1955..00673017 100644 --- a/Common/Logic/ProductionOrderCore/FW/CordonelFWTypeEnum.cs +++ b/Common/Logic/ProductionOrderCore/FW/CordonelFWTypeEnum.cs @@ -7,6 +7,7 @@ { EMEA_433, EMEA_868, - NA + NA, + EMEA } } diff --git a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs index b95af71d..7d00494e 100644 --- a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs +++ b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs @@ -65,19 +65,6 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray())); } - if (orderNr == 3144128) - { - orderNr = 3179323; - - - - - } - if (orderNr == 3148219) - { - orderNr = 3179323; - } - var rawVako = VakoDbAdapter.GetRawVako(connectionString, orderNr); var rawMapping = VakoDbAdapter.GetVakoMapping(connectionString, rawVako.Type); var vakoData = VakoParser.Parse(rawVako, rawMapping); diff --git a/Common/ProductionUiCordonel/MainWindow.xaml b/Common/ProductionUiCordonel/MainWindow.xaml index e513bfdb..9056ed53 100644 --- a/Common/ProductionUiCordonel/MainWindow.xaml +++ b/Common/ProductionUiCordonel/MainWindow.xaml @@ -7,9 +7,7 @@ xmlns:uc="clr-namespace:ProductionUiCordonel" mc:Ignorable="d" Title="Cordonel Production UI" MinHeight="500" MinWidth="400" Height="600" Width="644" Initialized="Window_Initialized" Closing="Window_Closing"> - - - + diff --git a/Common/ProductionUiCordonel/MainWindow.xaml.cs b/Common/ProductionUiCordonel/MainWindow.xaml.cs index 8b16efde..d1ab3a52 100644 --- a/Common/ProductionUiCordonel/MainWindow.xaml.cs +++ b/Common/ProductionUiCordonel/MainWindow.xaml.cs @@ -23,35 +23,35 @@ using Xylem.Common.Logic.SoftwareAccessHelper; namespace ProductionUiCordonel { - public class QuantityToBackgroundConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - var dc = DisplayCodes.None; + //public class QuantityToBackgroundConverter : IValueConverter + //{ + // public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + // { + // var dc = DisplayCodes.None; - if (DisplayCodes.TryParse(value.ToString(), out dc)) - { - string hex = ""; - int intValue; - if (int.TryParse(value.ToString(), out intValue)) - { - hex = intValue.ToString("X"); - } - return $"{dc} ({hex})"; - } - else - { - return "?"; - } + // if (DisplayCodes.TryParse(value.ToString(), out dc)) + // { + // string hex = ""; + // int intValue; + // if (int.TryParse(value.ToString(), out intValue)) + // { + // hex = intValue.ToString("X"); + // } + // return $"{dc} ({hex})"; + // } + // else + // { + // return "?"; + // } - } + // } - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } + // public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + // { + // throw new NotImplementedException(); + // } + //} /// /// Interaction logic for MainWindow.xaml diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs index 4d114479..6d04c025 100644 --- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs +++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionCheckShippingState.cs @@ -150,8 +150,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions } reTrysLeft = reTrysLeft - 1; - currentProcessState = ProductionProcessState.Done; - return; + currentProcessState = ProductionProcessState.Error; } catch (Exception ex) { diff --git a/Common/Ui/LegacyGenesisControl/ctlBatch.cs b/Common/Ui/LegacyGenesisControl/ctlBatch.cs index fee17105..6c942625 100644 --- a/Common/Ui/LegacyGenesisControl/ctlBatch.cs +++ b/Common/Ui/LegacyGenesisControl/ctlBatch.cs @@ -679,7 +679,7 @@ namespace XylemCommonUiLegacyGenCtl { TestsetuptContainer.meterTestSettings[slot] = new MeterTestSettings() { SerialNr = serialNumber, Slot = slot, FlowAdjustment = true, FlowTesting = true }; } - AddMeter(serialNumber, slot, false); + AddMeter(serialNumber, slot, true); } public void RemoveMeter(int slot) @@ -957,13 +957,13 @@ namespace XylemCommonUiLegacyGenCtl { ((GenesisMeter)meter).InitCalibration(); } - else - { - ((GenesisMeter)meter).InitMeasurement(); - } - // Reboot, HighPeresur - //ReadOut Alarms, Show and reset - _logger.Debug($"Start CheckMetersAreReadyForTest"); + //else + //{ + // ((GenesisMeter)meter).InitMeasurement(); + //} + //// Reboot, HighPeresur + ////ReadOut Alarms, Show and reset + //_logger.Debug($"Start CheckMetersAreReadyForTest"); } })); @@ -971,18 +971,15 @@ namespace XylemCommonUiLegacyGenCtl } - - - listOfTasks.ForEach(t => t.Start()); - Task.WaitAll(listOfTasks.ToArray()); listOfTasksInit.ForEach(t => t.Start()); Task.WaitAll(listOfTasksInit.ToArray()); TryInvoke(new Action(() => { UpdateBatch(); })); - setBusy(false, "", true); + //CheckMetersAreReadyForTestStatic(); + setBusy(false, "", true); }).ContinueWith(delegate { @@ -1001,85 +998,85 @@ namespace XylemCommonUiLegacyGenCtl private void CheckMetersAreReadyForTestStatic() { - var listOfTasks = new List(); + //var listOfTasks = new List(); - foreach (var meter in batch.ListOfMeters) - { - listOfTasks.Add(new Task(() => - { - if (!(meter is GenesisMeter)) - { - return; - } - var i = 1; + //foreach (var meter in batch.ListOfMeters) + //{ + // listOfTasks.Add(new Task(() => + // { + // if (!(meter is GenesisMeter)) + // { + // return; + // } + // var i = 1; - var sleepTimeS = 1; - _logger.Debug($" Meter {meter.Slot} CheckMetersAreReadyForTest loops {i};delay {sleepTimeS}S"); - ((GenesisMeter)meter).StartMeasurement(); - var MeterReadyForTest = false; + // var sleepTimeS = 1; + // _logger.Debug($" Meter {meter.Slot} CheckMetersAreReadyForTest loops {i};delay {sleepTimeS}S"); + // ((GenesisMeter)meter).StartMeasurement(); + // var MeterReadyForTest = false; - while (i <= 7) - { - ((GenesisMeter)meter).RequestIntermediateMeasurementState(0); - Thread.Sleep(i * 2000); - i = i + 1; - try - { - var state = ((GenesisMeter)meter).GetMeasurementState(0); + // while (i <= 7) + // { + // ((GenesisMeter)meter).RequestIntermediateMeasurementState(0); + // Thread.Sleep(i * 2000); + // i = i + 1; + // try + // { + // var state = ((GenesisMeter)meter).GetMeasurementState(0); - if (state != MeasurementStates.IsWaitingForStartData && state != MeasurementStates.NotStarted) - { + // if (state != MeasurementStates.IsWaitingForStartData && state != MeasurementStates.NotStarted) + // { - var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); + // var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); - if (r.DutVolumeCm != 0) - { - _logger.Info($" Meter {meter.Slot} Meter has progress (Volume{r.DutVolumeCm})"); + // if (r.DutVolumeCm != 0) + // { + // _logger.Info($" Meter {meter.Slot} Meter has progress (Volume{r.DutVolumeCm})"); - MeterReadyForTest = true; - break; - } + // MeterReadyForTest = true; + // break; + // } - } - _logger.Info($" Meter {meter.Slot} Meter no update display; loops left {i}; state {state}"); + // } + // _logger.Info($" Meter {meter.Slot} Meter no update display; loops left {i}; state {state}"); - } - catch (Exception) - { + // } + // catch (Exception) + // { - } + // } - TryInvoke(new Action(() => - { - updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel ", Color.LightYellow); - })); + // TryInvoke(new Action(() => + // { + // updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel ", Color.LightYellow); + // })); - } - ((GenesisMeter)meter).StopMeasurement(); + // } + // ((GenesisMeter)meter).StopMeasurement(); - if (!MeterReadyForTest) - { - //todo event remove meter - _logger.Info($" Meter {meter.Slot} Meter has NO! progress"); - TryInvoke(new Action(() => - { - updateCell($"Status", meter.Slot, $"Zählerstand wechsel nicht erfasst", Color.LightPink); - })); - } + // if (!MeterReadyForTest) + // { + // //todo event remove meter + // _logger.Info($" Meter {meter.Slot} Meter has NO! progress"); + // TryInvoke(new Action(() => + // { + // updateCell($"Status", meter.Slot, $"Zählerstand wechsel nicht erfasst", Color.LightPink); + // })); + // } - })); + // })); - } + //} - listOfTasks.ForEach(t => t.Start()); - Task.WaitAll(listOfTasks.ToArray()); + //listOfTasks.ForEach(t => t.Start()); + //Task.WaitAll(listOfTasks.ToArray()); } @@ -1087,96 +1084,96 @@ namespace XylemCommonUiLegacyGenCtl private void CheckMetersAreReadyForTest() { - _logger.Trace($"CheckMetersAreReadyForTest"); - TryInvoke(new Action(() => - { - lblAction.Text = "Warte auf Zählerstand wechsel von allen Zählern"; + //_logger.Trace($"CheckMetersAreReadyForTest"); + //TryInvoke(new Action(() => + //{ + // lblAction.Text = "Warte auf Zählerstand wechsel von allen Zählern"; - })); + //})); - var listOfTasks = new List(); + //var listOfTasks = new List(); - foreach (var meter in batch.ListOfMeters) - { + //foreach (var meter in batch.ListOfMeters) + //{ - if (!(meter is GenesisMeter)) - { - if (!(meter is GenesisMeter)) - { - continue; - } - } + // if (!(meter is GenesisMeter)) + // { + // if (!(meter is GenesisMeter)) + // { + // continue; + // } + // } - TryInvoke(new Action(() => - { + // TryInvoke(new Action(() => + // { - updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel", Color.LightYellow); - })); + // updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel", Color.LightYellow); + // })); - listOfTasks.Add(new Task(() => - { - var i = 120; + // listOfTasks.Add(new Task(() => + // { + // var i = 120; - var sleepTimeS = 5; - _logger.Debug($" Meter {meter.Slot} CheckMetersAreReadyForTest loops {i};delay {sleepTimeS}S"); - ((GenesisMeter)meter).StartMeasurement(); - var MeterReadyForTest = false; - while (i >= 0) - { - Thread.Sleep(sleepTimeS * 1000); - try - { - var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); - i = i - sleepTimeS; - if (r.DutVolumeCm != 0) - { - _logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}"); - TryInvoke(new Action(() => - { - // updateCell($"Status", meter.Slot, $"Zählerstand wechsel erfasst Von:{r.DutStartRecord.GetVolumeCm()} Auf: {r.DutStopRecord.GetVolumeCm()}", Color.LimeGreen); - })); - MeterReadyForTest = true; - break; - } - else - { - _logger.Info($" Meter {meter.Slot} Meter no update display {r.DutVolumeCm}; loops left {i}"); - } - } - catch (Exception) - { + // var sleepTimeS = 5; + // _logger.Debug($" Meter {meter.Slot} CheckMetersAreReadyForTest loops {i};delay {sleepTimeS}S"); + // ((GenesisMeter)meter).StartMeasurement(); + // var MeterReadyForTest = false; + // while (i >= 0) + // { + // Thread.Sleep(sleepTimeS * 1000); + // try + // { + // var r = ((GenesisMeter)meter).GetMainMeasurementResult(null, null, true); + // i = i - sleepTimeS; + // if (r.DutVolumeCm != 0) + // { + // _logger.Info($" Meter {meter.Slot} Meter has progress {r.DutVolumeCm}"); + // TryInvoke(new Action(() => + // { + // // updateCell($"Status", meter.Slot, $"Zählerstand wechsel erfasst Von:{r.DutStartRecord.GetVolumeCm()} Auf: {r.DutStopRecord.GetVolumeCm()}", Color.LimeGreen); + // })); + // MeterReadyForTest = true; + // break; + // } + // else + // { + // _logger.Info($" Meter {meter.Slot} Meter no update display {r.DutVolumeCm}; loops left {i}"); + // } + // } + // catch (Exception) + // { - } + // } - TryInvoke(new Action(() => - { - updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel ", Color.LightYellow); - })); + // TryInvoke(new Action(() => + // { + // updateCell($"Status", meter.Slot, $"Warte auf Zählerstand wechsel ", Color.LightYellow); + // })); - } - ((GenesisMeter)meter).StopMeasurement(); + // } + // ((GenesisMeter)meter).StopMeasurement(); - if (MeterReadyForTest) - { - _logger.Info($" Meter {meter.Slot} Meter has NO! progress"); - TryInvoke(new Action(() => - { - updateCell($"Status", meter.Slot, $"Zählerstand wechsel nicht erfasst", Color.LightPink); - })); - } + // if (MeterReadyForTest) + // { + // _logger.Info($" Meter {meter.Slot} Meter has NO! progress"); + // TryInvoke(new Action(() => + // { + // updateCell($"Status", meter.Slot, $"Zählerstand wechsel nicht erfasst", Color.LightPink); + // })); + // } - })); + // })); - } - listOfTasks.ForEach(t => t.Start()); - Task.WaitAll(listOfTasks.ToArray()); + //} + //listOfTasks.ForEach(t => t.Start()); + //Task.WaitAll(listOfTasks.ToArray()); } From 4fc949d328db7d237f611a0926a29fcdb10af3b5 Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Fri, 21 Oct 2022 13:52:05 +0200 Subject: [PATCH 2/3] merge --- Common/.vs/config/applicationhost.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/.vs/config/applicationhost.config b/Common/.vs/config/applicationhost.config index ebc79eca..40cde372 100644 --- a/Common/.vs/config/applicationhost.config +++ b/Common/.vs/config/applicationhost.config @@ -155,7 +155,7 @@ - + From c150c538c2289f12ca000a96ea9dd4169d75b8b3 Mon Sep 17 00:00:00 2001 From: Roland Drabesch Date: Fri, 28 Oct 2022 15:48:24 +0200 Subject: [PATCH 3/3] adding NA meters to the Proccess (Picking, Webservice and Finaltest) --- .../Model/PickingModel.cs | 2 +- ...erRegisters.csproj.CoreCompileInputs.cache | 2 +- .../OrderData/OrderProgrammingParameters.cs | 37 +++++---- Common/ProductionUiCordonel/FinalTest.xaml.cs | 62 ++++++++------- .../ProductionProcessCheckAttachment.cs | 21 +++-- ...tionProcessFinalParameterizationVakoCsd.cs | 32 ++++---- .../Actions/ProductionProcessShippingMode.cs | 76 +++++++++++++++---- ...ToXlsHelper.csproj.CoreCompileInputs.cache | 2 +- 8 files changed, 151 insertions(+), 83 deletions(-) diff --git a/Common/CordonelAssemblyLine/Model/PickingModel.cs b/Common/CordonelAssemblyLine/Model/PickingModel.cs index a355457f..1860c453 100644 --- a/Common/CordonelAssemblyLine/Model/PickingModel.cs +++ b/Common/CordonelAssemblyLine/Model/PickingModel.cs @@ -1101,7 +1101,7 @@ namespace CordonelAssemblyLine.Model lblS04Color = _progressCurrent; } - } + } break; case PickingStateMachine.Compare: 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 b81d5f66..f22623aa 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 @@ -46bd00889699f5a20a4981a22f62b66368323855 +5ed75d99ee45ff67821090f1b3dbb001dd9e4fe3 diff --git a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs index acf8fef7..988dc8a3 100644 --- a/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs +++ b/Common/Logic/ProductionOrderCore/OrderData/OrderProgrammingParameters.cs @@ -44,27 +44,29 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData } var radioParams = OrderRadioParameter.GetRadioParams(pcbID, connectionString); - - ret.Add(new ProgrammingParameters("SENSUSRADIO_RadioAddress", BitConverter.GetBytes(radioParams.RadioAddress).Reverse().ToArray())); - - if (radioParams.FrqOffset.HasValue) + if (radioParams.RadioAddress != 0) { - ret.Add(new ProgrammingParameters("SENSUSRADIO_FrequencyOffset", BitConverter.GetBytes(radioParams.FrqOffset.Value).Reverse().ToArray())); - } + + ret.Add(new ProgrammingParameters("SENSUSRADIO_RadioAddress", BitConverter.GetBytes(radioParams.RadioAddress).Reverse().ToArray())); + + if (radioParams.FrqOffset.HasValue) + { + ret.Add(new ProgrammingParameters("SENSUSRADIO_FrequencyOffset", BitConverter.GetBytes(radioParams.FrqOffset.Value).Reverse().ToArray())); + } - ret.Add(new ProgrammingParameters("SENSUSRADIO_EncryptionKey", radioParams.EncryptionKey.ToArray())); + ret.Add(new ProgrammingParameters("SENSUSRADIO_EncryptionKey", radioParams.EncryptionKey.ToArray())); - if (radioParams.PowerLevel > 0 && radioParams.PowerLevelOption > 0 && radioParams.ImpedanceCodeNew > 0 && radioParams.ImpedanceCodeOption > 0) - { - ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevel", BitConverter.GetBytes(radioParams.PowerLevel).Reverse().ToArray())); - ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevelOption", BitConverter.GetBytes(radioParams.PowerLevelOption).Reverse().ToArray())); - ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeNew", BitConverter.GetBytes(radioParams.ImpedanceCodeNew).Reverse().ToArray())); - ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray())); + if (radioParams.PowerLevel > 0 && radioParams.PowerLevelOption > 0 && radioParams.ImpedanceCodeNew > 0 && radioParams.ImpedanceCodeOption > 0) + { + ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevel", BitConverter.GetBytes(radioParams.PowerLevel).Reverse().ToArray())); + ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevelOption", BitConverter.GetBytes(radioParams.PowerLevelOption).Reverse().ToArray())); + ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeNew", BitConverter.GetBytes(radioParams.ImpedanceCodeNew).Reverse().ToArray())); + ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray())); + } } - var rawVako = VakoDbAdapter.GetRawVako(connectionString, orderNr); var rawMapping = VakoDbAdapter.GetVakoMapping(connectionString, rawVako.Type); var vakoData = VakoParser.Parse(rawVako, rawMapping); @@ -128,8 +130,13 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData ret.Add(new ProgrammingParameters(row["RegisterName"].ToString(), RegisterConverter.ConvertFrom(Convert.ToInt32(row["RegisterValue"])))); } } + var ident = "GNS"; + if (meterSize >= 10) + { + ident = "GNSU"; + } - var retStr = LocalWebRequest.GetRequest($"http://sla12iis01/csdcore/csdservice/getstampings?CsdIdent={csdIdent}&GroupId=1&ProductIdent=GNS&ProductDn={rawVako.Dn}&ShowOnlyValidStampings=0", 8000); + 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>(retStr); if (retListRealCsd.Any()) { diff --git a/Common/ProductionUiCordonel/FinalTest.xaml.cs b/Common/ProductionUiCordonel/FinalTest.xaml.cs index c2a6115e..690ee284 100644 --- a/Common/ProductionUiCordonel/FinalTest.xaml.cs +++ b/Common/ProductionUiCordonel/FinalTest.xaml.cs @@ -309,7 +309,7 @@ namespace ProductionUiCordonel SerialNumber = $"{SerialNumber} / {a[3]}"; } - + @@ -416,9 +416,10 @@ namespace ProductionUiCordonel } tmrAutoDetect.Enabled = Settings.AutoDetect; } - ProductionProcessCheckOrderNumber orderBarcode; - ProductionProcessCheckSerialNumber serialBarcode; - public void SetUpBlank(bool retry, bool abort =false) + + private ProductionProcessCheckOrderNumber orderBarcode; + private ProductionProcessCheckSerialNumber serialBarcode; + public void SetUpBlank(bool retry, bool abort = false) { pc.Processes = new List(); @@ -431,8 +432,8 @@ namespace ProductionUiCordonel - orderBarcode = new ProductionProcessCheckOrderNumber(OrderNumber); - + orderBarcode = new ProductionProcessCheckOrderNumber(0); + orderBarcode.isDone += CheckOrder_isDone; @@ -440,28 +441,33 @@ namespace ProductionUiCordonel serialBarcode = new ProductionProcessCheckSerialNumber(SerialNumber, RadioAdress.ToString()); pc.Processes.Add(serialBarcode); //[x] [x] [x] - //pc.Processes.Add(new ProductionProcessFullReadOut()); //[x] [x] [x] - + //pc.Processes.Add(new ProductionProcessFullReadOut()); //[x] [x] [x] + pc.Processes.Add(new ProductionCheckShippingState()); //[x] [x] [x] pc.Processes.Add(new ProductionProcessPasswordFile()); //[x] [x] [x] - + //pc.Processes.Add(new ProductionProcessFinalParameterizationFix()); //[x] [x] [] - pc.Processes.Add(new ProductionProcessFinalParameterizationVakoCsd(connectProcess)); //[x] [x] [] - var radioCheck = new ProductionProcessRadioCheck(); - orderBarcode.isDone += delegate (object sender, EventArgs e) - { - radioCheck.Ordernumber = ((ProductionProcessCheckOrderNumber)sender).Ordernumber; - }; - pc.Processes.Add(radioCheck); //[] [] [] + pc.Processes.Add(new ProductionProcessFinalParameterizationVakoCsd(connectProcess, RadioAdress != 0)); //[x] [x] [] + if (RadioAdress != 0) + { + + var radioCheck = new ProductionProcessRadioCheck(); + + orderBarcode.isDone += delegate (object sender, EventArgs e) + { + radioCheck.Ordernumber = ((ProductionProcessCheckOrderNumber)sender).Ordernumber; + }; + pc.Processes.Add(radioCheck); //[] [] [] + } //pc.Processes.Add(new ProductionProcessSpecialConfig()); //[x] [x] [] - pc.Processes.Add(new ProductionProcessShippingMode(true)); //[] [] [] + pc.Processes.Add(new ProductionProcessShippingMode(true, RadioAdress != 0)); //[] [] [] - pc.Processes.Add(new ProductionProcessFinalParameterizationVakoCsd(connectProcess)); //[x] [x] [] - pc.Processes.Add(new ProductionProcessShippingMode(false)); //[] [] [] + pc.Processes.Add(new ProductionProcessFinalParameterizationVakoCsd(connectProcess, RadioAdress != 0)); //[x] [x] [] + pc.Processes.Add(new ProductionProcessShippingMode(false, RadioAdress != 0)); //[] [] [] pc.Processes.Add(new ProductionProcessFullReadOut()); //[x] [x] [x] pc.Processes.Add(new ProductionProcessLogOff()); //[] [] [] @@ -480,7 +486,7 @@ namespace ProductionUiCordonel var successeP = new ProductionProcessDone(false); - successeP.isDone += allProcessesDone; + successeP.isDone += allProcessesDone; pc.DoneProcess = successeP; @@ -491,10 +497,10 @@ namespace ProductionUiCordonel { runDetect(); } - else if(abort) + else if (abort) { dpSubProcess.Children.Clear(); - } + } } private void CheckOrder_isDone(object sender, EventArgs e) @@ -512,19 +518,19 @@ namespace ProductionUiCordonel OrderHasChanged?.Invoke(this, e); } - - private void allProcessesDone(object sender, Tuple e) + + private void allProcessesDone(object sender, Tuple e) { detectIsLocked = false; if (e.Item3) { printErrorNote(); } - - SetUpBlank(e.Item1,e.Item2); + + SetUpBlank(e.Item1, e.Item2); } - + private void meterHasChanged(GenesisMeter oldMeter, GenesisMeter newMeter) { @@ -697,7 +703,7 @@ namespace ProductionUiCordonel } - + private void BtnSwitchAutoDetect_Click(object sender, RoutedEventArgs e) { Settings.AutoDetect = !Settings.AutoDetect; diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessCheckAttachment.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessCheckAttachment.cs index f2c8d2ff..2ad158f7 100644 --- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessCheckAttachment.cs +++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessCheckAttachment.cs @@ -69,17 +69,24 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions public override async void StartProcess() { - - var a = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetSingleVakoKey?ProductionOrderNumber={OrderNumber}&KeyName=C_GEN_PULS"); - var myJsonResponse = Newtonsoft.Json.JsonConvert.DeserializeObject(a); - if (myJsonResponse.Value.ToLower() == "q" || myJsonResponse.Value.ToLower() == "k") + try { - UserControl.SetDesc("Pulse Module anbauen!"); + var a = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetSingleVakoKey?ProductionOrderNumber={OrderNumber}&KeyName=C_GEN_PULS"); + var myJsonResponse = Newtonsoft.Json.JsonConvert.DeserializeObject(a); + if (myJsonResponse.Value.ToLower() == "q" || myJsonResponse.Value.ToLower() == "k") + { + UserControl.SetDesc("Pulse Module anbauen!"); + } + else + { + StepDone(); + } } - else + catch (Exception) { - StepDone(); + UserControl.SetDesc("Bitte den Auftrag prüfen ob ein Pulse Module verbaut werden soll"); } + diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessFinalParameterizationVakoCsd.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessFinalParameterizationVakoCsd.cs index e14d252f..a982e8cd 100644 --- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessFinalParameterizationVakoCsd.cs +++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessFinalParameterizationVakoCsd.cs @@ -15,14 +15,14 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions { private UcPlain UserControl; private ProductionProcessConnect connectProcess; + private bool hasRadio; - - public ProductionProcessFinalParameterizationVakoCsd(ProductionProcessConnect connectProcess) + public ProductionProcessFinalParameterizationVakoCsd(ProductionProcessConnect connectProcess, bool registerHasRadio = true) { this.connectProcess = connectProcess; name = "Kunden Parametrierung"; currentProcessState = ProductionProcessState.Waiting; - + hasRadio = registerHasRadio; } public override void InitUserControl() @@ -117,14 +117,14 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Vako)) { - + if (item.RegisterName == "CUSTOMER_LeakFlowThreshold") { } //todo: find a better sln for SENSUSRADIO_EncryptionKey //SENSUSRADIO_EncryptionKey dont reserve SENSUSRADIO_EncryptionKey! - if (item.RegisterName.ToLower().Contains("displaypow".ToLower()) || item.RegisterName.ToLower().Contains("METROLOGYASST_FlowPoint".ToLower()) ) + if (item.RegisterName.ToLower().Contains("displaypow".ToLower()) || item.RegisterName.ToLower().Contains("METROLOGYASST_FlowPoint".ToLower())) { overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, new byte[] { item.RegisterValue.ToArray()[0] }, true, true)); } @@ -137,9 +137,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.Reverse().ToArray(), true, true)); } - - + + //else if (!item.RegisterName.ToLower().Contains("apparrangement")) //{ // overAllResult.Add(_currentGenesis_WriteRegister(item.RegisterName, item.RegisterValue.Reverse().ToArray(), true, true)); @@ -184,16 +184,14 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions overAllResult.Add(_currentGenesis_WriteRegister("NFC_EraseRMA", (new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, false)); - overAllResult.Add(_currentGenesis_WriteRegister("PERIODICLOG_ResetCounter", - (new Byte[] { 0x00, 0x00, 0x00, 0x00 }).Reverse().ToArray(), true, false)); - - - - - - overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_SealDisplay", - (new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, true)); + if (hasRadio) + { + overAllResult.Add(_currentGenesis_WriteRegister("PERIODICLOG_ResetCounter", + (new Byte[] { 0x00, 0x00, 0x00, 0x00 }).Reverse().ToArray(), true, false)); + overAllResult.Add(_currentGenesis_WriteRegister("GENESISFLOW_SealDisplay", + (new Byte[] { 0x00, 0x00, 0x00, 0x01 }).Reverse().ToArray(), true, true)); + } var ret = true; int done = 0; @@ -210,7 +208,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions } else { - if (cTask.Result.Item1.ToLower().Contains("Metersize".ToLower()) || cTask.Result.Item1.ToLower().Contains("CUSTOMER_ExcessFlowVolumeThreshold".ToLower()) || cTask.Result.Item1.ToLower().Contains("NFC_EraseRMA".ToLower()) || cTask.Result.Item1.ToLower() == "SENSUSRADIO_MetroRadioLifeTimeCounter".ToLower() || cTask.Result.Item1.ToLower() == "CUSTOMER_LeakFlowThreshold".ToLower()) + if (cTask.Result.Item1.ToLower().Contains("Metersize".ToLower()) || cTask.Result.Item1.ToLower().Contains("NFC_EraseRMA".ToLower()) || cTask.Result.Item1.ToLower().Contains("CUSTOMER_ExcessFlowVolumeThreshold".ToLower()) || cTask.Result.Item1.ToLower().Contains("CUSTOMER_LeakFlowThreshold".ToLower()) || cTask.Result.Item1.ToLower() == "SENSUSRADIO_MetroRadioLifeTimeCounter".ToLower()) { base.NewStatus($"Warnung!Schreiben des Parameter {cTask.Result.Item1} war nicht erfolgreich"); } diff --git a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessShippingMode.cs b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessShippingMode.cs index 3f242421..c1253c97 100644 --- a/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessShippingMode.cs +++ b/Common/ProductionUiCordonel/ProductionProcesses/Actions/ProductionProcessShippingMode.cs @@ -14,11 +14,13 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions { private UcPlain UserControl; private bool doRestart = false; - public ProductionProcessShippingMode(bool restart = false) + private bool hasRadio = false; + public ProductionProcessShippingMode(bool restart = false, bool registerHasRadio = true) { name = "Versandbereitschaft herstellen"; currentProcessState = ProductionProcessState.Waiting; doRestart = restart; + hasRadio = registerHasRadio; } public override void InitUserControl() { @@ -50,8 +52,8 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions Meter.ResetAlarm(GenesisMeter.Alarm.EMPTY_PIPE);//(true, new byte[] { 0x00, 0x00, 0x00, 0x01 }); - var useRadio = true; - if (useRadio) + + if (hasRadio) { if (Meter.StoreAllConfigurations()) { @@ -76,21 +78,21 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions { if (doRestart) { - - - var _meterResetPsu = new MeterResetPsu(Meter) - { - StoreConfigEnable = true - }; - var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute(); var CheckValuesAufterBoot = new List>(); - Thread.Sleep(10000); - Meter.Login(); CheckValuesAufterBoot.Add(new Tuple("METROLOGYASST_PulseLength", Meter.ReadRegister("METROLOGYASST_PulseLength"))); CheckValuesAufterBoot.Add(new Tuple("POWERMON_BatteryQuantity", Meter.ReadRegister("POWERMON_BatteryQuantity"))); CheckValuesAufterBoot.Add(new Tuple("GENESISFLOW_MeterSize", Meter.ReadRegister("GENESISFLOW_MeterSize"))); CheckValuesAufterBoot.Add(new Tuple("GENESISFLOW_CalFactor1", Meter.ReadRegister("GENESISFLOW_CalFactor1"))); CheckValuesAufterBoot.Add(new Tuple("SENSUSRADIO_RadioAddress", Meter.ReadRegister("SENSUSRADIO_RadioAddress"))); + var _meterResetPsu = new MeterResetPsu(Meter) + { + StoreConfigEnable = true + }; + var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute(); + + Thread.Sleep(10000); + Meter.Login(); + bool? hasDiffrences = null; foreach (var item in CheckValuesAufterBoot) @@ -137,7 +139,55 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions { if (Meter.StoreAllConfigurations()) { - base.currentProcessState = ProductionProcessState.Done; + if (doRestart) + { + var CheckValuesAufterBoot = new List>(); + CheckValuesAufterBoot.Add(new Tuple("METROLOGYASST_PulseLength", Meter.ReadRegister("METROLOGYASST_PulseLength"))); + CheckValuesAufterBoot.Add(new Tuple("POWERMON_BatteryQuantity", Meter.ReadRegister("POWERMON_BatteryQuantity"))); + CheckValuesAufterBoot.Add(new Tuple("GENESISFLOW_MeterSize", Meter.ReadRegister("GENESISFLOW_MeterSize"))); + CheckValuesAufterBoot.Add(new Tuple("GENESISFLOW_CalFactor1", Meter.ReadRegister("GENESISFLOW_CalFactor1"))); + + var _meterResetPsu = new MeterResetPsu(Meter) + { + StoreConfigEnable = true + }; + var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute(); + + Thread.Sleep(10000); + Meter.Login(); + + + bool? hasDiffrences = null; + foreach (var item in CheckValuesAufterBoot) + { + if (!item.Item2.SequenceEqual(Meter.ReadRegister(item.Item1))) + { + hasDiffrences = true; + } + else + { + if (!hasDiffrences.HasValue) + { + hasDiffrences = false; + } + } + } + + if (rebootSucceeded && hasDiffrences.HasValue && !hasDiffrences.Value) + { + base.currentProcessState = ProductionProcessState.Done; + } + else + { + Meter.WriteLog("reboot compare failed"); + base.currentProcessState = ProductionProcessState.Error; + } + } + else + { + base.currentProcessState = ProductionProcessState.Done; + } + return; } } diff --git a/Common/Tools/Tools.JsonToXlsHelper/obj/Debug/Tools.JsonToXlsHelper.csproj.CoreCompileInputs.cache b/Common/Tools/Tools.JsonToXlsHelper/obj/Debug/Tools.JsonToXlsHelper.csproj.CoreCompileInputs.cache index 2634cdb8..133b97f0 100644 --- a/Common/Tools/Tools.JsonToXlsHelper/obj/Debug/Tools.JsonToXlsHelper.csproj.CoreCompileInputs.cache +++ b/Common/Tools/Tools.JsonToXlsHelper/obj/Debug/Tools.JsonToXlsHelper.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -81d60b90addc793525740e9993e19bf6665bd401 +0d85a5b3a7561b41163c20e5dc7713bcd0d65555