EMS communication and Voltage optimizations

- Added data for EMS communication
- Added highest segment voltage for charging check
- Added lowest segment voltage for discharging check
This commit is contained in:
Matthias Heisig
2024-05-07 17:10:29 +02:00
parent 327f324be8
commit 0ffff9be2a
11 changed files with 660 additions and 383 deletions

View File

@@ -70,6 +70,9 @@ VAR_OUTPUT
// Smallest segment voltage
rSmallestSegmentVoltage : REAL;
// Highest segment voltage
rHighestSegmentVoltage : REAL;
// Balancing done
xBalancingDone : BOOL;
END_VAR
@@ -377,7 +380,7 @@ END_IF
// for balancing
// ===============================
rSmallestSegmentVoltage := MIN(_fbUnit1.rCurrentVoltage, _fbUnit2.rCurrentVoltage, _fbUnit3.rCurrentVoltage, _fbUnit4.rCurrentVoltage);
rHighestSegmentVoltage := MAX(_fbUnit1.rCurrentVoltage, _fbUnit2.rCurrentVoltage, _fbUnit3.rCurrentVoltage, _fbUnit4.rCurrentVoltage);
// ===============================
// Module status sum