Hi, I'm now reading modbus registers from an ABB electricity meter B23. For example quantity active import is in reg 5000 (hex) and it is in 4 regs. Each register is 16 bits. I have first setup my TCP master and then added a new device. MB register 5000 (hex) corresponds to 20480. Basically I want to read 64bit data from this register. It didn't work. I then tried to create new devices, one for each register so I have 4 devices. None of them works. Debug log is:
It looks like modbusSeer tries to read register 5000 so is the hex value for the register. When adding a new device I put 20480 for the holding register. Similarly for the next devices with registers 20481-20483. I'm sure my modbus is working because I also used Modbus Master software and I can read the registers without any problems. Any ideas?
Code:
[TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime1, align: left"][COLOR=#000000]helmi-05 12:51:55 [/COLOR][/TD] [TD="class: LogPri1, align: left"] [/TD] [TD="class: LogType1, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry1, colspan: 8, align: left"][COLOR=#000000]Read adress: 5000 with name: Sähköauton lataus kWh value: -0.001 [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime0, align: left"][COLOR=#000000]helmi-05 12:51:55 [/COLOR][/TD] [TD="class: LogPri0, align: left"] [/TD] [TD="class: LogType0, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry0, colspan: 8, align: left"][COLOR=#000000]Catched at readHoldingRegister: System.InvalidOperationException: Nullable object must have a value. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionR esource resource) at HSPI_modbusSeer.serial.modbus.readHoldingRegister(ModbusClie nt client, addDevicesPageResponse slave) [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime1, align: left"][COLOR=#000000]helmi-05 12:51:55 [/COLOR][/TD] [TD="class: LogPri1, align: left"] [/TD] [TD="class: LogType1, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry1, colspan: 8, align: left"][COLOR=#000000]Catched at readHoldingRegister: System.InvalidOperationException: Nullable object must have a value. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionR esource resource) at HSPI_modbusSeer.serial.modbus.readHoldingRegister(ModbusClie nt client, addDevicesPageResponse slave) [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime0, align: left"][COLOR=#000000]helmi-05 12:51:55 [/COLOR][/TD] [TD="class: LogPri0, align: left"] [/TD] [TD="class: LogType0, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry0, colspan: 8, align: left"][COLOR=#000000]Catched at readHoldingRegister: System.InvalidOperationException: Nullable object must have a value. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionR esource resource) at HSPI_modbusSeer.serial.modbus.readHoldingRegister(ModbusClie nt client, addDevicesPageResponse slave) [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime1, align: left"][COLOR=#000000]helmi-05 12:51:55 [/COLOR][/TD] [TD="class: LogPri1, align: left"] [/TD] [TD="class: LogType1, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry1, colspan: 8, align: left"][COLOR=#000000]Catched at readHoldingRegister: System.InvalidOperationException: Nullable object must have a value. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionR esource resource) at HSPI_modbusSeer.serial.modbus.readHoldingRegister(ModbusClie nt client, addDevicesPageResponse slave) [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row"] [TR] [TD="class: LogDateLong LogDateTime0, align: left"][COLOR=#000000]helmi-05 12:51:56 [/COLOR][/TD] [TD="class: LogPri0, align: left"] [/TD] [TD="class: LogType0, colspan: 3, align: left"][COLOR=#000000]Debug [/COLOR][/TD] [TD="class: LogEntry0, colspan: 8, align: left"][COLOR=#000000]Catched at readHoldingRegister: System.InvalidOperationException: Nullable object must have a value. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionR esource resource) at HSPI_modbusSeer.serial.modbus.readHoldingRegister(ModbusClie nt client, addDevicesPageResponse slave) [/COLOR][/TD] [/TR] [/TABLE]
Comment