Hi all, I have encountered a problem:
I am using three modbus-flex-getter nodes at the same time to read data from 3 different devices from the same serial port at a frequency of 0.1 seconds, and after deployment, the process becomes laggy. I would like to know what the problem is and how to solve it.
The diagram below shows my process:
[
{
"id": "3e987dc6d6d73636",
"type": "tab",
"label": "流程 3",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e5e13d017f01057c",
"type": "inject",
"z": "3e987dc6d6d73636",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": "0.05",
"topic": "",
"payload": "",
"payloadType": "str",
"x": 250,
"y": 320,
"wires": [
[
"463a9587d1797c24"
]
]
},
{
"id": "463a9587d1797c24",
"type": "function",
"z": "3e987dc6d6d73636",
"name": "FC4 3 0 [2]",
"func": "msg.payload = { \n 'fc': 4, \n 'unitid': 3, \n 'address': 0 , \n 'quantity': 2 \n}; \n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 320,
"wires": [
[
"43a3e6b0214a4b25"
]
]
},
{
"id": "43a3e6b0214a4b25",
"type": "modbus-flex-getter",
"z": "3e987dc6d6d73636",
"name": "ttySTM2",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "3ab6da8a17d3a981",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 620,
"y": 320,
"wires": [
[],
[
"b03af3575de1a54f"
]
]
},
{
"id": "b03af3575de1a54f",
"type": "modbus-response",
"z": "3e987dc6d6d73636",
"name": "",
"registerShowMax": 20,
"x": 850,
"y": 320,
"wires": []
},
{
"id": "53bdad0500db19f9",
"type": "comment",
"z": "3e987dc6d6d73636",
"name": "温湿度传感器",
"info": "",
"x": 450,
"y": 280,
"wires": []
},
{
"id": "fc86a2b0533e6d19",
"type": "function",
"z": "3e987dc6d6d73636",
"name": "FC4 4 0 [2]",
"func": "msg.payload = { \n 'fc': 4, \n 'unitid': 4, \n 'address': 0 , \n 'quantity': 2 \n}; \n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 460,
"wires": [
[
"f0e9982088f1d852"
]
]
},
{
"id": "f0e9982088f1d852",
"type": "modbus-flex-getter",
"z": "3e987dc6d6d73636",
"name": "ttySTM2",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "3ab6da8a17d3a981",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 620,
"y": 460,
"wires": [
[],
[
"b467c4e706a78da2"
]
]
},
{
"id": "b467c4e706a78da2",
"type": "modbus-response",
"z": "3e987dc6d6d73636",
"name": "",
"registerShowMax": 20,
"x": 850,
"y": 460,
"wires": []
},
{
"id": "bb4c4d704c5cbeae",
"type": "comment",
"z": "3e987dc6d6d73636",
"name": "模拟量采集",
"info": "",
"x": 440,
"y": 420,
"wires": []
},
{
"id": "00dbe25ee763ad4e",
"type": "inject",
"z": "3e987dc6d6d73636",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": "0.15",
"topic": "",
"payload": "",
"payloadType": "str",
"x": 250,
"y": 460,
"wires": [
[
"fc86a2b0533e6d19"
]
]
},
{
"id": "7ab3348e9315ba85",
"type": "function",
"z": "3e987dc6d6d73636",
"name": "FC4 2 0 [2]",
"func": "msg.payload = { \n 'fc': 4, \n 'unitid': 2, \n 'address': 0 , \n 'quantity': 2 \n}; \n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 180,
"wires": [
[
"12df0b7b154ea451"
]
]
},
{
"id": "12df0b7b154ea451",
"type": "modbus-flex-getter",
"z": "3e987dc6d6d73636",
"name": "ttySTM2",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "3ab6da8a17d3a981",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 620,
"y": 180,
"wires": [
[],
[
"1c28970b72d7d695"
]
]
},
{
"id": "1c28970b72d7d695",
"type": "modbus-response",
"z": "3e987dc6d6d73636",
"name": "",
"registerShowMax": 20,
"x": 850,
"y": 180,
"wires": []
},
{
"id": "c831de9579c475d7",
"type": "comment",
"z": "3e987dc6d6d73636",
"name": "数字量输入",
"info": "",
"x": 440,
"y": 140,
"wires": []
},
{
"id": "345a608dc35d47ee",
"type": "inject",
"z": "3e987dc6d6d73636",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 250,
"y": 180,
"wires": [
[
"7ab3348e9315ba85"
]
]
},
{
"id": "3ab6da8a17d3a981",
"type": "modbus-client",
"name": "",
"clienttype": "simpleser",
"bufferCommands": false,
"stateLogEnabled": false,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "127.0.0.1",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttySTM2",
"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
}
]
I need your help. Thank you all so much!