browse
This article explains how to add your own modbus equipment in the Wattsense Console.
If you want to add a Modbus equipment to the console, you can first check if your device is already available in the official library : Wattsense Compatibility Checker.
If this is not the case, do not hesitate to ask us : we will add it for you.
However, if you have equipment with specific modbus registers (example: programmable controller), you will have to add all the properties manually in the console. If your equipment has too many properties, you have the option of using bulk import using a csv file.
How to proceed ?
Equipement (Description and communication protocol)
In the Wattsense Console, go to the Configuration Tab / Equipment / Add equipment
Give a name and description of the equipment. Specify the Modbus protocol (RTU or IP).
|
Modbus RTU : Select Modbus RTU if the device is connected to the Box via a Serial cable (RS 485). | Modbus IP : Select Modbus IP if the device is connected via an ethernet cable. |
In order to establish a communication between the box and your equipement, you will have to fill in the following parameters :
• Slave Id = Devices are identified by unique numerical IDs (1-247). • Speed = 9600, 19200, 38400 … bauds • Parity = None, Even, Odd • Data bits = 8 … • Stop bits = 1 … |
• IP address • Port 502 • SlaveId |
Where to find these settings ?
You can consult the manufacturer's documentation and/or device configuration if available.
Equipment (properties)
Once you have configured the protocol settings, you will need to fill out the property descriptions.
At this point, you can add properties one by one using the Add Property button, or you can import them via a csv file, which is a faster way, especially if you have many properties.
You will need to obtain the list of registers (exchange table). (source = documentation from the manufacturer or equipment administrator in the case of a programmable device)
Typically, the Modbus register table has the following format :
- In this example, the register addresses are in the first column.
- The R/W column indicates whether the property is Readable/Writable.
- Another very important information is present in the header of the document: All registers are 16-bit signed integers (Holding Registers).
Here's another example :
- In this example, the register addresses are in the first / second columns (50512 in decimal = C550 in hexadecimal).
- Words count : indicates the number of 16 bit registers = 2*16 = 32 bits (here assigned to U32= Unsigned int 32)
- V/100 : a scaling of 1/100 must be applied to the raw value. (scalingA = 0.01)
File format for bulk import into Wattsense console
Once you have collected all the registry descriptions, you can prepare the csv file.
Download the model from the interface :
name,description,accessType,registerAddress,function (1/2/3/4),secondaryFunction (5/6/16),dataFormat,numberOfRawRegisters,scaling_a,scaling_b |
How to fill in the file ?
Column |
Description | Format | Example |
name |
name of the property | Text |
Damper 2 Led close |
description |
Description of the property |
Text |
1 = On ; 0 = Off |
accesstype |
Type of Access |
LOCAL READ WRITE READ_WRITE |
READ |
registerAddress |
Register address | Sometimes the address is in hexadecimal (ex 0xA8 or A8h, you must convert It in decimal. A8h -> 168) |
4 |
function |
Modbus function |
(1/2/3/4) 01 - Read Output Coils 02 - Read Discrete Inputs 03 - Read Holding Register 04 - Read Input Registers |
3 |
Secondary function |
Modbus secondary function |
(5/6/16) |
|
dataformat |
Data format (*) |
int16 |
Int16 |
numberOfRawRegisters |
Number of Raw registers |
Number of raw bytes in case Data format = _bytes |
0 |
scaling_a |
Scaling A |
It can happen that a scaling must be applied to the property to transform properly an integer to a float value. The correction format is Ax + B. |
1 |
scaling_b |
Scaling B |
Offset part (B) of the scaling correction. |
0 |
(*) naming convention
u = unsigned f = float
Big endian (be) = ABCD little endian = DCBA Mid Little endian = CDAB
Please note that modbus objects (register types) have the following access features :
• Coil (Read-write)
• Discrete input (Read-only)
• Input register (Read-only)
• Holding register (Read-write)
For this reason, the combination (access type / function / secondary function) must be one of the following ones :
Object type | Accesstype | Function | Secondary function |
Coils |
READ |
01 - Read Output Coils |
|
Coils | WRITE | 05 - Write Single Output | |
Coils | READ_WRITE | 01 - Read Output Coils05 | 05 - Write Single Output |
Holding register | READ | 03 - Read Holding Register | |
Holding register | WRITE | 06 - Write Holding Register (or 16) | |
Holding register | READ_WRITE | 03 - Read Holding Register | 06 - Write Holding Register (or 16) |
Discrete Inputs | READ | 02 - Read Discrete Inputs | |
Input Registers | READ | 04 - Read Input Registers |
The csv file has the following format :
|
Here’s the csv content of the first example above :
File import
Once saved, you can import the csv file into the Wattsense console :
Click on the button Create properties to validate.
And then save changes to send the configuration to the box.
Please contact us if you need any additional information: Wattsense Support
Comments
0 comments
Please sign in to leave a comment.