Micro850 PLC and node-red

Hi ,
I have struggling for a few days to read tags from Micro850 PLC.I have tried using PCCC node and it says online but no tags are read.With ethernet ip node , it shows up as offline..

Any ideas as to how to go about this?

1 Like

Hi Guys,
I created some in roads in to the issue by configuring the PLC as a modbus server ad using a tcpmodbus node, but as soon as I connect it , it shows connected initially but then disconnects itself moments later and throws the following error :

"25 Oct 10:21:34 - [info] Starting flows
2022-10-25 04:51:34: Connecting to modbustcp slave at 192.168.4.132:502 unit_id: 1
25 Oct 10:21:34 - [info] Started flows
2022-10-25 04:51:39: [object Object]
25 Oct 10:21:39 - [error] [modbustcp-read:9c13dca07a38c570] ModbusTCPClient: {"err":"ModbusException","response":{"_id":1,"_protocol":0,"_bodyLength":3,"_unitId":1,"_body":{"_fc":3,"_code":2}}}
25 Oct 10:21:39 - [error] [modbustcp-server:d6b621e5ce914dbe] socket error: undefined: Locally emitted error
{
  err: 'ModbusException',
  response: ModbusTCPResponse {
    _id: 1,
    _protocol: 0,
    _bodyLength: 3,
    _unitId: 1,
    _body: ExceptionResponseBody { _fc: 3, _code: 2 }
  }
}
2022-10-25 04:51:39:  was disconnected or was unable to connect"

Can someone decode this error and let me know as to whats going wrong?

Which flavor of MODBUS node are you using and how is your PLC setup? If you can post your flow, that would help a ton. I've had a lot of success with node-red-contrib-modbus with several units using MODBUS over TCP. It looks like there's a five second delay from the time your flow starts until the time your MODBUS errors. That could either be a timeout or a delay in your code. If it's a timeout, you have a connection setup issue that will need to be diagnosed. Otherwise, you're looking at a configuration issue that may deal solely with your controller needing additional setup after changing it to MODBUS.

So after a lot hit and trials, I figured out that the modbus addresses have to be offset in modbus node, which means if I am trying to read register 40010, I need to set the address in node to 9 (Not 10). The flow is as given below:

[
    {
        "id": "c4dce4fbc154a50d",
        "type": "modbus-read",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "topic": "",
        "showStatusActivities": false,
        "logIOActivities": false,
        "showErrors": false,
        "unitid": "1",
        "dataType": "HoldingRegister",
        "adr": "09",
        "quantity": "2",
        "rate": "30",
        "rateUnit": "s",
        "delayOnStart": false,
        "startDelayTime": "",
        "server": "395cea006c1c7c82",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "x": 110,
        "y": 80,
        "wires": [
            [
                "c425a4f4.8a8e48"
            ],
            []
        ],
        "info": "USE MODBIS ADDRESSES WITH AN OFFSET (-1)\r\nFOR EXAMPLE IF CONFIGURED ADDRESSES IN PLC ARE 40010-40011 USE 09 AS THE STARTING ADDRESS IN NODE-RED NODE."
    },
    {
        "id": "c425a4f4.8a8e48",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 330,
        "y": 80,
        "wires": [
            [
                "c507a2c0315f76ac",
                "1a27bb3d845ad59a",
                "d3acf6904a08e0d0"
            ]
        ]
    },
    {
        "id": "c507a2c0315f76ac",
        "type": "ui_gauge",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "group": "162f3525ef9d6968",
        "order": 7,
        "width": 6,
        "height": 5,
        "gtype": "gage",
        "title": "Steam Pressure",
        "label": "KG/CM2",
        "format": "{{value | number:2}}",
        "min": 0,
        "max": "16",
        "colors": [
            "#ff0000",
            "#e6e600",
            "#43cb3a"
        ],
        "seg1": "9.8",
        "seg2": "12.5",
        "className": "",
        "x": 620,
        "y": 100,
        "wires": []
    },
    {
        "id": "90208c1632ec0235",
        "type": "modbus-read",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "topic": "",
        "showStatusActivities": false,
        "logIOActivities": false,
        "showErrors": false,
        "unitid": "1",
        "dataType": "Coil",
        "adr": "0",
        "quantity": "1",
        "rate": "30",
        "rateUnit": "s",
        "delayOnStart": false,
        "startDelayTime": "",
        "server": "395cea006c1c7c82",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "x": 110,
        "y": 20,
        "wires": [
            [
                "9060a2375c0cc3a4"
            ],
            []
        ],
        "info": "USE MODBIS ADDRESSES WITH AN OFFSET (-1)\r\nFOR EXAMPLE IF CONFIGURED ADDRESSES IN PLC ARE 40010-40011 USE 09 AS THE STARTING ADDRESS IN NODE-RED NODE."
    },
    {
        "id": "9060a2375c0cc3a4",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "function 154",
        "func": "msg.payload=msg.payload[0]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 310,
        "y": 20,
        "wires": [
            [
                "708caad178b0e48d",
                "bb9568d3e77dfa0b"
            ]
        ]
    },
    {
        "id": "708caad178b0e48d",
        "type": "ui_led",
        "z": "7b7ae41afa47cbc2",
        "order": 2,
        "group": "162f3525ef9d6968",
        "width": 2,
        "height": 1,
        "label": "",
        "labelPlacement": "left",
        "labelAlignment": "left",
        "colorForValue": [
            {
                "color": "#ff0000",
                "value": "false",
                "valueType": "bool"
            },
            {
                "color": "#66ff00",
                "value": "true",
                "valueType": "bool"
            }
        ],
        "allowColorForValueInMessage": false,
        "shape": "circle",
        "showGlow": true,
        "name": "",
        "x": 590,
        "y": 20,
        "wires": []
    },
    {
        "id": "bb9568d3e77dfa0b",
        "type": "switch",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 610,
        "y": 60,
        "wires": [
            [
                "cb4b126fb82bdfc6"
            ],
            [
                "2a7330b26b98f21c"
            ]
        ]
    },
    {
        "id": "cb4b126fb82bdfc6",
        "type": "change",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "runstatb",
                "pt": "global",
                "to": "Burner Off",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 40,
        "wires": [
            []
        ]
    },
    {
        "id": "2a7330b26b98f21c",
        "type": "change",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "runstatb",
                "pt": "global",
                "to": "Burner On",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 80,
        "wires": [
            []
        ]
    },
    {
        "id": "395cea006c1c7c82",
        "type": "modbus-client",
        "name": "",
        "clienttype": "tcp",
        "bufferCommands": false,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": false,
        "tcpHost": "192.168.4.132",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "",
        "unit_id": 1,
        "commandDelay": 1,
        "clientTimeout": 1000,
        "reconnectOnTimeout": false,
        "reconnectTimeout": 2000,
        "parallelUnitIdsAllowed": false
    },
    {
        "id": "162f3525ef9d6968",
        "type": "ui_group",
        "name": "BOILER METRICS",
        "tab": "ff797a996c4abbeb",
        "order": 1,
        "disp": true,
        "width": 18,
        "collapse": false,
        "className": ""
    },
    {
        "id": "ff797a996c4abbeb",
        "type": "ui_tab",
        "name": "BOILER -4T",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    }
]

Ok so that out of the way, there is another issue which has suddenly cropped up. The modbus node works fine for a few minutes and then becomes unresponsive, although it is configured to trigger every 30 secs. No errors are generated (at least nothing in the debug window) as well.
What could be the issue?
Please help

This is odd. Generally, you'll want to read the register given which usually reads that register and possibly the next register. If this is how you're setup works, then run with it, assuming you're getting correct data. I can't tell you you're wrong as I don't have your setup. But it's just odd. If you have any errors in the future, check on this for sure.

There's not a lot in your code that I can see as a direct issue, but there are some things that could be causing your problems. The big one is that you're using two MODBUS read nodes to read the same module. This can cause traffic conflicts due to the fact that both will try to read at the same time. You'll most likely want to use the flex-getter node instead for this and pair it with some inject nodes setup with an initial injection delay and a repeated injection rate of 30 seconds. Because the flex-getter is only setup with the connection information for your MODBUS module, it doesn't have any information on the registers or whatever you're going to read. You'll setup the payload your inject nodes pass to include your fc (1 or 3 depending on your request), your address you want it to pull, the quantity of bytes to pull (1 for simple data, 2 or more for more complex data like floats or character strings) and a topic you can use for data redirection you can use later (i.e. LED_state). The flex-getter has built-in traffic control that will keep messages from colliding and causing controller timeouts and unresponsiveness.

Also, since the flex-getter is an individual node, you'll need to setup a function after it for traffic redirection (the topic I suggested adding to the inject node). You'll probably want to setup your function with multiple outputs and direct the traffic coming out of the flex-getter accordingly. Let me know if you have questions setting this up. Some have never done this before. Because you have a function setup for redirection, you can slip your flow.set() code into the function, which can clean up your flow a little and help keep your code in one spot. This isn't a necessity, just something that's an easy option. Your code, your call. But the function node with the redirect is almost a necessity. It's either that or having several individual response functions for any groups that may need to listen for and react to the output. You don't appear to have a lot of groups, so having one processing function would be easy.

Let me know if you run into other problems still. I think though that using the flex-getter node will clear up most of what you're experiencing.

Tried flexgetter node and I am getting values as expected.As of now no issues but kept the same under observation.Added a few more nodes BTW.

Flow;

[
    {
        "id": "c425a4f4.8a8e48",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 430,
        "y": 80,
        "wires": [
            [
                "c507a2c0315f76ac",
                "56c4218a20e857dc",
                "ff088bad8001d4ae"
            ]
        ]
    },
    {
        "id": "c507a2c0315f76ac",
        "type": "ui_gauge",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "group": "162f3525ef9d6968",
        "order": 7,
        "width": 6,
        "height": 5,
        "gtype": "gage",
        "title": "Steam Pressure",
        "label": "KG/CM2",
        "format": "{{value | number:2}}",
        "min": 0,
        "max": "16",
        "colors": [
            "#ff0000",
            "#e6e600",
            "#43cb3a"
        ],
        "seg1": "9.8",
        "seg2": "12.5",
        "className": "",
        "x": 840,
        "y": 80,
        "wires": []
    },
    {
        "id": "01487d130de2e9aa",
        "type": "ui_gauge",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "group": "162f3525ef9d6968",
        "order": 8,
        "width": 6,
        "height": 5,
        "gtype": "gage",
        "title": "Steam Flow-rate",
        "label": "KG/HR",
        "format": "{{value | number:2}}",
        "min": 0,
        "max": "3000",
        "colors": [
            "#00ff40",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "1500",
        "seg2": "2200",
        "className": "",
        "x": 620,
        "y": 140,
        "wires": []
    },
    {
        "id": "8b34bd3d246c47d8",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 450,
        "y": 120,
        "wires": [
            [
                "01487d130de2e9aa"
            ]
        ]
    },
    {
        "id": "d2e937083b3dcd2d",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 450,
        "y": 160,
        "wires": [
            [
                "67047bdc1ba515ab"
            ]
        ]
    },
    {
        "id": "96e67c043291af4f",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 450,
        "y": 200,
        "wires": [
            [
                "04f4ddf6743385d2"
            ]
        ]
    },
    {
        "id": "ea7da5d1bf2272d0",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 240,
        "wires": [
            [
                "716bee05284139fe"
            ]
        ]
    },
    {
        "id": "0f3fc0baf7b31fe2",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 280,
        "wires": [
            [
                "670d9eeb1ee97ead"
            ]
        ]
    },
    {
        "id": "39233acfa122cdb7",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 320,
        "wires": [
            [
                "454dc76ec717c7b1"
            ]
        ]
    },
    {
        "id": "4ad55e8c30fd0cec",
        "type": "buffer-parser",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "item2",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "",
        "resultType": "value",
        "resultTypeType": "",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 470,
        "y": 380,
        "wires": [
            [
                "17101470c4f90d21"
            ]
        ]
    },
    {
        "id": "17101470c4f90d21",
        "type": "ui_gauge",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "group": "162f3525ef9d6968",
        "order": 10,
        "width": 5,
        "height": 6,
        "gtype": "donut",
        "title": "Efficiency",
        "label": "%",
        "format": "{{value | number:2}}",
        "min": 0,
        "max": "100",
        "colors": [
            "#ffd500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "99.5",
        "seg2": "",
        "className": "",
        "x": 700,
        "y": 360,
        "wires": []
    },
    {
        "id": "9060a2375c0cc3a4",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "function 154",
        "func": "msg.payload=msg.payload[0]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 370,
        "y": 20,
        "wires": [
            [
                "708caad178b0e48d",
                "bb9568d3e77dfa0b"
            ]
        ]
    },
    {
        "id": "708caad178b0e48d",
        "type": "ui_led",
        "z": "7b7ae41afa47cbc2",
        "order": 2,
        "group": "162f3525ef9d6968",
        "width": 2,
        "height": 1,
        "label": "",
        "labelPlacement": "left",
        "labelAlignment": "left",
        "colorForValue": [
            {
                "color": "#ff0000",
                "value": "false",
                "valueType": "bool"
            },
            {
                "color": "#66ff00",
                "value": "true",
                "valueType": "bool"
            }
        ],
        "allowColorForValueInMessage": false,
        "shape": "circle",
        "showGlow": true,
        "name": "",
        "x": 530,
        "y": 20,
        "wires": []
    },
    {
        "id": "bb9568d3e77dfa0b",
        "type": "switch",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 570,
        "y": 60,
        "wires": [
            [
                "cb4b126fb82bdfc6"
            ],
            [
                "2a7330b26b98f21c"
            ]
        ]
    },
    {
        "id": "cb4b126fb82bdfc6",
        "type": "change",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "runstatb",
                "pt": "global",
                "to": "Burner Off",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 710,
        "y": 20,
        "wires": [
            []
        ]
    },
    {
        "id": "2a7330b26b98f21c",
        "type": "change",
        "z": "7b7ae41afa47cbc2",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "runstatb",
                "pt": "global",
                "to": "Burner On",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 870,
        "y": 40,
        "wires": [
            []
        ]
    },
    {
        "id": "04f4ddf6743385d2",
        "type": "ui_artlessgauge",
        "z": "7b7ae41afa47cbc2",
        "group": "162f3525ef9d6968",
        "order": 20,
        "width": 9,
        "height": 1,
        "name": "",
        "icon": "",
        "label": "Stack Temp",
        "unit": "DegC",
        "layout": "linear",
        "decimals": "2",
        "differential": false,
        "minmax": false,
        "colorTrack": "#555555",
        "style": "",
        "colorFromTheme": true,
        "property": "payload",
        "secondary": "secondary",
        "inline": false,
        "animate": true,
        "sectors": [
            {
                "val": 0,
                "col": "#ff9900",
                "t": "min",
                "dot": 0
            },
            {
                "val": 350,
                "col": "#ff9900",
                "t": "max",
                "dot": 0
            }
        ],
        "lineWidth": 3,
        "bgcolorFromTheme": true,
        "diffCenter": "",
        "x": 660,
        "y": 220,
        "wires": []
    },
    {
        "id": "716bee05284139fe",
        "type": "ui_artlessgauge",
        "z": "7b7ae41afa47cbc2",
        "group": "162f3525ef9d6968",
        "order": 17,
        "width": 9,
        "height": 1,
        "name": "",
        "icon": "",
        "label": "Steam Temp",
        "unit": "DegC",
        "layout": "linear",
        "decimals": "2",
        "differential": false,
        "minmax": false,
        "colorTrack": "#555555",
        "style": "",
        "colorFromTheme": true,
        "property": "payload",
        "secondary": "secondary",
        "inline": false,
        "animate": true,
        "sectors": [
            {
                "val": 0,
                "col": "#ff9900",
                "t": "min",
                "dot": 0
            },
            {
                "val": 350,
                "col": "#ff9900",
                "t": "max",
                "dot": 0
            }
        ],
        "lineWidth": 3,
        "bgcolorFromTheme": true,
        "diffCenter": "",
        "x": 860,
        "y": 240,
        "wires": []
    },
    {
        "id": "670d9eeb1ee97ead",
        "type": "ui_artlessgauge",
        "z": "7b7ae41afa47cbc2",
        "group": "162f3525ef9d6968",
        "order": 23,
        "width": 9,
        "height": 1,
        "name": "",
        "icon": "",
        "label": "Feed-water Temp",
        "unit": "DegC",
        "layout": "linear",
        "decimals": "2",
        "differential": false,
        "minmax": false,
        "colorTrack": "#555555",
        "style": "",
        "colorFromTheme": true,
        "property": "payload",
        "secondary": "secondary",
        "inline": false,
        "animate": true,
        "sectors": [
            {
                "val": 0,
                "col": "#ff9900",
                "t": "min",
                "dot": 0
            },
            {
                "val": 101,
                "col": "#ff9900",
                "t": "max",
                "dot": 0
            }
        ],
        "lineWidth": 3,
        "bgcolorFromTheme": true,
        "diffCenter": "",
        "x": 700,
        "y": 280,
        "wires": []
    },
    {
        "id": "454dc76ec717c7b1",
        "type": "ui_artlessgauge",
        "z": "7b7ae41afa47cbc2",
        "group": "162f3525ef9d6968",
        "order": 19,
        "width": 8,
        "height": 1,
        "name": "",
        "icon": "",
        "label": "Feed-Air Temp",
        "unit": "DegC",
        "layout": "linear",
        "decimals": "2",
        "differential": false,
        "minmax": false,
        "colorTrack": "#555555",
        "style": "",
        "colorFromTheme": true,
        "property": "payload",
        "secondary": "secondary",
        "inline": false,
        "animate": true,
        "sectors": [
            {
                "val": 0,
                "col": "#ff9900",
                "t": "min",
                "dot": 0
            },
            {
                "val": 100,
                "col": "#ff9900",
                "t": "max",
                "dot": 0
            }
        ],
        "lineWidth": 3,
        "bgcolorFromTheme": true,
        "diffCenter": "",
        "x": 860,
        "y": 320,
        "wires": []
    },
    {
        "id": "67047bdc1ba515ab",
        "type": "ui_artlessgauge",
        "z": "7b7ae41afa47cbc2",
        "group": "162f3525ef9d6968",
        "order": 16,
        "width": 8,
        "height": 1,
        "name": "",
        "icon": "",
        "label": "O2 Level",
        "unit": "%",
        "layout": "linear",
        "decimals": "1",
        "differential": false,
        "minmax": false,
        "colorTrack": "#555555",
        "style": "",
        "colorFromTheme": true,
        "property": "payload",
        "secondary": "secondary",
        "inline": false,
        "animate": true,
        "sectors": [
            {
                "val": 0,
                "col": "#ff9900",
                "t": "min",
                "dot": 0
            },
            {
                "val": 21,
                "col": "#ff9900",
                "t": "max",
                "dot": 0
            }
        ],
        "lineWidth": "3",
        "bgcolorFromTheme": true,
        "diffCenter": "",
        "x": 660,
        "y": 180,
        "wires": []
    },
    {
        "id": "61df1f9b68e14bf3",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "ST PR",
        "func": "msg.payload = [msg.payload[0], msg.payload[1]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 270,
        "y": 80,
        "wires": [
            [
                "c425a4f4.8a8e48"
            ]
        ]
    },
    {
        "id": "2046031e16664b87",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "ST Flow",
        "func": "msg.payload = [msg.payload[2], msg.payload[3]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 120,
        "wires": [
            [
                "8b34bd3d246c47d8"
            ]
        ]
    },
    {
        "id": "21d8189a0d64bd80",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "O2",
        "func": "msg.payload = [msg.payload[4], msg.payload[5]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 270,
        "y": 160,
        "wires": [
            [
                "d2e937083b3dcd2d"
            ]
        ]
    },
    {
        "id": "47ec676f396887b5",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "STK temp",
        "func": "msg.payload = [msg.payload[6], msg.payload[7]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 200,
        "wires": [
            [
                "96e67c043291af4f"
            ]
        ]
    },
    {
        "id": "e5bd780490240a4d",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "STM temp",
        "func": "msg.payload = [msg.payload[8], msg.payload[9]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 240,
        "wires": [
            [
                "ea7da5d1bf2272d0"
            ]
        ]
    },
    {
        "id": "f51b047bb0e567d2",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "FW temp",
        "func": "msg.payload = [msg.payload[10], msg.payload[11]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 280,
        "wires": [
            [
                "0f3fc0baf7b31fe2"
            ]
        ]
    },
    {
        "id": "ba70132618c70c55",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "FD air temp",
        "func": "msg.payload = [msg.payload[12], msg.payload[13]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 320,
        "wires": [
            [
                "39233acfa122cdb7"
            ]
        ]
    },
    {
        "id": "63335c8da171ae96",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "EFF",
        "func": "msg.payload = [msg.payload[14], msg.payload[15]]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 290,
        "y": 380,
        "wires": [
            [
                "4ad55e8c30fd0cec"
            ]
        ]
    },
    {
        "id": "56c4218a20e857dc",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "conv",
        "func": "msg.payload =msg.keyvalues.item2\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 810,
        "y": 120,
        "wires": [
            [
                "d67aff0bb12f5de8"
            ]
        ]
    },
    {
        "id": "d67aff0bb12f5de8",
        "type": "change",
        "z": "7b7ae41afa47cbc2",
        "name": "tag",
        "rules": [
            {
                "t": "move",
                "p": "payload",
                "pt": "msg",
                "to": "stmpr",
                "tot": "global"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "ff088bad8001d4ae",
        "type": "debug",
        "z": "7b7ae41afa47cbc2",
        "name": "debug 24",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 880,
        "y": 180,
        "wires": []
    },
    {
        "id": "5bcec1453074b2c6",
        "type": "modbus-flex-getter",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "server": "389a6ccea37b0cff",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 90,
        "y": 240,
        "wires": [
            [
                "61df1f9b68e14bf3",
                "2046031e16664b87",
                "21d8189a0d64bd80",
                "47ec676f396887b5",
                "e5bd780490240a4d",
                "f51b047bb0e567d2",
                "ba70132618c70c55",
                "63335c8da171ae96",
                "55be82712ee3c266",
                "0217224e80ca2684"
            ],
            []
        ]
    },
    {
        "id": "0c26a0c2d03dd944",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "func": "msg.payload = { value: msg.payload, 'fc': 3, 'unitid': 1, 'address': 9, 'quantity': 20 } \nreturn msg\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 70,
        "y": 320,
        "wires": [
            [
                "5bcec1453074b2c6"
            ]
        ]
    },
    {
        "id": "fd851b4545a8815d",
        "type": "inject",
        "z": "7b7ae41afa47cbc2",
        "name": "ping1",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "10",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 70,
        "y": 400,
        "wires": [
            [
                "0c26a0c2d03dd944"
            ]
        ]
    },
    {
        "id": "47e9f4887063d84d",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "func": "msg.payload = { value: msg.payload, 'fc': 1, 'unitid': 1, 'address': 0, 'quantity': 20 } \nreturn msg\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 110,
        "y": 40,
        "wires": [
            [
                "07bef1eeb430c1d1"
            ]
        ]
    },
    {
        "id": "07bef1eeb430c1d1",
        "type": "modbus-flex-getter",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "server": "389a6ccea37b0cff",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 230,
        "y": 20,
        "wires": [
            [
                "9060a2375c0cc3a4"
            ],
            []
        ]
    },
    {
        "id": "8dd9a2e19a45ae7a",
        "type": "inject",
        "z": "7b7ae41afa47cbc2",
        "name": "ping",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "20",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 50,
        "y": 120,
        "wires": [
            [
                "47e9f4887063d84d"
            ]
        ]
    },
    {
        "id": "162f3525ef9d6968",
        "type": "ui_group",
        "name": "BOILER METRICS",
        "tab": "ff797a996c4abbeb",
        "order": 1,
        "disp": true,
        "width": 18,
        "collapse": false,
        "className": ""
    },
    {
        "id": "389a6ccea37b0cff",
        "type": "modbus-client",
        "name": "server",
        "clienttype": "tcp",
        "bufferCommands": false,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": false,
        "tcpHost": "192.168.4.132",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "",
        "unit_id": "1",
        "commandDelay": "1",
        "clientTimeout": "1000",
        "reconnectOnTimeout": false,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": false
    },
    {
        "id": "ff797a996c4abbeb",
        "type": "ui_tab",
        "name": "BOILER -4T",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    }
]

There's a number of things that can be improved on in your flow that will help prevent issues down the road. First of all, set the values you're passing directly into your inject node.


Have one for your coil read and one for your register read. You don't need the functions to set the information for the MODBUS query. Also, add a topic or something as an identifier. You'll want this later.

Second, tie both of your inject nodes into ONE flex-getter node. This is how they were intended to be used. This is how you keep the traffic collisions out.
image

Next, tie the output of that into a steering function and steer your messages accordingly.
image

So in the end, you have a setup more like this:

There are several ways to optimize the flow further, but this will get you the setup you want without having any collisions and downtime. This is how you'll want to setup your MODBUS routines to make sure they work smoothly and without the flow causing issues. Give that a shot and let me know if you have any issues afterwards.

EDIT: You'll likely notice in that last image I have several unknown nodes. I don't have those nodes installed so it won't list them. That's also why I can't post the flow as it sits, because I don't have those nodes installed.

1 Like

Hi Matt,
Tried that out..Strangely it worked for the first time and thereafter it stopped . So I had to get it to work by adding function nodes and use a steering function as you suggested.

[
    {
        "id": "2a3b5e6d38fe836c",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "func": "msg.payload = { value: msg.payload, 'fc': 3, 'unitid': 1, 'address': 9, 'quantity': 20 } \nmsg.topic = \"registers\"\nreturn msg\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 201,
        "y": 20,
        "wires": [
            [
                "905fdba4bf75b9c7"
            ]
        ]
    },
    {
        "id": "8f07ec7636bb3b08",
        "type": "inject",
        "z": "7b7ae41afa47cbc2",
        "name": "ping",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 50,
        "y": 20,
        "wires": [
            [
                "2a3b5e6d38fe836c"
            ]
        ]
    },
    {
        "id": "6e25cd7a85229c6c",
        "type": "inject",
        "z": "7b7ae41afa47cbc2",
        "name": "ping1",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "3",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 50,
        "y": 60,
        "wires": [
            [
                "374bb38e9bf11ba3"
            ]
        ]
    },
    {
        "id": "374bb38e9bf11ba3",
        "type": "function",
        "z": "7b7ae41afa47cbc2",
        "name": "read",
        "func": "msg.payload = { value: msg.payload, 'fc': 1, 'unitid': 1, 'address': 0, 'quantity': 1 } \nmsg.topic = \"coils\"\nreturn msg\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 170,
        "y": 60,
        "wires": [
            [
                "905fdba4bf75b9c7"
            ]
        ]
    }
]

More importantly, interested in understanding more ways to optimize the flows

Just FYI, I haven't been near my setup this weekend. But I can see some stuff in the code where I'm pretty sure you're still having problems. I'll post a rework when I get to my setup.

Ok. Got a chance to play with the code and installed the missing nodes so I would have complete flows. Try this out and see if that helps.

[{"id":"c507a2c0315f76ac","type":"ui_gauge","z":"5fbe1d5938e13f31","name":"","group":"162f3525ef9d6968","order":7,"width":6,"height":5,"gtype":"gage","title":"Steam Pressure","label":"KG/CM2","format":"{{value | number:2}}","min":0,"max":"16","colors":["#ff0000","#e6e600","#43cb3a"],"seg1":"9.8","seg2":"12.5","className":"","x":1000,"y":180,"wires":[]},{"id":"01487d130de2e9aa","type":"ui_gauge","z":"5fbe1d5938e13f31","name":"","group":"162f3525ef9d6968","order":8,"width":6,"height":5,"gtype":"gage","title":"Steam Flow-rate","label":"KG/HR","format":"{{value | number:2}}","min":0,"max":"3000","colors":["#00ff40","#e6e600","#ca3838"],"seg1":"1500","seg2":"2200","className":"","x":1000,"y":300,"wires":[]},{"id":"17101470c4f90d21","type":"ui_gauge","z":"5fbe1d5938e13f31","name":"","group":"162f3525ef9d6968","order":10,"width":5,"height":6,"gtype":"donut","title":"Efficiency","label":"%","format":"{{value | number:2}}","min":0,"max":"100","colors":["#ffd500","#e6e600","#ca3838"],"seg1":"99.5","seg2":"","className":"","x":980,"y":540,"wires":[]},{"id":"9060a2375c0cc3a4","type":"function","z":"5fbe1d5938e13f31","name":"function 154","func":"msg.payload=msg.payload[0]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":100,"wires":[["708caad178b0e48d","bb9568d3e77dfa0b"]]},{"id":"bb9568d3e77dfa0b","type":"switch","z":"5fbe1d5938e13f31","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":120,"wires":[["cb4b126fb82bdfc6"],["2a7330b26b98f21c"]]},{"id":"cb4b126fb82bdfc6","type":"change","z":"5fbe1d5938e13f31","name":"","rules":[{"t":"set","p":"runstatb","pt":"global","to":"Burner Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":100,"wires":[[]]},{"id":"2a7330b26b98f21c","type":"change","z":"5fbe1d5938e13f31","name":"","rules":[{"t":"set","p":"runstatb","pt":"global","to":"Burner On","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":140,"wires":[[]]},{"id":"61df1f9b68e14bf3","type":"function","z":"5fbe1d5938e13f31","name":"ST PR","func":"msg.payload = [msg.payload[0], msg.payload[1]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":260,"wires":[["c425a4f4.8a8e48"]]},{"id":"2046031e16664b87","type":"function","z":"5fbe1d5938e13f31","name":"ST Flow","func":"msg.payload = [msg.payload[2], msg.payload[3]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":300,"wires":[["8b34bd3d246c47d8"]]},{"id":"21d8189a0d64bd80","type":"function","z":"5fbe1d5938e13f31","name":"O2","func":"msg.payload = [msg.payload[4], msg.payload[5]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":340,"wires":[["d2e937083b3dcd2d"]]},{"id":"47ec676f396887b5","type":"function","z":"5fbe1d5938e13f31","name":"STK temp","func":"msg.payload = [msg.payload[6], msg.payload[7]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":380,"wires":[["96e67c043291af4f"]]},{"id":"e5bd780490240a4d","type":"function","z":"5fbe1d5938e13f31","name":"STM temp","func":"msg.payload = [msg.payload[8], msg.payload[9]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":420,"wires":[["ea7da5d1bf2272d0"]]},{"id":"f51b047bb0e567d2","type":"function","z":"5fbe1d5938e13f31","name":"FW temp","func":"msg.payload = [msg.payload[10], msg.payload[11]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":460,"wires":[["0f3fc0baf7b31fe2"]]},{"id":"ba70132618c70c55","type":"function","z":"5fbe1d5938e13f31","name":"FD air temp","func":"msg.payload = [msg.payload[12], msg.payload[13]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":500,"wires":[["39233acfa122cdb7"]]},{"id":"63335c8da171ae96","type":"function","z":"5fbe1d5938e13f31","name":"EFF","func":"msg.payload = [msg.payload[14], msg.payload[15]]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":540,"wires":[["4ad55e8c30fd0cec"]]},{"id":"56c4218a20e857dc","type":"function","z":"5fbe1d5938e13f31","name":"conv","func":"msg.payload =msg.keyvalues.item2\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":970,"y":220,"wires":[["d67aff0bb12f5de8"]]},{"id":"d67aff0bb12f5de8","type":"change","z":"5fbe1d5938e13f31","name":"tag","rules":[{"t":"move","p":"payload","pt":"msg","to":"stmpr","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":220,"wires":[[]]},{"id":"ff088bad8001d4ae","type":"debug","z":"5fbe1d5938e13f31","name":"debug 24","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":980,"y":260,"wires":[]},{"id":"5bcec1453074b2c6","type":"modbus-flex-getter","z":"5fbe1d5938e13f31","name":"read","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"389a6ccea37b0cff","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":270,"y":200,"wires":[["3d8efe33d5b09962"],[]]},{"id":"fd851b4545a8815d","type":"inject","z":"5fbe1d5938e13f31","name":"Registers","props":[{"p":"topic","vt":"str"},{"p":"fc","v":"3","vt":"num"},{"p":"unitid","v":"1","vt":"num"},{"p":"address","v":"9","vt":"str"},{"p":"quantity","v":"20","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"registers","x":100,"y":220,"wires":[["5bcec1453074b2c6"]]},{"id":"8dd9a2e19a45ae7a","type":"inject","z":"5fbe1d5938e13f31","name":"Coils","props":[{"p":"topic","vt":"str"},{"p":"fc","v":"1","vt":"num"},{"p":"unitid","v":"1","vt":"num"},{"p":"address","v":"0","vt":"num"},{"p":"quantity","v":"1","vt":"num"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"coils","x":120,"y":180,"wires":[["5bcec1453074b2c6"]]},{"id":"c425a4f4.8a8e48","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":220,"wires":[["c507a2c0315f76ac","56c4218a20e857dc","ff088bad8001d4ae"]]},{"id":"8b34bd3d246c47d8","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":300,"wires":[["01487d130de2e9aa"]]},{"id":"d2e937083b3dcd2d","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":340,"wires":[["67047bdc1ba515ab"]]},{"id":"96e67c043291af4f","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":380,"wires":[["04f4ddf6743385d2"]]},{"id":"ea7da5d1bf2272d0","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":420,"wires":[["716bee05284139fe"]]},{"id":"0f3fc0baf7b31fe2","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":460,"wires":[["670d9eeb1ee97ead"]]},{"id":"39233acfa122cdb7","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":500,"wires":[["454dc76ec717c7b1"]]},{"id":"4ad55e8c30fd0cec","type":"buffer-parser","z":"5fbe1d5938e13f31","name":"","data":"payload","dataType":"msg","specification":"{\"options\":{\"byteSwap\":[\"swap16\"],\"singleResult\":true,\"resultType\":\"object\"},\"items\":[{\"name\":\"ppm\",\"type\":\"floatle\",\"offset\":0},{\"name\":\"temp\",\"type\":\"floatle\",\"offset\":4}]}","specificationType":"ui","items":[{"type":"floatle","name":"item2","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"value","resultTypeType":"","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":810,"y":540,"wires":[["17101470c4f90d21"]]},{"id":"04f4ddf6743385d2","type":"ui_artlessgauge","z":"5fbe1d5938e13f31","group":"162f3525ef9d6968","order":20,"width":9,"height":1,"name":"","icon":"","label":"Stack Temp","unit":"DegC","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":350,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":1000,"y":380,"wires":[]},{"id":"716bee05284139fe","type":"ui_artlessgauge","z":"5fbe1d5938e13f31","group":"162f3525ef9d6968","order":17,"width":9,"height":1,"name":"","icon":"","label":"Steam Temp","unit":"DegC","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":350,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":1000,"y":420,"wires":[]},{"id":"670d9eeb1ee97ead","type":"ui_artlessgauge","z":"5fbe1d5938e13f31","group":"162f3525ef9d6968","order":23,"width":9,"height":1,"name":"","icon":"","label":"Feed-water Temp","unit":"DegC","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":101,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":1000,"y":460,"wires":[]},{"id":"454dc76ec717c7b1","type":"ui_artlessgauge","z":"5fbe1d5938e13f31","group":"162f3525ef9d6968","order":19,"width":8,"height":1,"name":"","icon":"","label":"Feed-Air Temp","unit":"DegC","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":100,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":1000,"y":500,"wires":[]},{"id":"67047bdc1ba515ab","type":"ui_artlessgauge","z":"5fbe1d5938e13f31","group":"162f3525ef9d6968","order":16,"width":8,"height":1,"name":"","icon":"","label":"O2 Level","unit":"%","layout":"linear","decimals":"1","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":21,"col":"#ff9900","t":"max","dot":0}],"lineWidth":"3","bgcolorFromTheme":true,"diffCenter":"","x":1000,"y":340,"wires":[]},{"id":"708caad178b0e48d","type":"ui_led","z":"5fbe1d5938e13f31","order":2,"group":"162f3525ef9d6968","width":2,"height":1,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#66ff00","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":80,"wires":[]},{"id":"3d8efe33d5b09962","type":"function","z":"5fbe1d5938e13f31","name":"Director","func":"if(msg.topic == \"coils\"){\n    return([msg,null]);\n}\nif(msg.topic == \"registers\"){\n    return([null,msg]);\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":200,"wires":[["9060a2375c0cc3a4"],["63335c8da171ae96","ba70132618c70c55","f51b047bb0e567d2","e5bd780490240a4d","47ec676f396887b5","21d8189a0d64bd80","2046031e16664b87","61df1f9b68e14bf3"]]},{"id":"162f3525ef9d6968","type":"ui_group","name":"BOILER METRICS","tab":"ff797a996c4abbeb","order":1,"disp":true,"width":18,"collapse":false,"className":""},{"id":"389a6ccea37b0cff","type":"modbus-client","name":"server","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":false,"tcpHost":"192.168.4.132","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true},{"id":"ff797a996c4abbeb","type":"ui_tab","name":"BOILER -4T","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

All your calls are in your inject nodes now and the flex-getter has it's queue setup. Both of those were missing in your last flows you posted. Assuming the rest of the MODBUS stuff is setup correctly, you should get periodic updates every five seconds.

Let me know if you have any other issues with this.

Hi Matt,
The issue remains the same...inject nodes don't seem to work , had to use a function node instead.

Weird. But I guess if you got it working, that's the important thing. Has it dropped out on you at all with your latest revision?

Ya , seems strange to me as well. Anyways, have kept project under observation , lets see how it performs..

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