User Tools

Site Tools


ess:ess_mode_2_and_3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ess:ess_mode_2_and_3 [2017-05-18 12:58] – [5. Response times] mvaderess:ess_mode_2_and_3 [2023-02-14 15:25] (current) mvader
Line 1: Line 1:
 ====== ESS mode 2 and 3 ====== ====== ESS mode 2 and 3 ======
  
-This page explains how to use a Multi/Quattro as a bidirectional inverter operating parallel to the grid, integrated into a customer designed system (PLC or other). In mode 2, Advanced, or more 3, Custom.+This page explains how to use a Multi/Quattro as a bidirectional inverter operating parallel to the grid, integrated into a customer designed system (PLC, Virtual Power Plant, or other).
  
-Note that it is also possible to run a Victron grid parallel storage system without designing and implementing your own control loop, logic or measurements. See the  [[ess:design-installation-manual|ESS manual]].+The here described functionality builds on top of the normal standalone operation, see [[ess:design-installation-manual|ESS manual]].
  
 +WARNING & DISCLAIMER: whilst publically available, Victron Energy does not offer support in professional customers or end-users that implement features using the here documented functionality, except in real specific situations.
 ===== 1. Overview of ESS operating modes ===== ===== 1. Overview of ESS operating modes =====
  
-==== 1.1 Mode 1 - Standard ==== +==== 1.1 Mode 1 ==== 
-The system runs automatically, and uses excess energy harvested during the day to fill the gaps when there is not enough PV power available. Typically in the evening and night. Easy configuration in Assistants and on the Color Control GX. For details refer to the [[ess:design-installation-manual|ESS manual]].+The system runs automatically, and uses excess energy harvested during the day to fill the gaps when there is not enough PV power available. Typically in the evening and night. Easy configuration in Assistants and on the GX device. For details refer to the [[ess:design-installation-manual|ESS manual]].
  
-==== 1.2 Mode 2 - Advanced ==== +==== 1.2 Mode 2 ==== 
-Same as standard operating mode, but customer adds custom control doing time shifting, load management or other energy management optimization algorithms. The required components in the system, as well as the general software setup, is 100% equal to the default, Mode 1. The available control points are:+Same as Mode 1, but with added custom control doing time shifting, load management or other energy management optimization algorithms. The required components in the system, as well as the general software setup, is 100% equal to the default, Mode 1. The available control points are:
   * Grid power setpoint   * Grid power setpoint
   * Enable/Disable charge   * Enable/Disable charge
   * Enable/Disable inverter   * Enable/Disable inverter
  
-There are two ways access those control points+There are various ways to access those control points. Including ModbusTCP, MQTT either locally or remotely through our secure connectionas well as other means.
-  * Send commands to the CCGX via ModbusTCP, from an external control module, a PLC for example. +
-  * Run self-implemented scripts on the CCGXsame functionality, but then it is not needed to add a PLC to the system.+
  
-For more information, see [[#details_of_operating_mode_2_-_advanced|the Mode 2 details]].+==== 1.3 - Mode 3 ====
  
-==== 1.3 Mode 3 - Custom ==== +Customer self implements their control loop and grid measurements, and uses the MultiPlus and/or Quattros as simple, remote controllable, bidirectional inverter/chargers that can be set to either charge or discharge an x amount of Watts. Note that the point of control is the AC-input, not the inverter/charger itself.
-Customer self implements their control loop and grid measurements, and uses the MultiPlus and/or Quattros as simple, remote controllable, bidirectional inverter/chargers that can be set to either charge or discharge an x amount of Watts. Note that the point of control is the AC-input, not the charger itself.+
  
   Power to/from AC-input = Power to/from battery + Power to/from AC-output   Power to/from AC-input = Power to/from battery + Power to/from AC-output
Line 29: Line 27:
 Necessary Victron equipment: Necessary Victron equipment:
   * Multi or Quattro inverter/charger   * Multi or Quattro inverter/charger
-  * Color Control GX+  * [[venus-os:start|GX device]]
   * Note that there is no AC sensor necessary, since the inverter/charger will act as a 'dumb' bi-directional inverter/charger. It will act on the external command given, which can for example be 'take 2000W from AC in, or feed back 100W through AC in'.   * Note that there is no AC sensor necessary, since the inverter/charger will act as a 'dumb' bi-directional inverter/charger. It will act on the external command given, which can for example be 'take 2000W from AC in, or feed back 100W through AC in'.
  
-Available control points+Available control points include the switch (on, charger-only, inverter-only, off), a power setpoint in Watts: regulates the power on the ac-input, and more. Similar to Mode 2, there are various ways to access those control points. Refer to the detailed section below.
-  * Switch (on, charger-only, inverter-only, off) +
-  * Power setpoint in Watts: regulates the power on the ac-input. +
-  * Disable charge flag +
-  * Disable feed-in flag+
  
-For more information, see [[#details_of_operating_mode_3_-_custom|the Mode 3 details]].+=== Mode 3 with a managed battery === 
 +When using Mode 3 with a managed battery, please note that the maximum discharge current sent by the battery will be ignored. The implemented control loop should take care of discharge limits communicated by the battery.
  
 +The maximum charge current sent by a managed battery is however always heeded and cannot be overruled by the setpoint.
  
-===== 2. Details of operating mode - Advanced =====+ 
 +===== 2. Mode in detail =====
  
 ==== 2.1 Available control points ==== ==== 2.1 Available control points ====
Line 48: Line 45:
   * Positive: take power from grid.   * Positive: take power from grid.
   * Negative: send power to grid.   * Negative: send power to grid.
-  * Default: 0W.+  * Default: 30 W. 
 +  * This register has range -32768W to 32767W (scale factor=1). Use register 2703 for a larger range (scale factor=0.01).
  
-=== b) Enable/Disable charge - Modbus-TCP register 2701 ===+=== b) Enable/Disable charge - Modbus-TCP register 2701 (deprecated in favour of 2705) ===
  
   * 0: disable charging. This setting may be used for time shifting. For example by disabling charging the battery when feeding back to the grid is profitable, and leaving battery capacity for later.   * 0: disable charging. This setting may be used for time shifting. For example by disabling charging the battery when feeding back to the grid is profitable, and leaving battery capacity for later.
   * 100: unlimited charging. Battery, VEConfigure settings, and BMS permitting. Use value 100 here instead of 1 because this setting was originally designed to be used as a percentage.   * 100: unlimited charging. Battery, VEConfigure settings, and BMS permitting. Use value 100 here instead of 1 because this setting was originally designed to be used as a percentage.
  
-Note that this settings has a higher priority than the //Grid power setpoint//.+Notes: 
 +  * This setting is deprecated and only works when DVCC is disabled. It is retained for backwards compatibility only. Use register 2705 instead to control battery charging. 
 +  * This setting has a higher priority than the //Grid power setpoint//.
  
-=== c) Enable/Disable inverter - Modbus-TCP register 2702 ===+=== c) Enable/Disable inverter - Modbus-TCP register 2702 (deprecated in favour of 2704) ===
   * 0: disable inverter   * 0: disable inverter
   * 100: enabled inverter. Use value 100 here instead of 1 because this setting was originally designed to be used as a percentage.   * 100: enabled inverter. Use value 100 here instead of 1 because this setting was originally designed to be used as a percentage.
  
-Note that this settings has a higher priority than the //Grid power setpoint//.+Notes: 
 +  * This setting is deprecated and only works when DVCC is disabled. It is retained for backwards compatibility only. Use register 2704 instead to control battery discharge. 
 +  * This settings has a higher priority than the //Grid power setpoint//.
  
-See the Modbus-TCP excel sheet for scaling and datatypes, available [[https://www.victronenergy.com/support-and-downloads/whitepapers|here]].+=== d) Maximum inverter power - Modbus-TCP register 2704 === 
 +  * -1: No limit 
 +  * Any positive number: Maximum power in Watt that the Multi will feed to the loads.
  
 +=== e) DVCC maximum system charge current - Modbus-TCP register 2705 ===
 +  * -1: No limit. Solar Chargers and the Multi will charge to their full capacity or individual configured limits.
 +  * Any positive number: Maximum combined current in Ampere for battery charging. This limits the solar chargers and the multi, and takes loads into account. Solar chargers take priority over the Multi.
 +
 +=== f) Maximum system grid feed-in - Modbus-TCP register 2706 ===
 +  * -1: No limit. If feeding in excess PV is enabled, all of it will be fed in. See registers 2707 and 2708 below.
 +  * Any positive number: Maximum power in 100 Watt units to feed into the grid.
 +
 +=== g) Feed excess DC-coupled PV into the grid - Modbus-TCP register 2707 ===
 +  * 0: Excess DC-coupled PV is not fed into the grid.
 +  * 1: Excess DC-coupled PV is fed into the grid
 +
 +=== h) Feed excess AC-coupled PV into the grid - Modbus-TCP register 2708 ===
 +Please note that for historical reasons this register is inverted compared to 2707.
 +  * 0: Excess AC-coupled PV is fed into the grid
 +  * 1: Excess AC-coupled PV is not fed into the grid.
 +
 +=== i) Grid limiting status - Modbus-TCP register 2709 ===
 +When feed-in of excess AC-coupled PV is disabled, or when a limit is set in register 2706, limiting will be active.
 +  * 0: Feed-in of excess power is not limited in any way.
 +  * 1: Feed-in of excess power is limited in some way, either register 2707 is set to 0, or register 2706 is set to a positive number.
 ==== 2.2 Accessing the control points ==== ==== 2.2 Accessing the control points ====
  
Line 71: Line 96:
  
 === B) Via MQTT === === B) Via MQTT ===
-Recently we have added MQTT to the protocols on the CCGX. For more information, see [[https://groups.google.com/forum/m/#!forum/victron-dev-venus|the developer mailing list]] as well as the [[https://github.com/victronenergy/dbus-mqtt|mqtt github repo]].+For more information, see [[https://groups.google.com/forum/m/#!forum/victron-dev-venus|the developer mailing list]] as well as the [[https://github.com/victronenergy/dbus-mqtt|mqtt github repo]]
 + 
 +MQTT is available both on the local broker on the [[venus-os:start|GX device]], as well as remotely through the secure cloud connection.
  
-=== C) Running your own scriptson the CCGX ===+=== C) Running your own scripts on the GX device ===
 Start reading [[open_source:start|here]]. Start reading [[open_source:start|here]].
  
 The ESS related D-Bus paths are: The ESS related D-Bus paths are:
-  * com.victronenergy.hub4 /AcPowerSetpoint +  * com.victronenergy.settings /Settings/CGwacs/AcPowerSetPoint        (Grid power setpoint) 
-  * com.victronenergy.hub4 /MaxChargePercentage    (Enable/Disable charger) +  * com.victronenergy.settings /Settings/CGwacs/MaxChargePercentage    (Enable/Disable charger) 
-  * com.victronenergy.hub4 /MaxDischargePercentage (Enable/Disable inverter)+  * com.victronenergy.settings /Settings/CGwacs/MaxDischargePercentage (Enable/Disable inverter
 +  * com.victronenergy.settings /Settings/CGwacs/MaxDischargePower      (Maximum inverter power) 
 +  * com.victronenergy.settings /Settings/SystemSetup/MaxChargeCurrent  (DVCC maximum charge current) 
 +  * com.victronenergy.settings /Settings/CGwacs/MaxFeedInPower         (Maximum system grid feed-in of excess power) 
 +  * com.victronenergy.settings /Settings/CGwacs/OvervoltageFeedIn      (Feed-in excess DC-coupled PV) 
 +  * com.victronenergy.settings /Settings/CGwacs/PreventFeedback        (Don't feed in excess AC-coupled PV) 
 +  * com.victronenergy.hub4 /PvPowerLimiterActive                       (Read-only value indicating if limiting is active)
  
-Note that the paths are represented as percentage, but should be used as on/off switch (0: off,+Note that the MaxChargePercentage and MaxDischargePercentage paths are represented as percentage, but should be used as on/off switch (0: off,
 100: on). 100: on).
  
 ==== 2.3 Background ==== ==== 2.3 Background ====
-In standard mode the ESS control system tries to keep the power flowing through the grid meter at 0 Watt (so no power is taken in from the grid, nor is any power fed back to the grid). Mode 2 means you set the target for the grid power. Setting the target to 100 Watt means that the system tries to take 100 Watt from the grid. The power will be used to feed the loads or charge the battery. Similar, a negative value will instruct the system to feed back power to the grid. This will be PV power when possible, otherwise the battery will be discharged. Reset the setpoint back to 0 Watt, and you are back in standard mode again.+In Mode 1, standalone operation, the ESS control system tries to keep the power flowing through the grid meter at 0 Watt (so no power is taken in from the grid, nor is any power fed back to the grid). Mode 2 means you actively control the target for the grid power. Setting the target to 100 Watt means that the system tries to take 100 Watt from the grid. The power will be used to feed the loads or charge the battery. Similar, a negative value will instruct the system to feed back power to the grid. This will be PV power when possible, otherwise the battery will be discharged. Reset the setpoint back to 0 Watt, and you are back in standard mode again.
  
 In addition you can also control battery charge and discharge. This allows you to control when the battery is charged and discharged. In addition you can also control battery charge and discharge. This allows you to control when the battery is charged and discharged.
Line 93: Line 126:
   * The above settings are intended for power management, and will be overridden by battery safety mechanisms. For example: if the multi is in sustain mode - because the battery is almost empty - it will start charging the battery, event if the grid power setpoint is negative or the maximum charge percentage is set to zero.   * The above settings are intended for power management, and will be overridden by battery safety mechanisms. For example: if the multi is in sustain mode - because the battery is almost empty - it will start charging the battery, event if the grid power setpoint is negative or the maximum charge percentage is set to zero.
   * Sustain will always remain in operation. Disabling charge will not disable sustain.   * Sustain will always remain in operation. Disabling charge will not disable sustain.
-  * In mode 2 the CCGX will change the Multi's AC-In power setpoint (see Mode 3) continuously, so it does not make sense to change the setpoint in this mode. +  * See ModbusTCP excel sheet for scaling and data types, available [[https://www.victronenergy.com/support-and-downloads/whitepapers|here]].
-  * See modbustcp excel sheet for scaling and data types, available [[https://www.victronenergy.com/support-and-downloads/whitepapers|here]].+
  
-===== 3. Details of operating mode - Custom =====+===== 3. Mode in detail =====
 ==== 3.1 Operation ==== ==== 3.1 Operation ====
  
-Mode 3 means you take direct control of the Multi itself by setting the power it should take/feed back on its AC input. It allows for easy control of the power flowing to the battery. The power flowing to the batter (or more precise: to DC system attached to the Multi) is equal to the AC-In power minus the AC-Out power. In mode 3 you have to create your own control loop, and update set setpoint frequently.+Mode 3 means you take direct control of the Multi itself by setting the power it should take/feed back on its AC input. It allows for full control of the inverter/charger and the power from- and to the battery. The power flowing to the batter (or more precise: to DC system attached to the Multi) is equal to the AC-In power minus the AC-Out power. In Mode 3 you have to create your own control loop, and update the set-point frequently.
  
-  * When the grid is available, the Multi will be connected to the grid. You can control its operation with the Power setpoint. When positive, energy will flow to the grid. When negative, energy will be taken from the grid. Some examples: +==== 3.2 Using ModbusTCP ====
-    * When set to +400W, it will feed 400W back through its input. This energy will be taken from the battery. If there is also a 200W AC load connected to AC output the total energy taken from the battery will be 600W. The batteries will always be discharged when the setpoint is positive. +
-    * When set to -400W, it will take 400W from the AC input. When the load on the output is lower than 400W, it will charge the battery with the difference. When the load on the AC output is higher, it will discharge the battery with the difference. So with a negative setpoint charge/discharge depends also on the connected loads. +
-    * **Important note**: When using the CCGX to communicate with the ESS assistant (see further on) you should bear in mind that the CCGX inverts the setpoint. So positive becomes negative and vice versa. +
-  * Note that it will always remain within battery and maximum inverter power limits: when the battery is full, or when the maximum charge current as configured in VEConfigure is already met, it will not draw more power. And when instructed to discharge with 10000 watt, while it is a 2500W inverter, it will discharge with 2500W, until the battery is empty. +
-  * To force the Multi to Inverter Mode, set the switch to Inverter-only. Note that when you do that, there will be no grid assist, meaning that on an overload the Inverter will switch off, signalling overload alarm. Instead of switching back to grid. +
-  * When no grid is available, it will automatically switch to inverter mode (seamless), unless the switch is set to charger-only. While in inverter mode, the Power setpoint is in-effective.+
  
-==== 3.2 Notes ==== +Use unit-id 246, which corresponds with the CCGX VE.Bus port. On a Venus-GX, use unit-id 242 instead. 
-If no new value is sent to the Multi for longer than 60 seconds, the Multi will automatically fall back to 'bypass' that is: No charge/No discharge. The internal transfer relay is closed when AC input is availableIn that case any loads on the AC output are fed by the AC inputIf there is no AC input available, the unit will switch to inverter mode(Unless it is set to 'Charger Only' or receives a 'low cell' signal from the VE.Bus BMS). + 
-  * Send target value to the CCGX via ModbusTCP: +=== a) Grid power setpoint - Modbus-TCP registers 37, 40 and 41 === 
-    * unit-id 246 (CCGX VE.Bus port+  * Positive: Take power from the grid. 
-    * register-id 37 (/Hub4/AcPowerSetpoint)\\ **Important:** The CCGX __inverts__ the value of the setpoint. So use a positive value to instruct charging and a negative one to tell it to discharge. The unit is Watts+  * Negative: Send power to the grid. 
-    * register-id 38 (= /Hub4/DisableCharge) \\ Value 0: charge enabled, Value 1: charge disabled.\\ **Important:** Disabling charge will also disable feedback+  * Register 37 controls the setpoint on single-phase systems, or for L1 on Multiphase systems. 
-    * register-id 39 (= /Hub4/DisableFeedIn) \\ Value 0: feed-in enabled, Value 1: feed-in disabled.\\ If feed-in is disabled, the battery will not discharge. In case of grid failure, this parameter will be ignored and power will be supplied to AC Out. +  * Registers 40 and 41 controls the setpoints for L2 and L3 respectively. 
-  * Note that it can very well be that the Multi does not do what you want it to do, because the battery is either emptyor full for exampleTherefore, for your control algorithmread the actual power back from the Multi, unit-id 246 and register-id 12.+  * These registers have a range of -32768W to 32767W (scale factor=1). 
 +  * These registers must be written once every 60 seconds, or the Multi will go into Passthru. 
 + 
 +=== b) Disable Charge - Modbus-TCP register 38 === 
 +  * 0: Charger is enabled. 
 +  * 1Charger is disabled.\\ **Important:** Disabling charge will also disable feedback. 
 + 
 +=== c) Disable Feed-in - Modbus-TCP register 39 === 
 +  * 0: The inverter is enabled to feed power into the grid. 
 +  * 1: Inverter will not feed power into the grid. 
 +  * When both Charge and Feed-in is disabled, the Multi will go into Passthru. 
 + 
 +=== d) Disable overvoltage Feed-in - Modbus-TCP register 65 === 
 +Overvoltage feed-in can be used to feed excess DC-tied PV into the grid. Note that DVCC needs to be enabled to properly use this feature. 
 +  * 0: Feed overvoltage into the grid. 
 +  * 1: Do not Feed overvoltage into the grid.   
 + 
 +=== e) Maximum Feed-in power due to overvoltage - Modbus-TCP register 66 to 68 === 
 +When overvoltage feed-in is enabled, these registers can be used to limit how much power is fed in. To disable the limit, write a large number to the register. 
 +  * Register 66: Overvoltage feed-in limit for L1 
 +  * Register 67: Overvoltage feed-in limit for L2 
 +  * Register 68: Overvoltage feed-in limit for L3 
 + 
 +=== f) Power Setpoints acts as limit - Modbus-TCP register 71 === 
 +When this register is set to 1, the Multi will feed in overvoltage up to the value in registers 37, 40 and 41This is useful when powering loads with excess DC-coupled PV, while still keeping the batteries fully charged. The Power setpoints are then set to match the loads as normal, but the Multi will feed in only excess PV and not energy from the batteries. 
 + 
 +=== gOvervoltage offset - Modbus-TCP register 72 === 
 +When feeding excess DC-coupled PV to loads or into the grid, the Multi has two possible settings. It can either add 1V offset to the solar charger charge voltage, or a 100mV offset. These values are for a 12V setup, and must be multiplied by 2 or 4 for a 24V or 48V setup respectively. 
 + 
 +The larger 1V setting is a legacy setting and is now discouraged. When using ESS mode 3 with the overvoltage feed-in feature, it is recommended that you set this register to 1, which will use the lower 100mV offset. 
 +==== 3.3 Running software on the GX device and using DBus paths ==== 
 + 
 +When controlling the Multi using software running on the GX device, you should set //Settings->ESS->Mode// to //external control//. The following dbus paths can then be adjusted on the com.victronenergy.vebus.ttyO1 service. 
 + 
 +=== aGrid Power Setpoints - /Hub4/Lx/AcPowerSetpoint === 
 +  * This includes a path for each available phase 
 +    * /Hub4/L1/AcPowerSetpoint (setpoint for L1) 
 +    * /Hub4/L2/AcPowerSetpoint (setpoint for L2, where available) 
 +    /Hub4/L3/AcPowerSetpoint (setpoint for L3, where available) 
 +  * When set to a positive value, power will be taken from the grid on phase x. 
 +  * When set to a negative value, power will be fed into the grid on phase x
 + 
 +=== b) Disable charger - /Hub4/DisableCharge === 
 +  * 0: Charger is enabled
 +  * 1: Charger is disabled. 
 + 
 +=== c) Disable Feed-in - /Hub4/DisabledFeedIn === 
 +  * 0: The inverter is enabled to feed power into the grid. 
 +  * 1: Inverter will not feed power into the grid and the battery will not discharge. 
 +  * When both Charge and Feed-in is disabled, the Multi will go into Passthru. 
 +  * In case of grid failure, this parameter will be ignored and power will be supplied to AC Out. 
 + 
 + 
 +==== 3.4 How it works ==== 
 +  * When the grid is available, the Multi will be connected to the grid. You can control its operation with the Power setpoint. When negative, energy will flow to the grid. When positive, energy will be taken from the grid. Some examples: 
 +    * When set to -400W, it will feed 400W back through its input. This energy will be taken from the battery. If there is also a 200W AC load connected to AC output the total energy taken from the battery will be 600W. The batteries will always be discharged when the setpoint is negative. 
 +    * When set to 400W, it will take 400W from the AC input. When the load on the output is lower than 400W, it will charge the battery with the difference. When the load on the AC output is higher, it will discharge the battery with the difference. So with a positive setpoint charge/discharge depends also on the connected loads. 
 +    * **Important note**: The above examples describe operation from the point of view of the GX device. When communicating directly with the ESS assistant (see further on) you should bear in mind that the GX device inverts the setpoint: Positive becomes negative and vice versa. 
 +  * Note that it will always remain within battery and maximum inverter power limits: when the battery is full or when the maximum charge current as configured in VEConfigure is already met, it will not draw more power, and when instructed to discharge with 10000 watt while it only has a 2500W inverter capacity, it will discharge with 2500W until the battery is empty. 
 +  * To force the Multi to Inverter Mode, set the switch to Inverter-only. Note that when you do thatthere will be no grid assist. On an overload the Inverter will switch off and signal an overload alarm instead of switching back to the grid. 
 +  * When no grid is available, it will seamlessly switch to inverter mode, unless the switch is set to charger-only. While in inverter mode, the Power setpoint is ineffective. 
 + 
 +==== 3.5 Miscellaneous Notes ==== 
 + 
 +  * The internal transfer relay is closed when AC input is available. While in passthru, loads on the AC output are fed by the AC input. 
 +  * If there is no AC input available, the unit will switch to inverter mode, unless it is set to 'Charger Only' or receives a 'low cell' signal from a BMS. 
 +  * Note that the Multi may well ignore your instructions if it cannot comply, for example because the battery is either empty or full. For your control algorithm always read the actual power back from the Multi, unit-id 246 and register-id 12.
   * See modbustcp excel sheet for scaling and data types, available [[https://www.victronenergy.com/support-and-downloads/whitepapers|here]].   * See modbustcp excel sheet for scaling and data types, available [[https://www.victronenergy.com/support-and-downloads/whitepapers|here]].
-  * Note that the mechanism is slow, which to our opinion is not perfect, but also no problem+  * Note that there are various ramp-up and ramp-down restrictionsenforced by grid-codes and compliancy as well as for stability reasons; which might make the system respond slow to large load commands
-  * The 'VE.Bus to VE.Can interface' does not yet support reading and writing the ESS/grid-parallel setpoint. +  * The 'VE.Bus to VE.Can interface' does not support reading and writing the ESS/grid-parallel setpoint. 
-  * If your system contains a ESS compatible AC-Sensor which is set up as grid meter, the CCGX will automatically enter mode 1 and start updating the AC power setpoint continuously. You can disable this behavior by setting //Settings->ESS->Mode// to //external control//. This will also disable [[ess:design-installation-manual#batterylife|BatteryLife]]. To do this via D-Bus or MQTT: set the value of /Settings/CGwacs/Hub4Mode in the com.victronenergy.settings service to 3 (=ESS control disabled).+  * If your system contains a ESS compatible AC-Sensor which is set up as grid meter, the GX device will automatically enter mode 1 and start updating the AC power setpoint continuously. You can disable this behavior by setting //Settings->ESS->Mode// to //external control//. This will also disable [[ess:design-installation-manual#batterylife|BatteryLife]]. To do this via D-Bus or MQTT: set the value of /Settings/CGwacs/Hub4Mode in the com.victronenergy.settings service to 3 (=ESS control disabled)
 + 
 +==== 3.6 Using the MK3 directly instead of via GX device ==== 
 + 
 +=== 3.6.1 Introduction === 
 +In this setup, it is not necessary to use a GX device for the control interface. Instead an MK3 is used. We have both MK2-RS232 and an MK3-USB available, see the pricelist. 
 + 
 +The MK3-USB has replaced the MK2-USB. There are no differences in the protocol.
  
-==== 3.3 Using the MK2 directly instead of CCGX ====+A direct connection to the VE.Bus RS485, without MK3 or GX device, is not possible.
  
-In this setupit is not necessary to use a CCGXInstead an MK2 is used. We have both MK2-RS232 and an MK2-USB available, see the pricelist. A direct connection to the VE.Bus RS485without MK2 or CCGX, is not possible.+Note thatas also indicated on the Data Communication whitepaper, the MK2/3 protocol is not an easy protocolThat is unfortunate, but it is what it is. We cannot give support on it unless there is a huge commercial value behind the projectread thousands of Multis or Quattros.
  
-Note thatas also indicated on the Datacommunication whitepaper, the MK2 protocol is not an easy protocol. That is unfortunatebut it is what it is. And we cannot give support on it unless there is huge commercial value behind the project, read thousands of Multis or Quattros.+Finally, also note that when using the MK3 directly, the values are inverted from discussed above: A negative value takes power from the gridand positive value feeds power into the grid.
  
 And now, after all the warnings, the information: And now, after all the warnings, the information:
  
 +=== 3.6.2 Working with RAM IDs to address Assistants ===
 Use RAM ID 128 and higher. Every RAM ID is a word (2 bytes) Use RAM ID 128 and higher. Every RAM ID is a word (2 bytes)
  
Line 150: Line 250:
 So you have to scan the Assistant RAM records by looking at each ID_size record. So you have to scan the Assistant RAM records by looking at each ID_size record.
  
-Search for ESS, and then AssistantRAM0 is the setpoint in Watts and AssistantRAM1 contains the flags: +=== 3.6.3 ESS Assistant RAM IDs === 
-  * bit0 of AssistantRAM1 contains the flag 'disable charge' +The RAM ids of the ESS Assistant are: 
-  * bit1 of AssistantRAM1 contains the flag 'disable feed-in'+ 
 +  * AssistantRAM0: AC-in setpoint in Watts (positive for charge, negative for discharge) 
 +  * AssistantRAM1-bit 0: 'disable charge'-flag 
 +  * AssistantRAM1-bit 1: 'disable feed-in'-flag
  
 Above information is an addendum to the 'Interfacing with VE.Bus products' document. Available from our [[https://www.victronenergy.com/support-and-downloads/whitepapers|whitepapers]]. Above information is an addendum to the 'Interfacing with VE.Bus products' document. Available from our [[https://www.victronenergy.com/support-and-downloads/whitepapers|whitepapers]].
  
-**EXAMPLE:**\\ Below you will find a communication example (assumed is that the ESS assistant is the 1st assistant in the assistant list using AssistantRAM. So this means that the ID_Size is at RamID 128.)+=== 3.6.4 EXAMPLE === 
 +== Note ==  
 +//For the examples to work, the Multi to talk to should be selected using the 'A' command first. See paragraph 7.1 of the 'Interfacing with VE.Bus products.  
 +The phase master in L1 can be selected through address 0. To access the phase master for L2 and L3, address 1 and 2 should be selected respectively. // 
 + 
 +communication example (assumed is that the ESS assistant is the 1st assistant in the assistant list using AssistantRAM. So this means that the ID_Size is at RamID 128.) 
 + 
 +**Reading the Assistant ID and Size in the RAM-ID table:**
  
-**Reading the ID_Size:**+This uses the ''CommandReadRAMVar'' command, 0x30:
  
 ->  0x05, 0xFF, 0x57, 0x30, 0x80, 0x00*, 0xF5\\ ->  0x05, 0xFF, 0x57, 0x30, 0x80, 0x00*, 0xF5\\
Line 167: Line 277:
 (Length, 0xFF, ‘W’, 0x85, Lo(ValueA), Hi(ValueA), Lo(ValueB)*, Hi(ValueB)*, Checksum) (Length, 0xFF, ‘W’, 0x85, Lo(ValueA), Hi(ValueA), Lo(ValueB)*, Hi(ValueB)*, Checksum)
  
-ValueA is the contents of RAMID 128. In this example it is 0x0032 which indicates ESS with 2 extra RAMIDs.+ValueA is the contents of RAMID 128. In this example it is 0x0032 which indicates AssistantID = 3 with 2 extra RAMIDs. (3 is the ID of HUB-4 which is the predecessor of the ESS assistant)
  
 //*) Please note  that you will get an extra ValueB. This is a feature of newer Multi firmware versions. Because the IDs range from 0..255 the Hi(ID) field would always be 0. //*) Please note  that you will get an extra ValueB. This is a feature of newer Multi firmware versions. Because the IDs range from 0..255 the Hi(ID) field would always be 0.
Line 176: Line 286:
  
 **Writing the set point with +200 Watt:**\\ **Writing the set point with +200 Watt:**\\
-We should write RAM ID 129 to +200.\\ + 
-Writing requires 2 frames, one frame specifying the ID to write and one frame specifying the data to write.+This uses the ''CommandWriteRAMVar'' command, 0x32: 
 + 
 +We should write RAM ID 129 to +200. Writing requires 2 frames, one frame specifying the ID to write and one frame specifying the data to write.
  
 ->  0x05, 0xFF, 0x57, 0x32, 0x81, 0x00, 0xF2\\ ->  0x05, 0xFF, 0x57, 0x32, 0x81, 0x00, 0xF2\\
Line 191: Line 303:
 Write OK (87 means successful. Just ignore the rest of the frame (00,00 in this case)) Write OK (87 means successful. Just ignore the rest of the frame (00,00 in this case))
  
-Please refer to the 'Interfacing with VE.Bus products' document, available from our [[https://www.victronenergy.com/support-and-downloads/whitepapers|whitepapers]], for more info.+Please refer to the 'Interfacing with VE.Bus products' document, available from our [[https://www.victronenergy.com/support-and-downloads/whitepapers|whitepapers]], for more info on communicating with the MK3 in general, and more specifically the ''CommandReadRAMVar'' and ''CommandWriteRAMVar'' commands.
  
  
 ===== 4. Combining ESS with Lithium batteries ===== ===== 4. Combining ESS with Lithium batteries =====
   * Victron Lithium batteries with a VE.Bus BMS: select this in the ESS assistant and all will be done automatically.   * Victron Lithium batteries with a VE.Bus BMS: select this in the ESS assistant and all will be done automatically.
 +  * Non-Victron batteries with two-wire control: select this in the ESS assistant and all will be done automatically.
   * Non-Victron batteries:   * Non-Victron batteries:
     * when you do not want to discharge, set the switch to charger-only. Note that when the switch is set to charger-only, and there is no grid available, there will still be a small power draw on the battery to power the control board.     * when you do not want to discharge, set the switch to charger-only. Note that when the switch is set to charger-only, and there is no grid available, there will still be a small power draw on the battery to power the control board.
     * when you do not want to charge, disable charging via the disable-charge flag.     * when you do not want to charge, disable charging via the disable-charge flag.
-  * As an alternative to running the control loop externally, using ModbusTCP, it is also possible to run code on the CCGX itself and update the AcPowerSetpoint via D-Bus. We have one customer that is running a MQTT client on the CCGX, written in Python, that gets the control-loop output as updates from a MQTT broker. And the Python script sends them to the Multi, using D-Bus service com.victronenergy.vebus.ttyO1, and path /Hub4/AcPowerSetpoint+  * As an alternative to running the control loop externally, using ModbusTCP, it is also possible to run code on the GX device itself and update the AcPowerSetpoint via D-Bus. We have one customer that is running a MQTT client on the GX device, written in Python, that gets the control-loop output as updates from a MQTT broker. And the Python script sends them to the Multi, using D-Bus service com.victronenergy.vebus.ttyO1, and path /Hub4/AcPowerSetpoint 
 + 
 +===== 5. Response times and ramp speed ===== 
 + 
 +There are multiple factors that determine the response time to a (digital-) command to feed in: 
 + 
 +  - Latency and communication speed of all components in the communication chain: ModbusTCP or MQTT, GX Device, MK3 microprocessor, ESS Assistant, internal communication in the Multi itself. 
 +  - Rate limiting imposed by the used Country Grid code. Code "Other" has no rate limiting, Code "Europe" allows installer configurable rate limiting, many other codes have fixed a powerup ramp up. 
 +  - Hard coded rate limiting in the inverter/charger firmware: as per ESS version 162 it is set to 400W per second. The reason for this rate limiter is that without that there are regulation problems (overloads and such) when the mains is weak (long cables and such resulting in a relatively high impedance). More information on that [[ve.bus:grid-codes-and-loss-of-mains-detection|here]], as well as in the main ESS manual. 
 + 
 +===== 6. Further examples for external control ===== 
 +In this section a number of examples for external control is discussed. For these examples to work, you must set the ESS mode to "External control". This will cause the Multi to go into passthru until it receives an instruction from an external source. 
 + 
 +When using Modbus-TCP, note that the unit-id for the CCGX is 246, and for the Venus-GX is 242. These examples only show the paths and registers for a single-phase system. There are paths and registers for the setpoint of other phases too. Refer to the document [[https://www.victronenergy.com/support-and-downloads/whitepapers|Modbus-TCP register-list]] that can be downloaded from the main website for more information about this. 
 + 
 +==== 6.1. Disabling all charge and discharge ==== 
 + 
 +You may want to put the Multi into what could be called an idle mode, where it is neither charging nor discharging the battery. 
 + 
 +=== 6.1.1. Using Dbus === 
 + 
 +On the vebus service, set as follows. This will put the Multi into passthru. 
 + 
 +    /Hub4/DisableFeedIn = 1 
 +    /Hub4/DisableCharge = 1 
 + 
 +=== 6.1.2. Using Modbus-TCP === 
 + 
 +  * Set register 38 to 1 
 +  * Set register 39 to 1 
 + 
 +==== 6.2. Tell the Multi to charge the batteries ==== 
 + 
 +These instructions tell the Multi to charge at 32kw. Note that the Multi will only charge as much as it is allowed to by its maximum charge current setting as well as any parameters set by a BMS, in other words, it does the best that it can. 
 + 
 +Note that the AcPowerSetpoint value has to be written at least once every 60 seconds. 
 + 
 +=== 6.2.1. Using Dbus === 
 + 
 +    /Hub4/DisableFeedIn = 1 
 +    /Hub4/DisableCharge = 0 
 +    /Hub4/Lx/AcPowerSetpoint = 32700 
 + 
 +=== 6.2.2. Using Modbus-TCP === 
 + 
 +  * Set register 38 to 0 
 +  * Set register 39 to 1 
 +  * Set register 37 to 32700 
 + 
 +==== 6.3. Tell the Multi to discharge the batteries === 
 + 
 +Note that the AcPowerSetpoint value has to be written at least once every 60 seconds. The point of control is at the AC-input of the Multi. If there are loads on the output, your control loop needs to compensate for that. 
 + 
 +=== 6.3.1. Using Dbus ===
  
-===== 5. Response times =====+    /Hub4/DisableFeedIn 
 +    /Hub4/DisableCharge 
 +    /Hub4/Lx/AcPowerSetpoint -1000
  
-Depending on which components are used, and from which point the communication is sent to the inverter, there are several factors involved in the response time: the Color Control GX, ModbusTCP, MK3 microprocessor, the Assistant, and the Multi itself.+You can set the AcPowerSetpoint to any desired value. If this value is higher than the maximum capacity of the Multiit will discharge at the maximum capacity.
  
-The Hub-4 Assistant has (had) no rate limiter.+=== 6.3.2. Using Modbus-TCP ===
  
-The ESS Assistant has a rate limiter. In the currently latest version (161) it is at 400W per second+  * Set register 38 to 0 
 +  * Set register 39 to 0 
 +  * Set register 37 to -1000
  
-Note that at some, late 2016, we made copy of the Hub-4 Assistant, called the copy the new name: ESS Assistant. And stopped development on the Hub-4 Assistant. The reason for the rate limiting is that without that there are regulation problems (overloads and such) when the mains is weak (long cables and such). 
  
-===== DISQUS ===== 
-~~DISQUS~~ 
  
ess/ess_mode_2_and_3.1495105136.txt.gz · Last modified: 2017-05-18 12:58 by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki