Added Kaco inverter for sensor ripple testing
- Iso error in string will now only be active if the dc circuit breaker is not closed - Added some delay between closing dc circuit breaker and enabling inverter so that the dc bus voltage can stabilize itself
This commit is contained in:
@@ -170,7 +170,8 @@ VAR
|
||||
_sName : STRING;
|
||||
|
||||
// String inverter
|
||||
_fbInverter : FB_PowerSupplySunspec(Name);
|
||||
//_fbInverter : FB_PowerSupplySunspec(Name);
|
||||
_fbInverter : FB_PowerSupplyKaco(Name);
|
||||
|
||||
// Internal inverter power command
|
||||
_rPowerInverterInternal : REAL;
|
||||
@@ -179,7 +180,7 @@ VAR
|
||||
_xEnableInverter : BOOL;
|
||||
|
||||
// Fault timer for inverter startup
|
||||
_tonInverterStartupTimeout : TON := (PT := T#2M);
|
||||
_tonInverterStartupTimeout : TON := (PT := T#3M);
|
||||
|
||||
// Fault timer for inverter shutdown
|
||||
_tonInverterShutdownError : TON := (PT := T#10S);
|
||||
@@ -214,6 +215,8 @@ VAR
|
||||
// Internal SOC
|
||||
_rSOC : REAL;
|
||||
|
||||
_fbTONDCSettlingTime : TON := (PT := T#10S);
|
||||
|
||||
END_VAR
|
||||
|
||||
VAR PERSISTENT
|
||||
@@ -262,7 +265,7 @@ END_IF
|
||||
// ISO Error handling
|
||||
// ===============================
|
||||
// Mute iso error when inverter is enabled
|
||||
_xIsoError := ((NOT xIsoErrorL1) OR (NOT xIsoErrorL2)) AND (NOT _fbInverter.xActive);
|
||||
_xIsoError := ((NOT xIsoErrorL1) OR (NOT xIsoErrorL2)) AND (NOT _fbInverter.xActive) AND (xDCCBOpen);
|
||||
_fbTONIsoError(IN := _xIsoError, PT := GVL_CONFIG.timIsoErrorTimeout);
|
||||
|
||||
// _fbInverter
|
||||
@@ -670,7 +673,6 @@ CASE _iState OF
|
||||
20: // Check if DC relais closed and safety is ok
|
||||
IF NOT xDCCBOpen THEN
|
||||
_tonErrorDCCBNotClosed.IN := FALSE;
|
||||
_xEnableInverter := TRUE;
|
||||
_rPowerInverterInternal := rPowerInverter;
|
||||
//_rPowerInverterInternal := 0.0;
|
||||
IF xInSafetyCheckMode THEN
|
||||
@@ -701,7 +703,15 @@ CASE _iState OF
|
||||
_iState := 1000;
|
||||
END_IF
|
||||
|
||||
21: // Wait for inverter to be ready
|
||||
21: // Wait some time for inverter dc bus voltage settling
|
||||
_fbTONDCSettlingTime(IN := TRUE);
|
||||
IF _fbTONDCSettlingTime.Q THEN
|
||||
_fbTONDCSettlingTime(IN := FALSE);
|
||||
_xEnableInverter := TRUE;
|
||||
_iState := 22;
|
||||
END_IF
|
||||
|
||||
22: // Wait for inverter to be ready
|
||||
_tonInverterStartupTimeout(IN := TRUE);
|
||||
IF _fbInverter.xActive AND (NOT _fbInverter.xError) THEN
|
||||
_iState := 30;
|
||||
|
||||
@@ -160,6 +160,9 @@ VAR
|
||||
_uiNumberOfActiveStrings : UINT;
|
||||
|
||||
_xGetPowerMeterData : BOOL;
|
||||
|
||||
//_fbKaco : FB_PowerSupplyKaco('Kaco');
|
||||
//_xEnableKaco : BOOL;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -674,7 +677,23 @@ IF _xConfirmAlarms OR _rtHardwareResetButton.Q THEN
|
||||
_xConfirmAlarms := FALSE;
|
||||
END_IF
|
||||
|
||||
_fbPowerMeter24V();]]></ST>
|
||||
_fbPowerMeter24V();
|
||||
|
||||
// _fbKaco(
|
||||
// sInverterIPAddr:= '192.168.42.14',
|
||||
// xEnable:= _xEnableKaco,
|
||||
// rPower:= 0.0,
|
||||
// xReset:= _xConfirmAlarms,
|
||||
// rMaxBattPower:= 10_000,
|
||||
// uiMinDisVoltage := ,
|
||||
// uiMaxChaVoltage := ,
|
||||
// uiMaxDisCurrent := ,
|
||||
// uiMaxChaCurrent := ,
|
||||
// xActive=> ,
|
||||
// xError=> ,
|
||||
// xHeartbeatOk=> ,
|
||||
// stCurrentValues=> ,
|
||||
// );]]></ST>
|
||||
</Implementation>
|
||||
<Action Name="SM_AUTO" Id="{b5166e16-4fea-442b-9560-02c156f9a9ad}">
|
||||
<Implementation>
|
||||
|
||||
1124
PLC/POUs/Sunspec/FB_PowerSupplyKaco.TcPOU
Normal file
1124
PLC/POUs/Sunspec/FB_PowerSupplyKaco.TcPOU
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,6 @@ VAR_INPUT
|
||||
sInverterIPAddr : STRING;
|
||||
xEnable : BOOL;
|
||||
rPower : REAL;
|
||||
//rReactivePower : REAL := 0.0;
|
||||
xReset : BOOL;
|
||||
rMaxBattPower : REAL := 40_000; // 24kW
|
||||
END_VAR
|
||||
|
||||
Reference in New Issue
Block a user