Fixed some bugs and added inverter status to modbus register

- Safety now has a tof of 0,5s for Temp, Voltage and Pressure
- Doppelhöcker now switches powercommand during second phase
This commit is contained in:
Matthias Heisig
2025-09-24 10:10:37 +02:00
parent d882effb35
commit dd82744356
12 changed files with 343 additions and 260 deletions

View File

@@ -22,6 +22,9 @@ VAR_OUTPUT
// Current inverter values
stCurrentValues : ST_SUNSPEC_CURRENT_VALUES;
// Inverter infos for EMS display
stInverterInfos : ST_KACO_INFOS;
END_VAR
VAR
// Battery limits
@@ -247,6 +250,13 @@ END_IF
HandleCyclicData();
// Copy inverter states to output
stInverterInfos.eRequestedState := _eRequestedState;
stInverterInfos.eCurrentState := _eCurrentState;
stInverterInfos.ePCUState := _stPCUState.ePCUState;
stInverterInfos.ePCUError := _stPCUState.ePCUError;
// Run state machine
CASE _iState OF
0: // Pre-init phase (no battery limits set)
_fbTONSetBatteryLimits(IN := TRUE);