update control constants.
This commit is contained in:
parent
b39b512a12
commit
fd52a94d18
|
@ -209,17 +209,17 @@ internal static class Program
|
||||||
var dcDevices = r.DcDc.Devices;
|
var dcDevices = r.DcDc.Devices;
|
||||||
var configFile = r.Config;
|
var configFile = r.Config;
|
||||||
|
|
||||||
var gridTie = r.AcDc.Devices.All(d => d.Control.Ac.GridType == GridType.GridTied400V50Hz); // TODO if any of the grid tie mode
|
var devicesConfig = r.AcDc.Devices.All(d => d.Control.Ac.GridType == GridType.GridTied400V50Hz) ? configFile.GridTie : configFile.IslandMode; // TODO if any of the grid tie mode
|
||||||
|
|
||||||
inverters.ForEach(d => d.Control.Dc.MaxVoltage = gridTie ? configFile.GridTie.AcDc.MaxDcLinkVoltage : configFile.IslandMode.AcDc.MaxDcLinkVoltage);
|
inverters.ForEach(d => d.Control.Dc.MaxVoltage = devicesConfig.AcDc.MaxDcLinkVoltage);
|
||||||
inverters.ForEach(d => d.Control.Dc.MinVoltage = gridTie ? configFile.GridTie.AcDc.MinDcLinkVoltage : configFile.IslandMode.AcDc.MinDcLinkVoltage);
|
inverters.ForEach(d => d.Control.Dc.MinVoltage = devicesConfig.AcDc.MinDcLinkVoltage);
|
||||||
inverters.ForEach(d => d.Control.Dc.ReferenceVoltage = gridTie ? configFile.GridTie.AcDc.ReferenceDcLinkVoltage : configFile.IslandMode.AcDc.ReferenceDcLinkVoltage);
|
inverters.ForEach(d => d.Control.Dc.ReferenceVoltage = devicesConfig.AcDc.ReferenceDcLinkVoltage);
|
||||||
|
|
||||||
inverters.ForEach(d => d.Control.Dc.PrechargeConfig = DcPrechargeConfig.PrechargeDcWithInternal);
|
inverters.ForEach(d => d.Control.Dc.PrechargeConfig = DcPrechargeConfig.PrechargeDcWithInternal);
|
||||||
|
|
||||||
dcDevices.ForEach(d => d.Control.DroopControl.UpperVoltage = gridTie ? configFile.GridTie.DcDc.UpperDcLinkVoltage : configFile.IslandMode.DcDc.UpperDcLinkVoltage);
|
dcDevices.ForEach(d => d.Control.DroopControl.UpperVoltage = devicesConfig.DcDc.UpperDcLinkVoltage);
|
||||||
dcDevices.ForEach(d => d.Control.DroopControl.LowerVoltage = gridTie ? configFile.GridTie.DcDc.LowerDcLinkVoltage : configFile.IslandMode.DcDc.LowerDcLinkVoltage);
|
dcDevices.ForEach(d => d.Control.DroopControl.LowerVoltage = devicesConfig.DcDc.LowerDcLinkVoltage);
|
||||||
dcDevices.ForEach(d => d.Control.DroopControl.ReferenceVoltage = gridTie ? configFile.GridTie.DcDc.ReferenceDcLinkVoltage : configFile.IslandMode.DcDc.ReferenceDcLinkVoltage);
|
dcDevices.ForEach(d => d.Control.DroopControl.ReferenceVoltage = devicesConfig.DcDc.ReferenceDcLinkVoltage);
|
||||||
|
|
||||||
dcDevices.ForEach(d => d.Control.CurrentControl.MaxBatteryChargingCurrent = configFile.MaxBatteryChargingCurrent);
|
dcDevices.ForEach(d => d.Control.CurrentControl.MaxBatteryChargingCurrent = configFile.MaxBatteryChargingCurrent);
|
||||||
dcDevices.ForEach(d => d.Control.CurrentControl.MaxBatteryDischargingCurrent = configFile.MaxBatteryDischargingCurrent);
|
dcDevices.ForEach(d => d.Control.CurrentControl.MaxBatteryDischargingCurrent = configFile.MaxBatteryDischargingCurrent);
|
||||||
|
|
Loading…
Reference in New Issue