I'm working on getting data from 10 devices (which will be more than that later) every 15 minutes through the Modbus. After the initial injection, the data from Unit 1 to Unit 10 is received until 2 repetitions, but from the 3rd repetition, only the data for Unit 1 is output.
The code below is a flow using Modbus-flex-sequencer and a flow using Modbus-flex-Getter.
I wonder why if I repeat the subject, I only get the data for 1 device.
[
{
"id": "daa46ed480a8f68d",
"type": "inject",
"z": "53c7c787661b774e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "*/5 0-23 * * *",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 150,
"y": 280,
"wires": [
[
"b628e8293337ea17"
]
]
},
{
"id": "b628e8293337ea17",
"type": "modbus-flex-sequencer",
"z": "53c7c787661b774e",
"name": "",
"sequences": [
{
"name": "1",
"unitid": "1",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "2",
"unitid": "2",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "3",
"unitid": "3",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "4",
"unitid": "4",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "5",
"unitid": "5",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "6",
"unitid": "6",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "7",
"unitid": "7",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "8",
"unitid": "8",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "9",
"unitid": "9",
"fc": "FC4",
"address": "0",
"quantity": "44"
},
{
"name": "10",
"unitid": "10",
"fc": "FC4",
"address": "0",
"quantity": "44"
}
],
"server": "fd93d7ae22777e95",
"showStatusActivities": false,
"showErrors": false,
"showWarnings": true,
"logIOActivities": false,
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"delayOnStart": false,
"startDelayTime": "100",
"x": 380,
"y": 280,
"wires": [
[
"09bc7395f5bb11d3"
],
[]
],
"info": "Server ์ธํ
์์ Timeout(ms)์ด 1000์ผ๋ก ์ค์ ์ ์ ๋ ฅ๋๊ณ ํต์ ์ด 5~6๊ฐ ํต์ ์ timeout ์๋ฌ ๋ฐ์\r\nTimeout(ms)๋ฅผ 2000์ผ๋ก ์ธํ
กํ๊ณ ์ํ์ ํ์ฌ 10๋ ๊น์ง timeout ์๋ฌ ์์ด\r\n"
},
{
"id": "09bc7395f5bb11d3",
"type": "debug",
"z": "53c7c787661b774e",
"name": "debug 169",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 690,
"y": 180,
"wires": []
},
{
"id": "fd93d7ae22777e95",
"type": "modbus-client",
"name": "",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "192.168.0.109",
"tcpPort": "502",
"tcpType": "TCP-RTU-BUFFERED",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "0",
"commandDelay": "1",
"clientTimeout": "2000",
"reconnectOnTimeout": false,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": true,
"showErrors": false,
"showWarnings": true,
"showLogs": true
}
]
[
{
"id": "5d8fa1f26dbc0a26",
"type": "inject",
"z": "99b5bb1559959461",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "*/10 0-23 * * *",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 170,
"y": 180,
"wires": [
[
"82c7aebc13d89b4c",
"d8c76d528ba7d452",
"70645c6321e93714",
"2737ca8693c47c40",
"a7d6d8adfe6beb67",
"7d1fdf5b72b0760e",
"c9c4cf9a741b6515",
"4aa1c7b43221b4a5",
"737fd484e074b5ce",
"d0a9f8f013203f06"
]
]
},
{
"id": "176dec93eca7940c",
"type": "debug",
"z": "99b5bb1559959461",
"name": "debug 175",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 820,
"y": 240,
"wires": []
},
{
"id": "d0a9f8f013203f06",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 10",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':10,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 440,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "82c7aebc13d89b4c",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 1",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid': 1,\n 'address': 0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 80,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "70645c6321e93714",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 3",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':3,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 160,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "2737ca8693c47c40",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 4",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':4,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 200,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "a7d6d8adfe6beb67",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 5",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':5,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 240,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "7d1fdf5b72b0760e",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 6",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':6,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 280,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "c9c4cf9a741b6515",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 7",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':7,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 320,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "4aa1c7b43221b4a5",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 8",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':8,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 360,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "737fd484e074b5ce",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 9",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':9,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 400,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "d8c76d528ba7d452",
"type": "function",
"z": "99b5bb1559959461",
"name": "unit 2 ",
"func": "msg.payload = {\n value: msg.payload,\n 'fc': 4,\n 'unitid':2,\n 'address':0,\n 'quantity': 44\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 120,
"wires": [
[
"defff319e2abe8ea"
]
]
},
{
"id": "defff319e2abe8ea",
"type": "modbus-flex-getter",
"z": "99b5bb1559959461",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"showWarnings": true,
"logIOActivities": false,
"server": "7745f4a9e5d503ef",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"delayOnStart": false,
"startDelayTime": "",
"x": 590,
"y": 240,
"wires": [
[
"176dec93eca7940c"
],
[]
]
},
{
"id": "7745f4a9e5d503ef",
"type": "modbus-client",
"name": "",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": true,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "192.168.0.109",
"tcpPort": "502",
"tcpType": "TCP-RTU-BUFFERED",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "5000",
"reconnectOnTimeout": false,
"reconnectTimeout": "5000",
"parallelUnitIdsAllowed": true,
"showErrors": true,
"showWarnings": true,
"showLogs": true
}
]