Difference between revisions of "MasterBus"

From HSYCO
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 78: Line 78:
  
 
{| class="wikitable"
 
{| class="wikitable"
!ID
+
! scope="col" style="width: 200px;" | ID
!Value
+
! scope="col" style="width: 100px;" | Value
 
!R/W
 
!R/W
 
!Description
 
!Description
Line 109: Line 109:
 
|<value>
 
|<value>
 
|W
 
|W
|write <value> to this variable. Value is an integer or decimal number
+
|write <value> to this variable. Value is an integer or decimal number. A write also automatically returns the value read from the variable
 
|-
 
|-
  
Line 115: Line 115:
 
|}
 
|}
  
 +
== Examples ==
  
== UISET Actions ==
+
In the following examples, "mb" is the MASTERBUS I/O Server id.
  
{| class="wikitable"
+
=== Map variables to readable datapoint names ===
!ID
 
!Attribute
 
!Set to
 
!Description
 
|-
 
  
|ce
+
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
|<value> Ah
+
init or iostart mb : io mb.0A.02F91F.0.14 = chg.battery.voltage
|consumed Amp Hours (Ah)
 
|-
 
  
|dm
+
Three different variable of a Mastervolt charger (with IDAL = 0A and IDB = 02F91F) are mapped to easy to read datapint names.
|value
 
|<value> %
 
|mid-point deviation of the battery bank (%)
 
|-
 
  
|h1
+
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
 
|<value> Ah
 
|depth of the deepest discharge (Ah)
 
|-
 
  
|h2
+
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
 
|<value> Ah
 
|depth of the last discharge (Ah)
 
|-
 
  
|h3
 
|value
 
|<value> Ah
 
|depth of the average discharge (Ah)
 
|-
 
 
|h4
 
|value
 
|<value>
 
|number of charge cycles
 
|-
 
 
|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
+
=== Set automatic polling for a variable ===
|value
 
|<value> V
 
|maximum main battery voltage (V)
 
|-
 
  
|h9
+
init or iostart mb : io mb.chg.battery.voltage = pollinterval:5
|value
 
|<value> h
 
|time since last full charge (hhh:mm)
 
|-
 
  
|i
+
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
 
|<value> A
 
|current (A)
 
|-
 
  
|p
 
|value
 
|<value> W
 
|instantaneous power (W)
 
|-
 
  
|ppv
+
=== Write to a variable ===
|value
 
|<value> W
 
|panel power (W)
 
|-
 
  
|soc
+
user charger = standby : io mb.chg.command = 0
|value
 
|<value> %
 
|state-of-charge (%)
 
|-
 
  
|t
+
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
 
|<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
+
== UISET Actions ==
|value
 
|<value> V
 
|mid-point voltage of the battery bank (V)
 
|-
 
  
|vpv
+
{| class="wikitable"
|value
+
! scope="col" style="width: 200px;" | ID
|<value> V
+
!Attribute
|panel voltage (V)
+
!Set to
 +
!Description
 
|-
 
|-
  
|vs
+
|<idal>.<idb>.<tab>.<index> or <name>
 
|value
 
|value
|<value> V
+
|<value>
|auxiliary (starter) voltage (mV)
+
|When the GUI option is set to true, a UISET of the value attribute is performed on every read, write or poll action
 
|-
 
|-
  
Line 256: Line 167:
 
== Release Notes ==
 
== Release Notes ==
  
=== 3.4.0 ===
+
=== 3.7.0 ===
 
*initial version release
 
*initial version release
  
Line 262: 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