Files
Uniper_PLC/PLC/GVLs/GVL_CONFIG.TcGVL
2024-05-22 17:43:26 +02:00

310 lines
9.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
<GVL Name="GVL_CONFIG" Id="{0773bf51-0237-454d-a970-cfd896054edb}">
<Declaration><![CDATA[{attribute 'qualified_only'}
VAR_GLOBAL PERSISTENT
// ===========================
// 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 := 15, rErrorMax := 25),
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 := 15, rErrorMax := 25),
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 := 50, rErrorMax := 60),
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 := 50, rErrorMax := 60),
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 := 55, rWarningMax := 77, 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;
// ===========================
// Part shortage workaround
// ===========================
stConfigVoltageSegment1500 : ST_ANALOG_IO_CONFIG := (iAIMax := 32767, iAIMin := 0, rPVMax := 1500, rPVMin := 0, sUnit := 'V');
stString1VoltageConfig : ST_STRING_VOLT_CONFIG :=
(
stModule1VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := TRUE,
xUnit3Is1500V := TRUE,
xUnit4Is1500V := TRUE
),
stModule2VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := FALSE,
xUnit3Is1500V := FALSE,
xUnit4Is1500V := FALSE
),
stModule3VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := TRUE,
xUnit3Is1500V := TRUE,
xUnit4Is1500V := TRUE
)
);
stString2VoltageConfig : ST_STRING_VOLT_CONFIG :=
(
stModule1VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := TRUE,
xUnit3Is1500V := TRUE,
xUnit4Is1500V := TRUE
),
stModule2VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := TRUE,
xUnit3Is1500V := TRUE,
xUnit4Is1500V := TRUE
),
stModule3VoltConfig :=
(
xUnit1Is1500V := FALSE,
xUnit2Is1500V := TRUE,
xUnit3Is1500V := TRUE,
xUnit4Is1500V := TRUE
)
);
// ===========================
// General settings
// ===========================
// Pump on power (%)
rPumpPosolytOnPower : REAL := 65.0;
rPumpNegolytOnPower : REAL := 65.0;
// Pump discharge segment without inverter power (%)
rPumpPosolytDisChrgPower : REAL := 35.0;
rPumpNegolytDisChrgPower : REAL := 35.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 := 79.0;
// 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
// 60.000 W -> 5.000 W per Unit
diMaxStringChargingPower : DINT := -60_000;
// Maximum allowed discharging power (Watt) per String
// 60.000 W -> 5.000 W per Unit
diMaxStringDischargePower : DINT := 60_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
timUnitStartupTime : TIME := T#1M;
// Unit balancing wait startup time
timUnitBalancingStartupTime : TIME := T#3M;
// Dummy to deactivate functions
xDummy : BOOL := FALSE;
END_VAR]]></Declaration>
</GVL>
</TcPlcObject>