This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus and Nibe Modbus40
#1
Hello
Does anyone have an working modbus-profile for Nibe Modbus 40?
I've managed to get all registers except the signed32 registers working.
The response from modbus40 to the LM5 always return an CRC-error.

When testet with the RTU read test it also return CRC error when reading int 32 or when reading 2 int16 registers.......


This code works for 16bit registers:
{ "name": "Degree Minutes 16 bit", "bus_datatype": "int16",   "type": "register", "address": 43005 , "datatype": "int16", "value_multiplier": 0.1, "writable": false },   

But when trying to read a 32 bit it return error:
Tried this:
"name": "Tot optime compr EP14_r1""bus_datatype": "uint32""address": 43420, "read_count":2, "read_offset":43420, "type": "register""datatype": "int16" },

and this:
"name""Tot optime compr EP14_r1""bus_datatype""uint32""address": 43420, "type""register""datatype""int32" },

and a lot of other combinations and everyone returns the same crc error.

When I only read the first register as a 16bit value it return the correct value, and tried to do a word swap and it then reurn the value 0.


The bus is terminated whit 120ohm resistors in both ends, and there is only this device on the bus.

Any ideas????

Help needed Huh

Eirik
Reply
#2
What happens if you read 43421 as a single 16-bit register in Modbus RTU test? Usually, it should not allow reading the second register if two registers form a single 32-bit integer.
Reply
#3
When reading the "second" register it returns illegal data adress.....
Reply
#4
Have you tried increasing the timeout value for the device to 3 seconds when using a profile? You can do this in latest RC firmware in Modbus device settings.
Reply
#5
I've tried increasing both timeout og poll-interval.
Still getting the CRC-error.

Have not tried with pull up an pull down resistors....
Is this neceseery on a short bus-line????? (and why....I'm really trying to understand this Huh )
Reply
#6
Resistors are already present in LM, have you tried contacting Nibe support?
Reply
#7
Hello,
you must create log.set file by NibeModbus Manager and upload this to the nibe from USB storage.
Without this you cannot read multiple registers from Nibe ( more than 1 register ).
If you create log.set then nibe timeout is only 0,5 sec, maximum log.set registers is 20.

Attached Files
.pdf   modbus_gbs_koppeling.pdf (Size: 7.56 MB / Downloads: 129)
Reply
#8
Thanks for all feedback:-)

It worked like a charm when i used the log.set in the heatpump.
Now i read all registers without any error.
I must add that the manufacturer did not make it easy to integrate their device..........

Eirik
Reply
#9
Hi,

Would it be possible to control the heatpump via the modbus40 with Wiser/LM (like turn off the heat element) or you could only read the parameters from the heatpump?

Best
Reply
#10
Hello erik.

You must create log.set by NibeModbus Manager with 32bit register definition ( if you havent log set with 32bit register, then nibe return crc error )
1. create log.set file with Nibe Modbus manager
2. save to usb storage
3. insert to nibe
4. Enable logging and set 1second.

http://firma.merel.cz/public/NIBE_Modbus..._1.0.8.zip
Reply
#11
Anyone managed to get homelynk to write registers to nibe modbus 40? I have a nibe heatpump and modbus 40, and I'm trying to reset alarms via modbus, but I can't get it to work. I've loaded the log.set file into my device and I'm able to read registers, but haven't found a way to write them. Anyone have a sample json profile?
Reply
#12
You should set "write multiple" = true.
I don't use the log.set, because of the limit of 20 regs.
Very important to set the polling frequence to 1 sec, and timeout to 3sec when polling without log.set.
Reply
#13
Have you had any trouble using more than 20 registers? I'm up to 19 registers now, but Id' like to try some more registers without constantly updating the log.set to the indoor unit.
Reply
#14
(20.06.2019, 07:17)RagingBull Wrote: Have you had any trouble using more than 20 registers? I'm up to 19 registers now, but Id' like to try some more registers without constantly updating the log.set to the indoor unit.

Hi RagingBull.

You can read more than 20 registers but 32 bit registers must be in the log.set

MEREL.
Reply
#15
I am connecting to the Nibe Modbus 30 heat pump in next month on a project. Anybody has a good script for it and want to shareSmile ?
Reply
#16
(27.06.2019, 17:15)PassivPluss Wrote: I am connecting to the Nibe Modbus 30 heat pump in next month on a project. Anybody has a good script for it and want to shareSmile ?

This is my example modbus json definition for modbus Visual mapper.
                                                                         
Good luck.
MEREL

Code:
{
 "manufacturer": "NIBE Heat Pump",
 "timeout": 3,
 "read_delay": 1,
 "description": "VVM 310",
 "mapping": [
    { "bus_address": "4/1/0", "name": "Alarm code", "bus_datatype": "7", "datatype": "int16", "type": "register", "address": 45001, "value_multiplier": 1, "units": "", "value_delta": 0.1 },
    { "bus_address": "4/1/1", "name": "BT1 Average outside temp", "bus_datatype": "9", "datatype": "int16", "type": "register", "address": 40067, "value_multiplier": 0.1, "units": " °C"   },
    { "bus_address": "4/1/2", "name": "BT2 System 1 - outlet water temp", "bus_datatype": "9", "datatype": "int16", "type": "register", "address": 40008, "value_multiplier": 0.1, "units": " °C"   },
    { "bus_address": "4/1/3", "name": "BT2 System 2 - outlet water temp", "bus_datatype": "9", "datatype": "int16", "type": "register", "address": 40007, "value_multiplier": 0.1, "units": " °C"  },
    { "bus_address": "4/1/4", "name": "BT6 Hot water load", "bus_datatype": "9", "datatype": "int16", "type": "register", "address": 40014, "value_multiplier": 0.1, "units": " °C"  },
    { "bus_address": "4/1/5", "name": "BT7  Hot water top", "bus_datatype": "9", "datatype": "int16", "type": "register", "address": 40013, "value_multiplier": 0.1, "units": " °C"   },
 { "bus_address": "4/1/6", "name": "Operational mode", "bus_datatype": "5", "datatype": "uint16", "write_multiple":true, "read_count":1, "type": "register", "address": 47570, "writable": 1 , "value_custom": {"0": "Automatic", "1": "Manual", "2": "Add. heat only" }},
 { "bus_address": "4/1/7", "name": "Hot Water mode", "bus_datatype": "5", "datatype": "uint16", "write_multiple":true, "read_count":1, "type": "register", "address": 47041, "writable": 1 , "value_custom": {"0": "Economy", "1": "Normal", "2": "Extra" }},
 { "bus_address": "4/1/8", "name": "Allow add heat - manual only", "bus_datatype": "5", "datatype": "uint16", "write_multiple":true, "read_count":1, "type": "register", "address": 47370, "writable": 1 },
 { "bus_address": "4/1/9", "name": "Allow heating - manual only", "bus_datatype": "5", "datatype": "uint16", "write_multiple":true, "read_count":1, "type": "register", "address": 47371, "writable": 1 },
 { "bus_address": "4/1/10", "name": "Allow Cooling - manual only", "bus_datatype": "5", "datatype": "uint16", "write_multiple":true, "read_count":1, "type": "register", "address": 47372, "writable": 1 },
 { "bus_address": "4/1/11", "name": "HW temp ON Economy", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47045, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/12", "name": "HW temp OFF Economy", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47049, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/13", "name": "HW temp ON Normal", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47044, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/14", "name": "HW temp OFF Normal", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47048, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/15", "name": "HW temp ON Extra", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47043, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/16", "name": "HW temp OFF Extra", "bus_datatype": "8", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47047, "writable": 1, "value_multiplier": 0.1, "units": " °C" },
 { "bus_address": "4/1/17", "name": "HW circulation run time (min)", "bus_datatype": "5", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47054, "writable": 1, "units": " min" },
 { "bus_address": "4/1/18", "name": "HW circulation stop time (min)", "bus_datatype": "5", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 47055, "writable": 1, "units": " min" },
 { "bus_address": "4/1/19", "name": "Min cooling supply S2", "bus_datatype": "6", "datatype": "int16", "write_multiple":true, "read_count":1, "type": "register", "address": 48176, "writable": 1, "value_multiplier": 1},
 { "bus_address": "4/1/20", "name": "Prio", "bus_datatype": "5", "datatype": "uint16", "read_count":1, "type": "register", "address": 43086, "value_custom": {"10": "Stopped", "20": "Hot water", "30": "Heating", "40": "Pool", "41": "Pool 2", "50": "Transfer", "60": "Cooling" }},
 { "bus_address": "4/1/21", "name": "Status cooling", "bus_datatype": "1", "datatype": "uint16", "read_count":1, "type": "register", "address": 43024, "value_custom": {"0": "Inactive", "1": "Cooling is active" }}
 ]
}

Attached Files
.json   Nibe_nove.json (Size: 4.93 KB / Downloads: 47)
Reply
#17
Is it possible to use two json profiles on one slave rtu? Like one json with 20 most important values updated often by using read multiple registers in log set file and one json with polling every 1800 sec with less important info? Like running hours etc?
The modbus40 module reguire 2.1 sec between reading of single register. Is it possible to get more than 1 sec via json script?
Reply
#18
Pooling interval is per device, you can set them differently but not individual registers. You can add read_delay parameter to your profile to delay the read between registers.
------------------------------
Ctrl+F5
Reply
#19
You can create several RTU slaves with the same slave ID
Reply
#20
(11.11.2019, 09:32)Daniel. Wrote: Pooling interval is per device, you can set them differently but not individual registers.  You can add read_delay parameter to your profile to delay the read between registers.

Nibe Modbus unfortunately limits to 2.1 sec between each request (parameters not in Log.set). I am trying to understand how to best handle this on the LM5. I have now tried to set read_delay to 2.2 sec in the modbus profile. I have also increased timeout to 15 sec, which seemed to solve my problem.

I have a list of 31 parameters. Polling time is set to 180 sec. so even with a 5 sec read_delay it should be able to get through all parameters before next request. On the server end it also looks good. I can see the timestamps for requests vary with 1 sec to 3 sec between them. Between open and close there is about 72 sec. which corresponds to an average time 2.4 sec between each of the 31 parameters (which seems to correspond well with the read_delay = 2.2).

To sum up:
Modbus TCP/IP
Params/registers 31
Modbus profile read_delay = 2.2
Poll interval = 180 sec
Timeout = 15 sec

Is this a good design? Is there any reason to "tune" the timeout to be as small as possible?

I may later split my profiles in two such that I can poll faster to some parameters (e.g. those set in Log.set) and very rarely on the rest, but for now, if this is stable, I leave it like this.
Reply


Forum Jump: