MasterBus
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).
Contents
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