Query via Modbus TCP -> MSSQL - zero values

Hello all,

I have the following problem. I query my heat pump every 5 minutes via Modbus TCP. Then I take the values and make a join. After that I write them per INSERT command into a MSSQL database.

For some time this works without problems. Suddenly only values with zero are written, although the values are correct via Modbus.

Do you have an idea what the problem could be?

Many thanks in advance.
image

What does "Debug 2" show?

How is the join configured?

How is the SQL node configured?

Debug-2
image
Join
image
SQL Node


Config SQL Node

image

Ok, as I suspected.

Often, if you do multiple requests in parallel, the modbus nodes can get a bit stuck.

Next, because you have set the join node to use array mode, it is waiting for 7 values before releasing. That means if only 1 ModBus node responds 7 times, you will fill the join array & it will release with the same 7 values.

The best solution (if possible, depends on ModBus addresses) is to ...

  1. Grab all 7 registers in 1 read (e.g. read 7 in 1 read node)
  2. Use 1 buffer parser to convert them all into one nice object
  3. Use named parameters in the SQL node.

if you dont know how, share your flow & I will show you.

1 Like

Hi,
thank you very much for your answer.
I really need help with this. :slight_smile:

Share or export and put in chat?

Would share this tomorrow.

Share in a reply.

Select all the nodes in that you showed in the screenshot (draw a selection box around them), press CTRL+E, then click copy.

Press the </> code button in a reply & paste the copied flow into the code block.

[
    {
        "id": "483c86f14f89b7c7",
        "type": "inject",
        "z": "5573435263570348",
        "name": "Start (5min)",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "300",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 40,
        "wires": [
            [
                "a5b08f60bde64ee9",
                "d96f0a6714957359",
                "122c34ec6f4066a4",
                "278ae359984bcc88",
                "6997f62784575bbc",
                "2511adce373beaf4",
                "48fe6df5fc594e1a"
            ]
        ]
    },
    {
        "id": "a5b08f60bde64ee9",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Outdoor temperature (BT1)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "1",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 180,
        "y": 140,
        "wires": [
            [
                "830b56e8f41dd702"
            ],
            [
                "454ac99b9ba9cb43"
            ]
        ]
    },
    {
        "id": "d96f0a6714957359",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Brine in (BT10)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "10",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 140,
        "y": 180,
        "wires": [
            [],
            [
                "ca9a6c58c0de694f"
            ]
        ]
    },
    {
        "id": "122c34ec6f4066a4",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Brine out (BT11)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "11",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 140,
        "y": 220,
        "wires": [
            [],
            [
                "de29bc81e95afccc"
            ]
        ]
    },
    {
        "id": "454ac99b9ba9cb43",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Parse BT1",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "BT1",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/10",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 140,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "ca9a6c58c0de694f",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Parse BT10",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "BT10",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/10",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 180,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "de29bc81e95afccc",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Parse BT11",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "BT11",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/10",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 220,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "278ae359984bcc88",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Hot water top (BT7)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "8",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 150,
        "y": 260,
        "wires": [
            [],
            [
                "e26f5a6a0e684e6e"
            ]
        ]
    },
    {
        "id": "6997f62784575bbc",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Hot water charging (BT6)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "9",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 170,
        "y": 300,
        "wires": [
            [],
            [
                "42dbf00fab9bd43d"
            ]
        ]
    },
    {
        "id": "48fe6df5fc594e1a",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Heating medium pump speed (GP1)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "1102",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 210,
        "y": 380,
        "wires": [
            [],
            [
                "d159ad50be54ac76"
            ]
        ]
    },
    {
        "id": "2511adce373beaf4",
        "type": "modbus-getter",
        "z": "5573435263570348",
        "name": "Brine pump speed (GP2)",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "1104",
        "quantity": "1",
        "server": "5b6855b757688e02",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 170,
        "y": 340,
        "wires": [
            [],
            [
                "2cfe94c2db8487bd"
            ]
        ]
    },
    {
        "id": "e26f5a6a0e684e6e",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Hot water top (BT7)",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "BT7",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/10",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 490,
        "y": 260,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "42dbf00fab9bd43d",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Hot water charging (BT6)",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "BT6",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/10",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 510,
        "y": 300,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "2cfe94c2db8487bd",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Brine pump speed (GP2)",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "GP2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/1",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 510,
        "y": 340,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "d159ad50be54ac76",
        "type": "buffer-parser",
        "z": "5573435263570348",
        "name": "Heating medium pump speed (GP1)",
        "data": "payload.buffer",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16be",
                "name": "GP1",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "/1",
                "mask": ""
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "object",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 550,
        "y": 380,
        "wires": [
            [
                "cc7ba7f2a8c834ec"
            ]
        ]
    },
    {
        "id": "e39f0529532d2f49",
        "type": "MSSQL",
        "z": "5573435263570348",
        "mssqlCN": "9d74c3ddb1dc754c",
        "name": "MesswerteDB_Heatpump",
        "outField": "payload",
        "returnType": "0",
        "throwErrors": 1,
        "query": "INSERT INTO [dbo].[Heatpump] (datetime, BT1, BT10, BT11, BT7, BT6, GP2, GP1) VALUES (@timestamp, '{{{payload.0.BT1.value}}}', '{{{payload.1.BT10.value}}}', '{{{payload.2.BT11.value}}}', '{{{payload.3.BT7.value}}}', '{{{payload.4.BT6.value}}}', '{{{payload.5.GP2.value}}}', '{{{payload.6.GP1.value}}}')",
        "modeOpt": "queryMode",
        "modeOptType": "query",
        "queryOpt": "payload",
        "queryOptType": "editor",
        "paramsOpt": "",
        "paramsOptType": "editor",
        "rows": "rows",
        "rowsType": "msg",
        "params": [
            {
                "output": false,
                "name": "timestamp",
                "type": "DateTime",
                "valueType": "datetime",
                "value": "0",
                "options": {
                    "nullable": true,
                    "primary": false,
                    "identity": false,
                    "readOnly": false
                }
            }
        ],
        "x": 1030,
        "y": 260,
        "wires": [
            [
                "73dfb63fe35f5fa9"
            ]
        ]
    },
    {
        "id": "cc7ba7f2a8c834ec",
        "type": "join",
        "z": "5573435263570348",
        "name": "Join Parse Values",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "7",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "num",
        "reduceFixup": "",
        "x": 790,
        "y": 260,
        "wires": [
            [
                "e39f0529532d2f49",
                "e3d7d4b88449898a"
            ]
        ]
    },
    {
        "id": "73dfb63fe35f5fa9",
        "type": "debug",
        "z": "5573435263570348",
        "name": "Output Join Values",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1270,
        "y": 260,
        "wires": []
    },
    {
        "id": "830b56e8f41dd702",
        "type": "debug",
        "z": "5573435263570348",
        "name": "debug 1",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 460,
        "y": 100,
        "wires": []
    },
    {
        "id": "e3d7d4b88449898a",
        "type": "debug",
        "z": "5573435263570348",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 980,
        "y": 200,
        "wires": []
    },
    {
        "id": "5b6855b757688e02",
        "type": "modbus-client",
        "name": "Nibe S1255-6PC",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "10.80.10.4",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "1",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true
    },
    {
        "id": "9d74c3ddb1dc754c",
        "type": "MSSQL-CN",
        "tdsVersion": "7_4",
        "name": "intra-mssql",
        "server": "172.46.100.23",
        "port": "1433",
        "encyption": false,
        "trustServerCertificate": false,
        "database": "MesswerteDB",
        "useUTC": false,
        "connectTimeout": "15000",
        "requestTimeout": "15000",
        "cancelTimeout": "5000",
        "pool": "5",
        "parseJSON": false,
        "enableArithAbort": true,
        "credentials": {}
    }
]

Hi,
I have tried this with the Modbus Sequencer. I can read all 7 registers with one read node. Now I get only one object which I can not distinguish.


Output Modbus Sequencer

Parser

Output Object
Is it possible to assign an item to each value?

That isnt really what I said.

Here is something for you to try.

It tries to grab as many values as possible in as few ModBus reads as possible. This keeps the data as consistent as possible, while speeds up the whole process, reduces comms and reduces failure points, removes JOIN node & avoids out of sequence values by using named properties instead of an array.

Streamlined flow - all in series

Doing SQL properly...

Use the tools provided! Once you have sensible data in the debug window, use the "Copy Path" to get exact path of the item then paste it into the parameters source

chrome_FAnr9KwT3n

The flow JSON (use CTRL+I to import)

[{"id":"783094c6dca1b4ea","type":"modbus-getter","z":"edf82570772f4a51","name":"Nibe (FC4) Address 1 ~ 11","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"InputRegister","adr":"11","quantity":"1","server":"5b6855b757688e02","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":400,"y":660,"wires":[[],["9a014463e9531943"]]},{"id":"9a014463e9531943","type":"buffer-parser","z":"edf82570772f4a51","name":"Parse BT1 ~ BT11 -> BTvalues","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"BT1","offset":0,"length":1,"offsetbit":0,"scale":"/10","mask":""},{"type":"int16be","name":"BT7","offset":16,"length":1,"offsetbit":0,"scale":"/10","mask":""},{"type":"int16be","name":"BT6","offset":18,"length":1,"offsetbit":0,"scale":"/10","mask":""},{"type":"int16be","name":"BT10","offset":20,"length":1,"offsetbit":0,"scale":"/10","mask":""},{"type":"int16be","name":"BT11","offset":22,"length":1,"offsetbit":0,"scale":"/10","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"BTvalues","msgPropertyType":"str","resultType":"object","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":710,"y":660,"wires":[["7fc7723a3fc50271"]]},{"id":"7fc7723a3fc50271","type":"modbus-getter","z":"edf82570772f4a51","name":"Nibe (FC4) Address 1102 ~ 1104","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"InputRegister","adr":"1102","quantity":"3","server":"5b6855b757688e02","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":410,"y":740,"wires":[[],["cf4b16f8ab487ec8"]]},{"id":"cf4b16f8ab487ec8","type":"buffer-parser","z":"edf82570772f4a51","name":"Parse GP1, GP2 -> msg.GPvalues","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"GP1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"GP2","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"GPvalues","msgPropertyType":"str","resultType":"object","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":720,"y":740,"wires":[["33b9ec78f61537c2","a9f2b33ee83bb283","2de3aa13c4714b86"]]},{"id":"c7c1d863f45f992b","type":"inject","z":"edf82570772f4a51","name":"Start (5min)","props":[{"p":"payload"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":660,"wires":[["783094c6dca1b4ea"]]},{"id":"33b9ec78f61537c2","type":"MSSQL","z":"edf82570772f4a51","mssqlCN":"9d74c3ddb1dc754c","name":"MesswerteDB_Heatpump","outField":"payload","returnType":"0","throwErrors":1,"query":"INSERT INTO [dbo].[Heatpump] (\r\n    datetime, BT1, BT10, BT11, BT7, BT6, GP2, GP1\r\n) VALUES (\r\n    @timestamp, @BT1, @BT10, @BT11, @BT7, @BT6, @GP2, @GP1\r\n)","modeOpt":"queryMode","modeOptType":"query","queryOpt":"payload","queryOptType":"editor","paramsOpt":"","paramsOptType":"editor","rows":"rows","rowsType":"msg","params":[{"output":false,"name":"timestamp","type":"DateTime","valueType":"datetime","value":"0","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"BT1","type":"int","valueType":"msg","value":"BTvalues.BT1","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"BT10","type":"int","valueType":"msg","value":"BTvalues.BT10","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"BT11","type":"int","valueType":"msg","value":"BTvalues.BT11","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"BT7","type":"int","valueType":"msg","value":"BTvalues.BT7","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"BT6","type":"int","valueType":"msg","value":"BTvalues.BT6","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"GP2","type":"int","valueType":"msg","value":"GPvalues.GP2","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}},{"output":false,"name":"GP1","type":"int","valueType":"msg","value":"GPvalues.GP1","options":{"nullable":true,"primary":false,"identity":false,"readOnly":false}}],"x":1050,"y":740,"wires":[[]]},{"id":"a9f2b33ee83bb283","type":"debug","z":"edf82570772f4a51","name":"Check me: msg.BTvalues","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"BTvalues","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":820,"wires":[]},{"id":"2de3aa13c4714b86","type":"debug","z":"edf82570772f4a51","name":"Check me: msg.GPvalues","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"GPvalues","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":860,"wires":[]},{"id":"5b6855b757688e02","type":"modbus-client","name":"Nibe S1255-6PC","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"10.80.10.4","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true},{"id":"9d74c3ddb1dc754c","type":"MSSQL-CN","tdsVersion":"7_4","name":"intra-mssql","server":"172.46.100.23","port":"1433","encyption":false,"trustServerCertificate":false,"database":"MesswerteDB","useUTC":false,"connectTimeout":"15000","requestTimeout":"15000","cancelTimeout":"5000","pool":"5","parseJSON":false,"enableArithAbort":true}]
1 Like

I got it. Unfortunately, the flow does not work for me. The registers are in no order.
What happens if Node-Red does not find a register?
Have a look at the Modbus registers.

Address: 11
Quantity: 1

does not return any values.

Address: 7
Quantity: 8

returns a quantity of values. Unfortunately I don't know why.
I don't have the understanding for that.

Query from address 7; Then query 8 values.
All return corresponding values. See photo

Since ID 15 does not exist and the next ID is 16, nothing happens. When debugging, no value comes. Everything remains empty.

This puzzles me.

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