Open JesusFrontelo opened 1 month ago
I saw this at the inverter imput registers documentation:
1.2 FUNCTION 0x04: READ INPUT REGISTERS Function 0x04 allows reading online data or Input Registers (references 3xxxx) from the inverter. The registers are redirected starting with the register number 1, which in the memory address is the position 0. Within the Input Registers map it can be read whatever part of the memory. The master sends a Query message to the inverter. It asks the number, 0xNHNL, of Input Registers starting in the address 0xFHFL. | Address | -- | Inverter Address [1 .. 247] |
---|---|---|---|
Function | 0x04 | Read Input Registers | |
Starting Address Hi | 0xFH | Address of 1st register (HI byte) | |
Starting Address Lo | 0xFL | Address of 1st register (LO byte) | |
Number of Points Hi | 0xNH | Number of registers to read (HI byte) | |
Number of Points Lo | 0xNL | Number of registers to read (LO byte) | |
Error Check (CRC) - Hi | -- | Cyclic Redundancy Code (HI byte) | |
Error Check (CRC) - Lo | -- | Cyclic Redundancy Code (LO byte) |
The inverter answer sending the following Response message, which includes the values of the 0xNHNL configuration parameters (2 bytes per register [0xNN]) | Address | -- | Inverter address [1 .. 247] |
---|---|---|---|
Function | 0x04 | Read Input Registers | |
Byte Count | 0xNN | Number of data octets | |
Data Hi | -- | Value of register 1 (HI byte) | |
Data Lo | -- | Value of register 1 (LO byte) | |
Data Hi | -- | … | |
Data Lo | -- | … | |
Data Hi | -- | Value of register n (HI byte) | |
Data Lo | -- | Value of register n (LO byte) | |
Error Check (CRC) - Hi | -- | Cyclic Redundancy Code (HI byte) | |
Error Check (CRC) - Lo | -- | Cyclic Redundancy Code (LO byte) |
But I don't know how to use it to set up the exporter correctly
The registers you are trying to read from your device are input registers. These registers are read with the modbus function code 0x04, as you noted from the data sheet.
The function code used by this exporter is set with the first digit of the register number in the configuration file.
So for example, an address of 30001 set in modbus.yml
will read a holding register, as the first digit "3" refers to the holding register function code of 0x03.
This is the table of function codes (taken from here) that are supported by the exporter: Function Code | Register Type |
---|---|
1 | Read Coil |
2 | Read Discrete Input |
3 | Read Holding Registers |
4 | Read Input Registers |
Try changing all of your addresses to 40000, 40001, 40002... etc. and see what that returns.
Good Afternoon @RichiH ,
When I try to get the data from the records of my Ingecon inverter from the modbus exporter I see that the values obtained are not correct. For example, the first 6 records correspond to the date (year, month, day, hour, minutes, and seconds). In modbus-exporter I am getting the value 2024 for all of them, but if I set a flow to node-red I get the data correctly.
This is the data i get from modbus-exporter:
And this is the configuration at modbus.yml:
This is the data i obtanined at node-red:
The configuration at buffer parser is:
I think it would be necessary to add the offset byte option to the metrics settings as you can see in Node-Red's parser buffer so that you can get the data correctly with Node-Exporter.
Hope someone can help me.
Regards.