Problem reading from Mod-Bus RTU from an power meter "Error: Modbus exception 2: Illegal data address (register not supported by device)"

I have a power meter from Howard Butler M552-CTrans which is working with the Multiview Tool from Howard Butler, but if I want to read with node-red-contrib-modbus "Modbus-Read" I get back the answer from power meter "Error: Modbus exception 2: Illegal data address (register not supported by device)". I have tried different variants of the address ((FC 3: 1, 01, 0001, 30001, 0x0000; FC 4: 0, 1, 40001, 42001, 0x07D0, ..• ), but I always get the same Error back.
As new user I am not able to attach files to my topic to make my problem more clear.
Hopefully somebody can help me!

Flow:

[
    {
        "id": "fdf591bcb6eae44c",
        "type": "tab",
        "label": "Stromzähler",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "48d279a26237dab6",
        "type": "debug",
        "z": "fdf591bcb6eae44c",
        "name": "Leistung Trocknung",
        "active": true,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 470,
        "y": 60,
        "wires": []
    },
    {
        "id": "bbb11376a259b134",
        "type": "modbus-read",
        "z": "fdf591bcb6eae44c",
        "name": "Stromzähler Modbus Lesen",
        "topic": "",
        "showStatusActivities": true,
        "logIOActivities": false,
        "showErrors": true,
        "unitid": "10",
        "dataType": "HoldingRegister",
        "adr": "30001",
        "quantity": "1",
        "rate": "1",
        "rateUnit": "m",
        "delayOnStart": true,
        "startDelayTime": "2",
        "server": "886438e42987630e",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "x": 180,
        "y": 60,
        "wires": [
            [
                "48d279a26237dab6"
            ],
            []
        ]
    },
    {
        "id": "886438e42987630e",
        "type": "modbus-client",
        "name": "Modbus-RTU-Server-Stromzähler",
        "clienttype": "serial",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "tcpHost": "127.0.0.1",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB2",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "even",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "1",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true
    }
]

I'm using node red v3.0.2 node.js v14.21.1 with node-red-contrib-modbus v5.23.3

Double check documentation and make sure you're using the correct modbus function code.. without having that serial device on hand, nobody is going to be able to test your settings. Linking to the device's modbus table could help us identify the issue

Attached a short screenshot of the manual. I'm not sure how to check if node red is using function 03h to read 4X registers

One thing to know about modbus register addresses is that the function code accesses certain register ranges (sometimes the same data but different type of data is returned) So, instead of polling address 30001, you want just address 1. Try again that way.

Another annoying thing is that some manuals will refer to register 1, but that is at address 0 (like the first index in an array). Sometimes they will tell you the addresses are offset, but sometimes not.

good luck!

Are you sure the device is RTU Buffered?

Have you tried RTU or ASCII mode?

I could not see anything about its Unit ID in manual. Energy meters i know usually have preconfigured 1 as their unit ID. So try unit ID = 1 unless you know for sure is 10.

That would probably not result in a data address error

You are right the unit ID was 1 by default, but I have configured it to 10 and the communication to the power meter is working - it answers.

With ASCII mode I can not reach the power meter → time out.
With RTU I get another error "Error: Data length error, expected 7 got 1" do you know what could be wrong there?

I have now found out what I did wrong. The solution is to use FC3 for accessing 42000 address with decimal input of 2000 in address field.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.