45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
|
using InnovEnergy.Lib.Devices.Trumpf.SystemControl.DataTypes;
|
||
|
using InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.DataTypes;
|
||
|
using InnovEnergy.Lib.Units;
|
||
|
|
||
|
namespace InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.Control;
|
||
|
|
||
|
public class DcControl
|
||
|
{
|
||
|
public Voltage ReferenceVoltage
|
||
|
{
|
||
|
get => Is480V ? _Self.DcLinkReferenceVoltage480VGrid : _Self.DcLinkReferenceVoltage380400VGrid;
|
||
|
set
|
||
|
{
|
||
|
_Self.DcLinkReferenceVoltage480VGrid = value;
|
||
|
_Self.DcLinkReferenceVoltage380400VGrid = value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public Voltage MinVoltage
|
||
|
{
|
||
|
get => Is480V ? _Self.DcLinkMinVoltage480VGrid : _Self.DcLinkMinVoltage380400VGrid;
|
||
|
set
|
||
|
{
|
||
|
_Self.DcLinkMinVoltage480VGrid = value;
|
||
|
_Self.DcLinkMinVoltage380400VGrid = value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public Voltage MaxVoltage
|
||
|
{
|
||
|
get => Is480V ? _Self.DcLinkMaxVoltage480VGrid : _Self.DcLinkMaxVoltage380400VGrid;
|
||
|
set
|
||
|
{
|
||
|
_Self.DcLinkMaxVoltage480VGrid = value;
|
||
|
_Self.DcLinkMaxVoltage380400VGrid = value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public DcPrechargeConfig PrechargeConfig => _Self.DcPrechargeConfig;
|
||
|
|
||
|
private Boolean Is480V => _Self.GridType is GridType.GridTied480V60Hz or GridType.Island480V60Hz;
|
||
|
|
||
|
internal DcControl(AcDcRecord self) => _Self = self;
|
||
|
private readonly AcDcRecord _Self;
|
||
|
}
|