Package io.openems.edge.ess.mr.gridcon
Class GridconPcsImpl
java.lang.Object
io.openems.edge.common.component.AbstractOpenemsComponent
io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
io.openems.edge.ess.mr.gridcon.GridconPcsImpl
- All Implemented Interfaces:
ModbusComponent
,OpenemsComponent
,GridconPcs
,org.osgi.service.event.EventHandler
public class GridconPcsImpl
extends AbstractOpenemsModbusComponent
implements ModbusComponent, OpenemsComponent, GridconPcs, org.osgi.service.event.EventHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
AbstractOpenemsModbusComponent.BitConverter, AbstractOpenemsModbusComponent.ChannelMapper<ELEMENT extends ModbusElement>
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
ModbusComponent.ChannelId
Nested classes/interfaces inherited from interface io.openems.edge.common.component.OpenemsComponent
OpenemsComponent.ChannelId
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
static final double
static final double
static final double
Fields inherited from interface io.openems.edge.ess.mr.gridcon.GridconPcs
DC_LINK_VOLTAGE_SETPOINT, DEFAULT_GRID_FREQUENCY, DEFAULT_GRID_VOLTAGE, MAX_POWER_PER_INVERTER, NOMINAL_CURRENT_PER_UNIT, NOMINAL_POWER_PER_UNIT, POWER_PRECISION_WATT, Q_LIMIT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Handles @Deactivate of implementations.debugLog()
Gets some output that is suitable for a continuous Debug log.protected ModbusProtocol
Defines the Modbus protocol.void
void
void
float
float
float
float
float
float
float
float
float
float
float
float
float
float
float
double
double
int
int
float
float
float
float
float
float
void
handleEvent
(org.osgi.service.event.Event event) boolean
boolean
boolean
isError()
boolean
isIpusStarted
(boolean enableIpu1, boolean enableIpu2, boolean enableIpu3) boolean
boolean
boolean
void
setAcknowledge
(boolean acknowledge) void
setBalancingMode
(BalancingMode balancingMode) void
setCosPhiSetPoint1
(float cosPhiSetPoint1) void
setCosPhiSetPoint2
(float cosPhiSetPoint2) void
setDcLinkVoltage
(float dcLinkVoltageSetpoint) void
setEnableIpu1
(boolean enabled) void
setEnableIpu2
(boolean enabled) void
setEnableIpu3
(boolean enabled) void
setErrorCodeFeedback
(int errorCodeFeedback) void
setF0
(float onGridFrequencyFactor) void
setFundamentalFrequencyMode
(FundamentalFrequencyMode fundamentalFrequencyMode) void
setHarmonicCompensationMode
(HarmonicCompensationMode harmonicCompensationMode) void
setIRefStringA
(Float current) void
setIRefStringB
(Float current) void
setIRefStringC
(Float current) protected void
setModbus
(BridgeModbus modbus) Set the Modbus bridge.void
void
setPControlMode
(PControlMode pControlMode) void
setPlay
(boolean play) void
setPMaxChargeIpu1
(float maxPower) void
setPMaxChargeIpu2
(float maxPower) void
setPMaxChargeIpu3
(float maxPower) void
setPMaxDischargeIpu1
(float maxPower) void
setPMaxDischargeIpu2
(float maxPower) void
setPMaxDischargeIpu3
(float maxPower) void
setPower
(int activePower, int reactivePower) void
setQLimit
(float qLimit) void
setStop
(boolean stop) void
setStringControlMode
(int stringControlMode) void
setSyncDate
(int date) void
setSyncTime
(int time) void
setU0
(float onGridVoltageFactor) void
setWeightStringA
(Float weight) void
setWeightStringB
(Float weight) void
setWeightStringC
(Float weight) protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
Methods inherited from class io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent
activate, activate, activate, getBridgeModbus, getModbusProtocol, getUnitId, m, m, m, m, m, m, modified, modified, retryModbusCommunication, unsetModbus
Methods inherited from class io.openems.edge.common.component.AbstractOpenemsComponent
_channel, addChannel, addChannels, addChannels, alias, channels, getComponentContext, id, isEnabled, logDebug, logError, logInfo, logWarn, removeChannel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.bridge.modbus.api.ModbusComponent
_setModbusCommunicationFailed, getModbusCommunicationFailed, getModbusCommunicationFailedChannel, retryModbusCommunication
Methods inherited from interface io.openems.edge.common.component.OpenemsComponent
_channel, _getChannelAs, alias, channel, channel, channels, getComponentContext, getState, getStateChannel, hasFaults, id, isEnabled, serviceFactoryPid, servicePid
-
Field Details
-
DC_LINK_VOLTAGE_TOLERANCE_VOLT
public static final float DC_LINK_VOLTAGE_TOLERANCE_VOLT- See Also:
-
EFFICIENCY_LOSS_FACTOR
public static final double EFFICIENCY_LOSS_FACTOR- See Also:
-
EFFICIENCY_LOSS_DISCHARGE_FACTOR
public static final double EFFICIENCY_LOSS_DISCHARGE_FACTOR- See Also:
-
EFFICIENCY_LOSS_CHARGE_FACTOR
public static final double EFFICIENCY_LOSS_CHARGE_FACTOR- See Also:
-
-
Constructor Details
-
GridconPcsImpl
public GridconPcsImpl()
-
-
Method Details
-
setModbus
Description copied from class:AbstractOpenemsModbusComponent
Set the Modbus bridge. Should be called by @Reference- Overrides:
setModbus
in classAbstractOpenemsModbusComponent
- Parameters:
modbus
- the BridgeModbus Reference
-
deactivate
protected void deactivate()Description copied from class:AbstractOpenemsComponent
Handles @Deactivate of implementations. Prints log output.- Overrides:
deactivate
in classAbstractOpenemsModbusComponent
-
getMaxApparentPower
public float getMaxApparentPower()- Specified by:
getMaxApparentPower
in interfaceGridconPcs
-
doWriteTasks
- Specified by:
doWriteTasks
in interfaceGridconPcs
- Throws:
OpenemsError.OpenemsNamedException
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
debugLog
Description copied from interface:OpenemsComponent
Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.- Specified by:
debugLog
in interfaceOpenemsComponent
- Returns:
- the debug log output
-
setPower
public void setPower(int activePower, int reactivePower) - Specified by:
setPower
in interfaceGridconPcs
-
writeCommands
-
writeCcuParameters1
protected void writeCcuParameters1() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeCcuParameters2
protected void writeCcuParameters2() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeCosPhiParameters
protected void writeCosPhiParameters() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeIpuInverter1ControlCommand
protected void writeIpuInverter1ControlCommand() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeIpuInverter2ControlCommand
protected void writeIpuInverter2ControlCommand() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeIpuInverter3ControlCommand
protected void writeIpuInverter3ControlCommand() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
writeDcDcControlCommandWord
protected void writeDcDcControlCommandWord() throws IllegalArgumentException, OpenemsError.OpenemsNamedException -
defineModbusProtocol
Description copied from class:AbstractOpenemsModbusComponent
Defines the Modbus protocol.- Specified by:
defineModbusProtocol
in classAbstractOpenemsModbusComponent
- Returns:
- the ModbusProtocol
- Throws:
OpenemsException
- on error
-
setErrorCodeFeedback
public void setErrorCodeFeedback(int errorCodeFeedback) - Specified by:
setErrorCodeFeedback
in interfaceGridconPcs
-
getErrorCode
public int getErrorCode()- Specified by:
getErrorCode
in interfaceGridconPcs
-
getActivePower
public float getActivePower()- Specified by:
getActivePower
in interfaceGridconPcs
-
getReactivePower
public float getReactivePower()- Specified by:
getReactivePower
in interfaceGridconPcs
-
getDcLinkPositiveVoltage
public float getDcLinkPositiveVoltage()- Specified by:
getDcLinkPositiveVoltage
in interfaceGridconPcs
-
isCommunicationBroken
public boolean isCommunicationBroken()- Specified by:
isCommunicationBroken
in interfaceGridconPcs
-
setEnableIpu1
public void setEnableIpu1(boolean enabled) - Specified by:
setEnableIpu1
in interfaceGridconPcs
-
setEnableIpu2
public void setEnableIpu2(boolean enabled) - Specified by:
setEnableIpu2
in interfaceGridconPcs
-
setEnableIpu3
public void setEnableIpu3(boolean enabled) - Specified by:
setEnableIpu3
in interfaceGridconPcs
-
setBalancingMode
- Specified by:
setBalancingMode
in interfaceGridconPcs
-
setMode
- Specified by:
setMode
in interfaceGridconPcs
-
setU0
public void setU0(float onGridVoltageFactor) - Specified by:
setU0
in interfaceGridconPcs
-
setF0
public void setF0(float onGridFrequencyFactor) - Specified by:
setF0
in interfaceGridconPcs
-
setPControlMode
- Specified by:
setPControlMode
in interfaceGridconPcs
-
setQLimit
public void setQLimit(float qLimit) - Specified by:
setQLimit
in interfaceGridconPcs
-
setPMaxChargeIpu1
public void setPMaxChargeIpu1(float maxPower) - Specified by:
setPMaxChargeIpu1
in interfaceGridconPcs
-
setPMaxDischargeIpu1
public void setPMaxDischargeIpu1(float maxPower) - Specified by:
setPMaxDischargeIpu1
in interfaceGridconPcs
-
setPMaxChargeIpu2
public void setPMaxChargeIpu2(float maxPower) - Specified by:
setPMaxChargeIpu2
in interfaceGridconPcs
-
setPMaxDischargeIpu2
public void setPMaxDischargeIpu2(float maxPower) - Specified by:
setPMaxDischargeIpu2
in interfaceGridconPcs
-
setPMaxChargeIpu3
public void setPMaxChargeIpu3(float maxPower) - Specified by:
setPMaxChargeIpu3
in interfaceGridconPcs
-
setPMaxDischargeIpu3
public void setPMaxDischargeIpu3(float maxPower) - Specified by:
setPMaxDischargeIpu3
in interfaceGridconPcs
-
setDcLinkVoltage
public void setDcLinkVoltage(float dcLinkVoltageSetpoint) - Specified by:
setDcLinkVoltage
in interfaceGridconPcs
-
setWeightStringA
- Specified by:
setWeightStringA
in interfaceGridconPcs
-
setWeightStringB
- Specified by:
setWeightStringB
in interfaceGridconPcs
-
setWeightStringC
- Specified by:
setWeightStringC
in interfaceGridconPcs
-
setStringControlMode
public void setStringControlMode(int stringControlMode) - Specified by:
setStringControlMode
in interfaceGridconPcs
-
setIRefStringA
- Specified by:
setIRefStringA
in interfaceGridconPcs
-
setIRefStringB
- Specified by:
setIRefStringB
in interfaceGridconPcs
-
setIRefStringC
- Specified by:
setIRefStringC
in interfaceGridconPcs
-
enableDcDc
public void enableDcDc()- Specified by:
enableDcDc
in interfaceGridconPcs
-
disableDcDc
public void disableDcDc()- Specified by:
disableDcDc
in interfaceGridconPcs
-
getErrorCount
public int getErrorCount()- Specified by:
getErrorCount
in interfaceGridconPcs
-
setSyncDate
public void setSyncDate(int date) - Specified by:
setSyncDate
in interfaceGridconPcs
-
setSyncTime
public void setSyncTime(int time) - Specified by:
setSyncTime
in interfaceGridconPcs
-
isStopped
public boolean isStopped()- Specified by:
isStopped
in interfaceGridconPcs
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceGridconPcs
-
isError
public boolean isError()- Specified by:
isError
in interfaceGridconPcs
-
setStop
public void setStop(boolean stop) - Specified by:
setStop
in interfaceGridconPcs
-
setAcknowledge
public void setAcknowledge(boolean acknowledge) - Specified by:
setAcknowledge
in interfaceGridconPcs
-
setPlay
public void setPlay(boolean play) - Specified by:
setPlay
in interfaceGridconPcs
-
isDcDcStarted
public boolean isDcDcStarted()- Specified by:
isDcDcStarted
in interfaceGridconPcs
-
isIpusStarted
public boolean isIpusStarted(boolean enableIpu1, boolean enableIpu2, boolean enableIpu3) - Specified by:
isIpusStarted
in interfaceGridconPcs
-
getActivePowerPreset
public float getActivePowerPreset()- Specified by:
getActivePowerPreset
in interfaceGridconPcs
-
getEfficiencyLossChargeFactor
public double getEfficiencyLossChargeFactor()- Specified by:
getEfficiencyLossChargeFactor
in interfaceGridconPcs
-
getEfficiencyLossDischargeFactor
public double getEfficiencyLossDischargeFactor()- Specified by:
getEfficiencyLossDischargeFactor
in interfaceGridconPcs
-
isUndefined
public boolean isUndefined()- Specified by:
isUndefined
in interfaceGridconPcs
-
setFundamentalFrequencyMode
- Specified by:
setFundamentalFrequencyMode
in interfaceGridconPcs
-
setHarmonicCompensationMode
- Specified by:
setHarmonicCompensationMode
in interfaceGridconPcs
-
getCurrentL1Grid
public float getCurrentL1Grid()- Specified by:
getCurrentL1Grid
in interfaceGridconPcs
-
getCurrentL2Grid
public float getCurrentL2Grid()- Specified by:
getCurrentL2Grid
in interfaceGridconPcs
-
getCurrentL3Grid
public float getCurrentL3Grid()- Specified by:
getCurrentL3Grid
in interfaceGridconPcs
-
getCurrentLNGrid
public float getCurrentLNGrid()- Specified by:
getCurrentLNGrid
in interfaceGridconPcs
-
getActivePowerL1Grid
public float getActivePowerL1Grid()- Specified by:
getActivePowerL1Grid
in interfaceGridconPcs
-
getActivePowerL2Grid
public float getActivePowerL2Grid()- Specified by:
getActivePowerL2Grid
in interfaceGridconPcs
-
getActivePowerL3Grid
public float getActivePowerL3Grid()- Specified by:
getActivePowerL3Grid
in interfaceGridconPcs
-
getActivePowerSumGrid
public float getActivePowerSumGrid()- Specified by:
getActivePowerSumGrid
in interfaceGridconPcs
-
getReactivePowerL1Grid
public float getReactivePowerL1Grid()- Specified by:
getReactivePowerL1Grid
in interfaceGridconPcs
-
getReactivePowerL2Grid
public float getReactivePowerL2Grid()- Specified by:
getReactivePowerL2Grid
in interfaceGridconPcs
-
getReactivePowerL3Grid
public float getReactivePowerL3Grid()- Specified by:
getReactivePowerL3Grid
in interfaceGridconPcs
-
getReactivePowerSumGrid
public float getReactivePowerSumGrid()- Specified by:
getReactivePowerSumGrid
in interfaceGridconPcs
-
getApparentPowerL1Grid
public float getApparentPowerL1Grid()- Specified by:
getApparentPowerL1Grid
in interfaceGridconPcs
-
getApparentPowerL2Grid
public float getApparentPowerL2Grid()- Specified by:
getApparentPowerL2Grid
in interfaceGridconPcs
-
getApparentPowerL3Grid
public float getApparentPowerL3Grid()- Specified by:
getApparentPowerL3Grid
in interfaceGridconPcs
-
getApparentPowerSumGrid
public float getApparentPowerSumGrid()- Specified by:
getApparentPowerSumGrid
in interfaceGridconPcs
-
setCosPhiSetPoint1
public void setCosPhiSetPoint1(float cosPhiSetPoint1) - Specified by:
setCosPhiSetPoint1
in interfaceGridconPcs
-
setCosPhiSetPoint2
public void setCosPhiSetPoint2(float cosPhiSetPoint2) - Specified by:
setCosPhiSetPoint2
in interfaceGridconPcs
-