Files
Uniper_PLC/PLC/GVLs/GVL_CONFIG.TcGVL
Markus.Neukirch f0e6143997 IBN changes
added sync units for cabinet temperature, changes in modbus interface to EMS (1.0.4 and 1.0.5), added error counter to modbus communication, lot of changes to kaco (faults, consecutive errors, bms error messages), isolation error ledge, allowed startbalancing when on shutdown, tower light integration
2025-09-05 14:24:37 +02:00

300 lines
9.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.12">
<GVL Name="GVL_CONFIG" Id="{0773bf51-0237-454d-a970-cfd896054edb}">
<Declaration><![CDATA[{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
// ===========================
// Number of active strings
// ===========================
uiNumberOfStrings : UINT := 2;
uiNumberOfUnits : UINT := uiNumberOfStrings * 12;
END_VAR
VAR_GLOBAL PERSISTENT
axStringEnabled : ARRAY [0..uiNumberOfStrings-1] OF BOOL;
// ===========================
// Unit hardware config
// ===========================
stUnitConfig : ST_UNIT_CONFIG :=
(
// Pump poslyt segment inlet
stConfigPosolytPump :=
(
rTargetMin := 0.0,
rTargetMax := 100.0,
timRampUpTime := T#10S,
timRampDownTime := T#10S,
stAnalogInputConfig := (iAIMax := 108, iAIMin := 0, rPVMax := 100, rPVMin := 0, sUnit := '%'),
stAnalogOutputConfig := (iAIMax := 29490, iAIMin := 0, rPVMax := 100, rPVMin := 4.807),
xHasAnalogFeedback := TRUE,
xHasMCBFeedback := TRUE,
xHasRepairSwitchFeedback := FALSE
),
// Pump negolyt segment inlet
stConfigNegolytPump :=
(
rTargetMin := 0.0,
rTargetMax := 100.0,
timRampUpTime := T#5S,
timRampDownTime := T#5S,
stAnalogInputConfig := (iAIMax := 108, iAIMin := 0, rPVMax := 100, rPVMin := 0, sUnit := '%'),
stAnalogOutputConfig := (iAIMax := 29490, iAIMin := 0, rPVMax := 100, rPVMin := 4.807),
xHasAnalogFeedback := TRUE,
xHasMCBFeedback := TRUE,
xHasRepairSwitchFeedback := FALSE
),
// Valve posolyt tank outlet
stConfigPosolytValve := (timTimeoutOpen := T#10S, timTimeoutClose := T#10S, xHasOpenFeedback := TRUE, xHasClosedFeedback := TRUE),
// Valve negolyt tank outlet
stConfigNegolytValve := (timTimeoutOpen := T#10S, timTimeoutClose := T#10S, xHasOpenFeedback := TRUE, xHasClosedFeedback := TRUE),
// Pressure posolyt segment inlet
stConfigPosolytPressureSegmentInlet := (iAIMax := 32767, iAIMin := 0, rPVMax := 2000, rPVMin := 0, sUnit := 'mbar'),
stEWLPosolytPressureSegmentInlet := (rErrorMin := 200, rWarningMin := 250, rWarningMax := 550, rErrorMax := 600),
stEWDPosolytPressureSegmentInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Pressure negolyt segment inlet
stConfigNegolytPressureSegmentInlet := (iAIMax := 32767, iAIMin := 0, rPVMax := 2000, rPVMin := 0, sUnit := 'mbar'),
stEWLNegolytPressureSegmentInlet := (rErrorMin := 200, rWarningMin := 250, rWarningMax := 550, rErrorMax := 600),
stEWDNegolytPressureSegmentInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Pressure posolyt tank inlet
stConfigPosolytPressureTankInlet := (iAIMax := 32767, iAIMin := 0, rPVMax := 2000, rPVMin := 0, sUnit := 'mbar'),
stEWLPosolytPressureTankInlet := (rErrorMin := -20, rWarningMin := -10, rWarningMax := 50, rErrorMax := 75),
stEWDPosolytPressureTankInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Pressure negolyt tank inlet
stConfigNegolytPressureTankInlet := (iAIMax := 32767, iAIMin := 0, rPVMax := 2000, rPVMin := 0, sUnit := 'mbar'),
stEWLNegolytPressureTankInlet := (rErrorMin := -20, rWarningMin := -10, rWarningMax := 50, rErrorMax := 75),
stEWDNegolytPressureTankInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Temperature sensor posolyt tank inlet
stConfigPosolytTempTankInlet := (iAIMax := 32767, iAIMin := -32768, rPVMax := 3276.7, rPVMin := -3276.8, sUnit := '°C'),
stEWLPosolytTempTankInlet := (rErrorMin := 10, rWarningMin := 15, rWarningMax := 42, rErrorMax := 45),
stEWDPosolytTempTankInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Temperature sensor negolyt tank inlet
stConfigNegolytTempTankInlet := (iAIMax := 32767, iAIMin := -32768, rPVMax := 3276.7, rPVMin := -3276.8, sUnit := '°C'),
stEWLNegolytTempTankInlet := (rErrorMin := 15, rWarningMin := 15, rWarningMax := 42, rErrorMax := 45),
stEWDNegolytTempTankInlet :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
// Voltage sensor segment
// EL3214-0090 CoE Verzeichnis
// Index 0x80n0:02 "Presentation" = Signed(0) -> Resolution 1/10°C
// Index 0x80n0:19 "RTD Element" = PT100(0)
stConfigVoltageSegment := (iAIMax := 32767, iAIMin := 0, rPVMax := 150, rPVMin := 0, sUnit := 'V'),
stEWLVoltageSegment := (rErrorMin := 50, rWarningMin := 54, rWarningMax := 79, rErrorMax := 80),
stEWDVoltageSegment :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
),
rMaxDeltaPSegmentInlet := 50.0
);
// ===========================
// SCS Current measurement settings
// ===========================
stConfigSCSCurrent : ST_ANALOG_IO_CONFIG := (iAIMax := 32767, iAIMin := 0, rPVMax := 200, rPVMin := 0, sUnit := 'A');
stEWLSCSCurrent : ST_ANALOG_EW_LEVELS;
stEWDSCSCurrent : ST_ANALOG_EW_DELAYS;
// ===========================
// Control cabinet temperature sensor config
// ===========================
// Temperature sensor control cabinets
stConfigCabinetTemp : ST_ANALOG_IO_CONFIG := (iAIMax := 32767, iAIMin := -32768, rPVMax := 3276.7, rPVMin := -3276.8, sUnit := '°C');
stEWLCabinetTemp : ST_ANALOG_EW_LEVELS := (rErrorMin := -20, rWarningMin := -15, rWarningMax := 40, rErrorMax := 80);
stEWDCabinetTemp : ST_ANALOG_EW_DELAYS :=
(
timHardwareSignalLevelOn := T#0S,
timHardwareSignalLevelOff := T#5S,
timErrorLowOn := T#1S,
timErrorLowOff := T#5S,
timWarningLowOn := T#1S,
timWarningLowOff := T#5S,
timWarningHighOn := T#1S,
timWarningHighOff := T#5S,
timErrorHighOn := T#1S,
timErrorHighOff := T#5S
);
// ===========================
// General settings
// ===========================
// Pump posolyt on power in %
rPumpPosolytOnPower : REAL := 70.0;
// Pump negolyt on power in %
rPumpNegolytOnPower : REAL := 70.0;
// Pump posolyt discharge segment without inverter power in %
rPumpPosolytDisChrgPower : REAL := 50.0;
// Pump posolyt discharge segment without inverter power in %
rPumpNegolytDisChrgPower : REAL := 50.0;
// Unit voltage pumps shutoff threshold (Volt)
rPumpshutoffThreshold : REAL := 15.0;
// Minimum unit voltage required for inverter startup (Volt)
rMinimumUnitVoltage : REAL := 55.0;
// Maximum unit voltage for fully charged (Volt)
rMaximumUnitVoltage : REAL := 78.5;
// Delta value to minimum unit voltage for shutdown discharge (Volt)
rDeltaUnitVoltageShutdownDischarge : REAL := 5.0;
// Maximum absolute voltage difference
// between units in the same module
rMaxAbsDiffVoltageUnitsOnModule : REAL := 10.0;
// Maximum absolute voltage difference
// between Modules (Volt)
rMaxAbsDiffVoltageModulesInString : REAL := 20.0;
// Minimum absolute power command to enable battery (Watt)
diMinimumAbsPowerForEnable : DINT := 100;
// Maximum allowed charging power (Watt) per String
// 24.000 W -> 2.000 W per Unit
diMaxStringChargingPower : DINT := -48_000;
// Maximum allowed discharging power (Watt) per String
// 24.000 W -> 2.000 W per Unit
diMaxStringDischargePower : DINT := 48_000;
// Inverter ip address for string 1
sInverterIpString1 : STRING := '192.168.42.10';
// Inverter ip address for string 2
sInverterIpString2 : STRING := '192.168.42.20';
// Absolute shutdown discharge power (Watt)
// 12.000 W -> 1.000 W per unit
rAbsShutdownDischargePower : REAL := 6_500;
// Allow inverter fast shutdown discharge
xShutdownDischargeWithInverter : BOOL := FALSE;
// String fully charged voltage (Volt)
// 960 V -> 80 V per Unit
rStringFullyChargedVoltage : REAL := 960.0;
// String empty voltage (Volt) (617V is needed for the inverter to start up -> 55.0V per Segment)
rStringEmptyVoltage : REAL := 660.0;
// Unit wait startup time (was 1 minute, reduced because of Doppelhöcker-Test)
timUnitStartupTime : TIME := T#15S;
// Unit balancing wait startup time
timUnitBalancingStartupTime : TIME := T#3M;
// All modules in string not ready timeout
timStringReadyTimeout : TIME := T#3M;
// Timeout for isolation error
timIsoErrorTimeout : TIME := T#20S;
// Balancing factor
rBalancingFactor : REAL := 20.0;
// Timeout heartbeat from EMS
timEMSHeartbeatTimeout : TIME := t#5s;
// Dummy to deactivate functions
{attribute 'analysis' := '-33'}
xDummy : BOOL := FALSE;
udiMaxConsecutiveInvError : UDINT := 10;
END_VAR]]></Declaration>
</GVL>
</TcPlcObject>