ProductionUiCordonel: - removed radio visual- and mainAlrmMasks in CheckRadio

RegisterRestorer: - avoid write un-comparable registers
This commit is contained in:
Thomas Wiedebusch
2025-05-07 17:02:12 +02:00
parent fe20219fdd
commit da520c84be
6 changed files with 116 additions and 115 deletions
@@ -176,6 +176,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
/// <remarks date="2025-Apr-07" author="Thomas Wiedebusch">
/// - CancellationToken.
/// </remarks>
/// <remarks date="2025-Mai-07" author="Thomas Wiedebusch">
/// - Removed change and read back of MainAlarmMask and ExtendedAlarmMask.
/// </remarks>
public override StatusReturn ExecuteProcess()
{
// This will force to reset all values, Sentinel and Prepare shipping will fail based on EOL Progress
@@ -304,27 +307,16 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
DisableAllButtons();
}// !skipRadioCheck
// reset all radio alarms
WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_MainAlarmMask",
new Byte[] { 0 }, ProgrammingSource.ProgramInternal));
WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_ExtendedAlarmMask",
new Byte[] { 0 }, ProgrammingSource.ProgramInternal));
// set system state back to shipping mode
WriteRegisterLogAndProcessCtr(new ProgrammingParameters("SENSUSRADIO_SystemState",
new Byte[] { 0xFF }, ProgrammingSource.ProgramInternal));
ActualProcessProgress++;
// check radio is in customer mode 0x02 and alarm masks are 0
var mainAlarmMask =
RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_MainAlarmMask"));
var extendedAlarmMask =
RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_ExtendedAlarmMask"));
_finalRadioSystemState = RegisterConverter.ByteArrayToValue<Byte>(Meter.ReadRegister("SENSUSRADIO_SystemState"));
ActualProcessProgress++;
if (// Radio mode and alarm masks NOT okay forces always an error
// radio system state 0x02 shipping mode, 0x01 production mode, 0x0C transmission and data logger active
_finalRadioSystemState != 0x02 || mainAlarmMask != 0 || extendedAlarmMask != 0
if (// radio system state 0x02 shipping mode, 0x01 production mode, 0x0C transmission and data logger active
_finalRadioSystemState != 0x02
// If radio check is enabled the signal level has to be in range and the test has to be finished
|| (!skipRadioCheck && (!_successSignalLevel || !_sirtComOkay || !_testFinished)))
{