Update Alarm and Warning of FZ Battery

This commit is contained in:
atef 2023-08-10 12:58:05 +02:00
parent f6699787dd
commit b47081204d
2 changed files with 22 additions and 11 deletions

View File

@ -94,24 +94,23 @@ public partial class Battery48TlRecord
if (HasBit(14)) yield return "FUSE : Main fuse blown";
if (HasBit(15)) yield return "HTRE : Battery failed to warm up";
if (HasBit(16)) yield return "TCPE : Temperature sensor failure";
if (HasBit(17)) yield return "STRE :";
if (HasBit(17)) yield return "STRE : Voltage measurement circuit fails";
if (HasBit(18)) yield return "CME : Current sensor failure";
if (HasBit(19)) yield return "HWFL : BMS hardware failure";
if (HasBit(20)) yield return "HWEM : Hardware protection tripped";
if (HasBit(21)) yield return "ThM : Heatsink temperature too high";
if (HasBit(22)) yield return "vsm1 : String voltage too low";
if (HasBit(23)) yield return "vsm2 : Low string voltage failure";
if (HasBit(25)) yield return "vsM2 : String voltage too high";
if (HasBit(27)) yield return "iCM2 : Charge current too high";
if (HasBit(29)) yield return "iDM2 : Discharge current too high";
if (HasBit(31)) yield return "MID2 : String voltage unbalance too high";
if (HasBit(33)) yield return "CCBF : Internal charger hardware failure";
if (HasBit(34)) yield return "AhFL :";
if (HasBit(36)) yield return "TbCM :";
if (HasBit(37)) yield return "BRNF :";
// if (HasBit(34)) yield return "AhFL :"; // This is doesn't exist in the manual
// if (HasBit(36)) yield return "TbCM :"; // This is doesn't exist in the manual
// if (HasBit(37)) yield return "BRNF :"; // This is doesn't exist in the manual
if (HasBit(42)) yield return "HTFS : Heater Fuse Blown";
if (HasBit(43)) yield return "DATA : Parameters out of range";
if (HasBit(45)) yield return "CELL2:";
if (HasBit(45)) yield return "CELL2: Unbalance string voltages";
if (HasBit(46)) yield return "HEBT : Loss of heartbeat";
}
[SuppressMessage("ReSharper", "StringLiteralTypo")]
@ -124,18 +123,20 @@ public partial class Battery48TlRecord
if (HasBit(6) ) yield return "VBm1: Bus voltage low";
if (HasBit(8) ) yield return "VBM1: Bus voltage high";
if (HasBit(10)) yield return "IDM1: Discharge current high";
if (HasBit(22)) yield return "vsm1: String voltage too low";
if (HasBit(24)) yield return "vsM1: String voltage high";
if (HasBit(26)) yield return "iCM1: Charge current high";
if (HasBit(28)) yield return "iDM1: Discharge current high";
if (HasBit(30)) yield return "MID1: String voltages unbalanced";
if (HasBit(32)) yield return "BLPW: Not enough charging power on bus";
if (HasBit(33)) yield return "CCBF : Internal charger hardware failure";
if (HasBit(35)) yield return "Ah_W: String SOC low";
if (HasBit(38)) yield return "MPMM: Midpoint wiring problem";
if (HasBit(39)) yield return "TCMM:";
// if (HasBit(39)) yield return "TCMM:"; // This is doesn't exist in the manual
if (HasBit(40)) yield return "TCdi: Temperature difference between strings high";
if (HasBit(41)) yield return "WMTO:";
if (HasBit(44)) yield return "bit44:";
if (HasBit(46)) yield return "CELL1:";
// if (HasBit(41)) yield return "WMTO:"; // This is doesn't exist in the manual
if (HasBit(44)) yield return "LMPW : String voltages unbalance warning";
if (HasBit(47)) yield return "TOCW : ";
}

View File

@ -30,6 +30,16 @@ public partial class Battery48TlRecord
[InputRegister(1017, Scale = 0.1, Offset = -400)] private Double _TemperaturesCellsRight;
[InputRegister(1003, Scale = 0.1, Offset = -400)] private Double _TemperaturesCellsAverage;
[InputRegister(1054)] private Double _FwVersion;
[InputRegister(1055)] private Double _SerialNum1;
[InputRegister(1056)] private Double _SerialNum2;
[InputRegister(1057)] private Double _SerialNum3;
[InputRegister(1058)] private Double _SerialNum4;
[InputRegister(1059)] private Double _LimpBitMap;
[InputRegister(1060)] private Double _BatteryState1;
[InputRegister(1061)] private Double _BatteryState2;
private LedState ParseLed(LedColor led) => (LedState)((_LedStates >> (Int32)led) & 3);
// public Decimal CellsVoltage { get; init; }