Errors in MODBUS RTU communication

Check this Flow ..

  1. replaced the Getter with Flex Getters .. they seem to be more stable
  2. enabled empty msg on fail .. so the chain is not broken and added error checking so buffer-parcer doesnt get a failed msg
  3. tweaked your timeout values and pre-delay .. that was way to high (2000)
    (you were sending msgs every 5 seconds and the pre-delay was 2s and the timeout .. by the time all these settings do their thing a new trigger msg arrived and the queue was all clattered)
[{"id":"0aaa4ff937aa50ed","type":"buffer-parser","z":"54efb553244c241f","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"MB30124","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"MB30136","offset":28,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":610,"y":3780,"wires":[["32c45a7cea26e585"]]},{"id":"32c45a7cea26e585","type":"function","z":"54efb553244c241f","name":"","func":"msg.payload = [\n    [{\n        DewPoint: msg.payload[0]\n    },\n    {\n        MeasType:\"actual\",\n        EquipNumber:\"301\"\n    }],\n    [{\n        DewPoint: msg.payload[1]\n    },\n    {\n        MeasType:\"setpoint\",\n        EquipNumber:\"301\"\n    }]\n];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":3780,"wires":[["697c681cb0e03635"]]},{"id":"c375555cb709af44","type":"mqtt out","z":"54efb553244c241f","name":"","topic":"Generator301/dewpoint/actual","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"518d2b1ee44c4692","x":1210,"y":3780,"wires":[]},{"id":"697c681cb0e03635","type":"change","z":"54efb553244c241f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0][0].DewPoint","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":3780,"wires":[["c375555cb709af44","64ea030b555c6d30"]]},{"id":"64ea030b555c6d30","type":"debug","z":"54efb553244c241f","name":"#301","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1130,"y":3740,"wires":[]},{"id":"2e0ec6b343c61ad8","type":"buffer-parser","z":"54efb553244c241f","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"MB30124","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"MB30136","offset":30,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":610,"y":3940,"wires":[["ef0bc6f6d894ea76"]]},{"id":"ef0bc6f6d894ea76","type":"function","z":"54efb553244c241f","name":"","func":"msg.payload = [\n    [{\n        DewPoint: msg.payload[0]\n    },\n    {\n        MeasType:\"actual\",\n        EquipNumber:\"303\"\n    }],\n    [{\n        DewPoint: msg.payload[1]\n    },\n    {\n        MeasType:\"setpoint\",\n        EquipNumber:\"303\"\n    }]\n];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":3940,"wires":[["8f60741eb5529cd8"]]},{"id":"8f60741eb5529cd8","type":"change","z":"54efb553244c241f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0][0].DewPoint","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":3940,"wires":[["aa5b586f57efa74d","67a6c9d0972a9335"]]},{"id":"aa5b586f57efa74d","type":"mqtt out","z":"54efb553244c241f","name":"","topic":"Generator303/dewpoint/actual","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"518d2b1ee44c4692","x":1210,"y":3940,"wires":[]},{"id":"67a6c9d0972a9335","type":"debug","z":"54efb553244c241f","name":"#303","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1110,"y":3900,"wires":[]},{"id":"f5120a835722d1a5","type":"buffer-parser","z":"54efb553244c241f","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"MB30124","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"int16be","name":"MB30136","offset":28,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":610,"y":4120,"wires":[["18d574521c602843"]]},{"id":"18d574521c602843","type":"function","z":"54efb553244c241f","name":"","func":"msg.payload = [\n    [{\n        DewPoint: msg.payload[0]\n    },\n    {\n        MeasType:\"actual\",\n        EquipNumber:\"305\"\n    }],\n    [{\n        DewPoint: msg.payload[1]\n    },\n    {\n        MeasType:\"setpoint\",\n        EquipNumber:\"305\"\n    }]\n];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":4120,"wires":[["bb26947af7abb9cc"]]},{"id":"bb26947af7abb9cc","type":"change","z":"54efb553244c241f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0][0].DewPoint","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":4120,"wires":[["a4cff2e16dac1993","7482504ccd973296"]]},{"id":"a4cff2e16dac1993","type":"mqtt out","z":"54efb553244c241f","name":"","topic":"Generator305/dewpoint/actual","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"518d2b1ee44c4692","x":1210,"y":4120,"wires":[]},{"id":"7482504ccd973296","type":"debug","z":"54efb553244c241f","name":"#305","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1110,"y":4080,"wires":[]},{"id":"3fdd911012ee99a7","type":"modbus-flex-getter","z":"54efb553244c241f","name":"#301 Dew Point","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"fc8c6b99462d5d50","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":false,"x":260,"y":3780,"wires":[["79e759c0e36079e0"],[]]},{"id":"c887ef2ecfe3f83b","type":"modbus-flex-getter","z":"54efb553244c241f","name":"#303 Dew Point","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"fc8c6b99462d5d50","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":false,"x":260,"y":3940,"wires":[["6d975f494f6b5766"],[]]},{"id":"24a56188855fb52f","type":"modbus-flex-getter","z":"54efb553244c241f","name":"#305 Dew Point","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"fc8c6b99462d5d50","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":false,"x":260,"y":4120,"wires":[["327fca40293f38f1"],[]]},{"id":"5b1833bab50720ba","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":3680,"wires":[["8568325dac8def16"]]},{"id":"8568325dac8def16","type":"function","z":"54efb553244c241f","name":"","func":"msg.topic = \"301\"\n\nmsg.payload = {\n    value: msg.payload,\n    'fc': 4,\n    'unitid': 11,\n    'address': 123,\n    'quantity': 15\n}\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":145,"y":3780,"wires":[["3fdd911012ee99a7"]],"l":false},{"id":"62979849be1ce00f","type":"function","z":"54efb553244c241f","name":"","func":"msg.topic = \"303\"\n\nmsg.payload = { \n    value: msg.payload, \n    'fc': 4, \n    'unitid': 2, \n    'address': 122, \n    'quantity': 16\n} \n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":145,"y":3940,"wires":[["c887ef2ecfe3f83b"]],"l":false},{"id":"79e759c0e36079e0","type":"function","z":"54efb553244c241f","name":"error","func":"\nif (msg.payload == \"\" || msg.hasOwnProperty('error')) {\n\n    node.status({ fill: \"red\", shape: \"ring\", text: `Error` });\n\n    return [null, msg]\n}\n\nelse {\n\n    return [msg, null];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":3780,"wires":[["0aaa4ff937aa50ed"],["62979849be1ce00f"]]},{"id":"6d975f494f6b5766","type":"function","z":"54efb553244c241f","name":"error","func":"\nif (msg.payload == \"\" || msg.hasOwnProperty('error')) {\n\n    node.status({ fill: \"red\", shape: \"ring\", text: `Error` });\n\n    return [null, msg]\n}\n\nelse {\n\n    return [msg, null];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":3940,"wires":[["2e0ec6b343c61ad8"],["285fa2f6233ce96a"]]},{"id":"327fca40293f38f1","type":"function","z":"54efb553244c241f","name":"error","func":"\nif (msg.payload == \"\" || msg.hasOwnProperty('error')) {\n\n    node.status({ fill: \"red\", shape: \"ring\", text: `Error` });\n\n    return [null, msg]\n}\n\nelse {\n\n    return [msg, null];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":4120,"wires":[["f5120a835722d1a5"],[]]},{"id":"285fa2f6233ce96a","type":"function","z":"54efb553244c241f","name":"","func":"msg.topic = \"305\"\n\nmsg.payload = { \n    value: msg.payload, \n    'fc': 4, \n    'unitid': 5, \n    'address': 123, \n    'quantity': 16 \n} \n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":145,"y":4120,"wires":[["24a56188855fb52f"]],"l":false},{"id":"518d2b1ee44c4692","type":"mqtt-broker","name":"","broker":"192.168.10.25","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"fc8c6b99462d5d50","type":"modbus-client","name":"serial_to_USB","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":true,"failureLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttySer0","serialType":"RTU-BUFFERD","serialBaudrate":"19200","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"","unit_id":"","commandDelay":"50","clientTimeout":"200","reconnectOnTimeout":true,"reconnectTimeout":"1000","parallelUnitIdsAllowed":false}]