Difference between revisions of "MasterBus"

From HSYCO
Jump to navigation Jump to search
(Created page with "MasterBus is a proprietary communication protocol used in a wide range of products from Mastervolt. It can be interfaced via the MasterBus Modbus Interface. The MasterBus Modb...")
 
 
(8 intermediate revisions by the same user not shown)
Line 75: Line 75:
  
 
Automatic polling of variables data is also supported, and a specific polling interval can be specified for each datapoint.
 
Automatic polling of variables data is also supported, and a specific polling interval can be specified for each datapoint.
 
 
The following table lists all datapoints returned by the BMV-700 series battery monitors.
 
  
  
 
{| class="wikitable"
 
{| class="wikitable"
!ID
+
! scope="col" style="width: 200px;" | ID
!Value
+
! scope="col" style="width: 100px;" | Value
 
!R/W
 
!R/W
 
!Description
 
!Description
 
|-
 
|-
  
|rowspan="2"|status
+
|<idal>.<idb>.<tab>.<index>
|online
+
|<name>
|R
+
|W
|connection established
+
|map <idal>.<idb>.<tab>.<index> to <name>
|-
 
|offline
 
|R
 
|HSYCO can’t connect to the VE.Direct device
 
 
|-
 
|-
  
|rowspan="2"|alarm
+
|<idal>.<idb>.<tab>.<index> or <name>
|ON
+
|pollinterval:<T>
|R
+
|W
|alarm condition active
+
|automatically read the variable every T seconds. T can be a decimal number. Set to 0 to disable polling on this variable
|-
 
|OFF
 
|R
 
|alarm condition not active
 
 
|-
 
|-
  
|ar
+
|rowspan="2"|<idal>.<idb>.<tab>.<index> or <name>
|<value>
+
|read
|R
+
|W
|alarm reason
+
|execute a single read request on this variable
 
|-
 
|-
 
|bmv
 
 
|<value>
 
|<value>
 
|R
 
|R
|model description
+
|the current value of this variable, after a single read request or automatic polling. <value> is a decimal numner. "error" is returned if the read request failed. "null" is returned if the request was successful, but the returned value is not a number (this happens when the device's variable is not set)
 
|-
 
|-
  
|ce
+
|<idal>.<idb>.<tab>.<index> or <name>
 
|<value>
 
|<value>
|R
+
|W
|consumed Amp Hours (mAh). When the BMV is not synchronised, these statistics have no meaning, so "---" will be sent instead of a value
+
|write <value> to this variable. Value is an integer or decimal number. A write also automatically returns the value read from the variable
 
|-
 
|-
  
|dm
 
|<value>
 
|R
 
|mid-point deviation of the battery bank (0.1 %)
 
|-
 
  
|fw
+
|}
|<value>
 
|R
 
|firmware version
 
|-
 
  
|h1
+
== Examples ==
|<value>
 
|R
 
|depth of the deepest discharge (mAh)
 
|-
 
  
|h2
+
In the following examples, "mb" is the MASTERBUS I/O Server id.
|<value>
 
|R
 
|depth of the last discharge (mAh)
 
|-
 
  
|h3
+
=== Map variables to readable datapoint names ===
|<value>
 
|R
 
|depth of the average discharge (mAh)
 
|-
 
  
|h4
+
init or iostart mb : io mb.0A.02F91F.0.13 = chg.state
|<value>
+
init or iostart mb : io mb.0A.02F91F.0.21 = chg.command
|R
+
init or iostart mb : io mb.0A.02F91F.0.14 = chg.battery.voltage
|number of charge cycles
 
|-
 
 
 
|h5
 
|<value>
 
|R
 
|number of full discharges
 
|-
 
 
 
|h6
 
|<value>
 
|R
 
|cumulative Amp Hours drawn (mAh)
 
|-
 
 
 
|h7
 
|<value>
 
|R
 
|minimum main battery voltage (mV)
 
|-
 
  
|h8
+
Three different variable of a Mastervolt charger (with IDAL = 0A and IDB = 02F91F) are mapped to easy to read datapint names.
|<value>
 
|R
 
|maximum main battery voltage (mV)
 
|-
 
  
|h9
+
For example, the variable identified with Tab 0 and Index 13 is mapped to "chg.state". After this, the datapoint mb.chg.state can be used for reading, writing or to set a poll interval, instead of mb.0A.02F91F.0.13
|<value>
 
|R
 
|number of seconds since last full charge (s)
 
|-
 
  
|h10
+
Note that, defining the event as "iostart mb", ensures that the mapping command will be passed to the I/O Server when it has started.
|<value>
 
|R
 
|number of automatic synchronizations
 
|-
 
  
|h11
 
|<value>
 
|R
 
|number of low main voltage alarms
 
|-
 
  
|h12
+
=== Set automatic polling for a variable ===
|<value>
 
|R
 
|number of high main voltage alarms
 
|-
 
  
|h17
+
init or iostart mb : io mb.chg.battery.voltage = pollinterval:5
|<value>
 
|R
 
|amount of discharged energy (0.01 kWh)
 
|-
 
  
|h18
+
The datapoint mb.chg.battery.voltage, corresponding to the variable Tab 0, Index 14 of device with IDAL 0A, IDB 02F91F, will be read every 5 seconds.
|<value>
 
|R
 
|amount of charged energy (0.01 kWh)
 
|-
 
  
|i
 
|<value>
 
|R
 
|current (mA)
 
|-
 
  
|p
+
=== Write to a variable ===
|<value>
 
|R
 
|instantaneous power (W)
 
|-
 
  
|pid
+
user charger = standby : io mb.chg.command = 0
|<value>
 
|R
 
|product ID
 
|-
 
  
|ppv
+
The datapoint mb.chg.command, corresponding to the variable Tab 0, Index 21 of device with IDAL 0A, IDB 02F91F, is written with value 0, to set the battery charger in stand-by mode.
|<value>
 
|R
 
|panel power (W)
 
|-
 
  
|rowspan="2"|relay
 
|ON
 
|R
 
|relay on state
 
|-
 
|OFF
 
|R
 
|relay off state
 
|-
 
 
|soc
 
|<value>
 
|R
 
|state-of-charge (0.1 %). When the BMV is not synchronised, these statistics have no meaning, so "---" will be sent instead of a value
 
|-
 
 
|t
 
|<value>
 
|R
 
|battery temperature (C). When no temperature sensor is connected, "---" will be sent instead of a value
 
|-
 
 
|ttg
 
|<value>
 
|R
 
|time-to-go (minutes). When the battery is not discharging the time- to-go is infinite. This is represented as -1. When the BMV is not synchronised, these statistics have no meaning, so "---" will be sent instead of a value
 
|-
 
 
|v
 
|<value>
 
|R
 
|main battery voltage (mV)
 
|-
 
 
|vm
 
|<value>
 
|R
 
|mid-point voltage of the battery bank (mV)
 
|-
 
 
|vpv
 
|<value>
 
|R
 
|panel voltage (mV)
 
|-
 
 
|vs
 
|<value>
 
|R
 
|auxiliary (starter) voltage (mV)
 
|-
 
 
|}
 
  
  
Line 303: Line 150:
  
 
{| class="wikitable"
 
{| class="wikitable"
!ID
+
! scope="col" style="width: 200px;" | ID
 
!Attribute
 
!Attribute
 
!Set to
 
!Set to
Line 309: Line 156:
 
|-
 
|-
  
|ce
+
|<idal>.<idb>.<tab>.<index> or <name>
|value
 
|<value> Ah
 
|consumed Amp Hours (Ah)
 
|-
 
 
 
|dm
 
|value
 
|<value> %
 
|mid-point deviation of the battery bank (%)
 
|-
 
 
 
|h1
 
|value
 
|<value> Ah
 
|depth of the deepest discharge (Ah)
 
|-
 
 
 
|h2
 
|value
 
|<value> Ah
 
|depth of the last discharge (Ah)
 
|-
 
 
 
|h3
 
|value
 
|<value> Ah
 
|depth of the average discharge (Ah)
 
|-
 
 
 
|h4
 
 
|value
 
|value
 
|<value>
 
|<value>
|number of charge cycles
+
|When the GUI option is set to true, a UISET of the value attribute is performed on every read, write or poll action
|-
 
 
 
|h5
 
|value
 
|<value>
 
|number of full discharges
 
|-
 
 
 
|h6
 
|value
 
|<value> Ah
 
|cumulative Amp Hours drawn (Ah)
 
|-
 
 
 
|h7
 
|value
 
|<value> V
 
|minimum main battery voltage (V)
 
|-
 
 
 
|h8
 
|value
 
|<value> V
 
|maximum main battery voltage (V)
 
|-
 
 
 
|h9
 
|value
 
|<value> h
 
|time since last full charge (hhh:mm)
 
|-
 
 
 
|i
 
|value
 
|<value> A
 
|current (A)
 
|-
 
 
 
|p
 
|value
 
|<value> W
 
|instantaneous power (W)
 
|-
 
 
 
|ppv
 
|value
 
|<value> W
 
|panel power (W)
 
|-
 
 
 
|soc
 
|value
 
|<value> %
 
|state-of-charge (%)
 
|-
 
 
 
|t
 
|value
 
|<value> C
 
|battery temperature (C)
 
|-
 
 
 
|ttg
 
|value
 
|<value> h
 
|time-to-go (hhh:mm). When the battery is not discharging the time- to-go is infinite. This is represented as "INF"
 
|-
 
 
 
|v
 
|value
 
|<value> V
 
|main battery voltage (V)
 
|-
 
 
 
|vm
 
|value
 
|<value> V
 
|mid-point voltage of the battery bank (V)
 
|-
 
 
 
|vpv
 
|value
 
|<value> V
 
|panel voltage (V)
 
|-
 
 
 
|vs
 
|value
 
|<value> V
 
|auxiliary (starter) voltage (mV)
 
 
|-
 
|-
  
Line 440: Line 167:
 
== Release Notes ==
 
== Release Notes ==
  
=== 3.4.0 ===
+
=== 3.7.0 ===
 
*initial version release
 
*initial version release
  
Line 446: Line 173:
  
  
''VE.Direct is a registered trademarks of Victron Energy B.V.''
+
''Mastervolt and MasterBus are registered trademarks of Mastervolt BV''

Latest revision as of 17:26, 23 November 2019

MasterBus is a proprietary communication protocol used in a wide range of products from Mastervolt. It can be interfaced via the MasterBus Modbus Interface. The MasterBus Modbus interface can provide all information from the ‘closed’ MasterBus network, as well as the ability to send commands, using the standard Modbus protocol over RS-485 (Modbus/RTU).

Communication

The MasterBus Modbus interface can be configured to set its Modbus Id, speed and parity communication parameters, using the Masteradjust software.

The default configuration parameters are:

Modbus Id 1
Speed 19200
Parity even

HSYCO Configuration

Add a MASTERBUS I/O Server in the I/O Servers section of the Settings and set its parameters:

Communication

The MasterBus Modbus interface can be directly connected to a local RS-485 port of the HSYCO Server, or through a Modbus/TCP gateway.

Modbus TCP

  • IP Address: IP address of the gateway
  • IP Port: TCP/IP port to use, leave blank to use default port 502.

Modbus RTU

  • Comm ID: select the comm port connected to the Modbus/RTU bus.

High Availability

  • Shutdown when inactive: defaults to true.

Options

ID Default Values Description
decimals 2 ≥ 0 change the number of decimal digits. Floating point numbers are rounded.
gui false true enable support for the UISET actions
false disable UI support

Datapoints

The master of the Modbus network is able to communicate with any individual MasterBus device variable for reading or writing. Each device connected to the MasterBus has a unique address that consists of 2 parts, the IDB (18 bit value) and the IDAL (5 bit value). Each device's variable is identified with a two parts address, the Tab number and Index.

The HSYCO datapoint mapping scheme is based on the combination of IDAL, IDB, Tab and Index. The IDAL and IDB are represented as hexadecimal values, while Tab and Index are integer values.

The value returned when reading a variable is always a decimal number (the MasterBus internal representation is based on the IEEE 754 floating point standard).

As having a large number of datapoints named with the IDAL, IDB, Tab and Index addressing scheme could be quite an inconvenience, the HSYCO MASTERBUS I/O Server implements a simple mapping feature that allows more descriptive datapoint names to be associated to the original addressing scheme.

Automatic polling of variables data is also supported, and a specific polling interval can be specified for each datapoint.


ID Value R/W Description
<idal>.<idb>.<tab>.<index> <name> W map <idal>.<idb>.<tab>.<index> to <name>
<idal>.<idb>.<tab>.<index> or <name> pollinterval:<T> W automatically read the variable every T seconds. T can be a decimal number. Set to 0 to disable polling on this variable
<idal>.<idb>.<tab>.<index> or <name> read W execute a single read request on this variable
<value> R the current value of this variable, after a single read request or automatic polling. <value> is a decimal numner. "error" is returned if the read request failed. "null" is returned if the request was successful, but the returned value is not a number (this happens when the device's variable is not set)
<idal>.<idb>.<tab>.<index> or <name> <value> W write <value> to this variable. Value is an integer or decimal number. A write also automatically returns the value read from the variable

Examples

In the following examples, "mb" is the MASTERBUS I/O Server id.

Map variables to readable datapoint names

init or iostart mb : io mb.0A.02F91F.0.13 = chg.state
init or iostart mb : io mb.0A.02F91F.0.21 = chg.command
init or iostart mb : io mb.0A.02F91F.0.14 = chg.battery.voltage

Three different variable of a Mastervolt charger (with IDAL = 0A and IDB = 02F91F) are mapped to easy to read datapint names.

For example, the variable identified with Tab 0 and Index 13 is mapped to "chg.state". After this, the datapoint mb.chg.state can be used for reading, writing or to set a poll interval, instead of mb.0A.02F91F.0.13

Note that, defining the event as "iostart mb", ensures that the mapping command will be passed to the I/O Server when it has started.


Set automatic polling for a variable

init or iostart mb : io mb.chg.battery.voltage = pollinterval:5

The datapoint mb.chg.battery.voltage, corresponding to the variable Tab 0, Index 14 of device with IDAL 0A, IDB 02F91F, will be read every 5 seconds.


Write to a variable

user charger = standby : io mb.chg.command = 0

The datapoint mb.chg.command, corresponding to the variable Tab 0, Index 21 of device with IDAL 0A, IDB 02F91F, is written with value 0, to set the battery charger in stand-by mode.


UISET Actions

ID Attribute Set to Description
<idal>.<idb>.<tab>.<index> or <name> value <value> When the GUI option is set to true, a UISET of the value attribute is performed on every read, write or poll action


Release Notes

3.7.0

  • initial version release


Mastervolt and MasterBus are registered trademarks of Mastervolt BV