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:
@@ -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);
|
||||
|
||||
14
PLC/POUs/Sunspec/Kaco/ST_KACO_INFOS.TcDUT
Normal file
14
PLC/POUs/Sunspec/Kaco/ST_KACO_INFOS.TcDUT
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.12">
|
||||
<DUT Name="ST_KACO_INFOS" Id="{8a89bb74-fd34-4e8d-a03d-9fc814aadf52}">
|
||||
<Declaration><![CDATA[TYPE ST_KACO_INFOS :
|
||||
STRUCT
|
||||
eRequestedState : E_KACO_PCU_REQUESTED_STATE;
|
||||
eCurrentState : E_KACO_CURRENT_STATE;
|
||||
ePCUState : E_KACO_PCU_STATE;
|
||||
ePCUError : E_KACO_PCU_ERROR;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user