[
{
"id": "6565a887b9e27bb2",
"type": "tab",
"label": "Flow 3",
"disabled": false,
"info": ""
},
{
"id": "eea9b78c503b9a85",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "Filename generator",
"func": "// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? "0" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? "0" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? "0" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = "maplin_"+ dd + mm + yyyy + ".csv";\n// Full filename with path for the file node later\nmsg.filename = "/home/pi/datalog/"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {"pattern":msg.fname};\n\nnode.status({fill:"blue",shape:"ring",text:msg.fname});\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 170,
"y": 200,
"wires": [
[
"66e04245bd7f5aca"
]
]
},
{
"id": "66e04245bd7f5aca",
"type": "fs-file-lister",
"z": "6565a887b9e27bb2",
"name": "",
"start": "/home/pi/datalog/",
"pattern": "",
"folders": "*",
"hidden": true,
"lstype": "files",
"path": true,
"single": true,
"depth": 0,
"stat": true,
"showWarnings": false,
"x": 360,
"y": 200,
"wires": [
[
"fa429e0ed8d04381",
"e40cf8a373ca74f0"
]
]
},
{
"id": "fa429e0ed8d04381",
"type": "debug",
"z": "6565a887b9e27bb2",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 530,
"y": 100,
"wires":
},
{
"id": "e40cf8a373ca74f0",
"type": "switch",
"z": "6565a887b9e27bb2",
"name": "",
"property": "$count(msg.payload)",
"propertyType": "jsonata",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 200,
"wires": [
[
"e8daeb3af7220a1b"
],
[
"5ed750fb056c5df3"
]
]
},
{
"id": "fe9d77b4f7c5e330",
"type": "csv",
"z": "6565a887b9e27bb2",
"name": "",
"sep": ",",
"hdrin": false,
"hdrout": "all",
"multi": "one",
"ret": "\n",
"temp": "timestamp,temperature,humidity",
"skip": "0",
"strings": true,
"include_empty_strings": false,
"include_null_values": false,
"x": 850,
"y": 180,
"wires": [
[
"d426858ecf042060"
]
]
},
{
"id": "d426858ecf042060",
"type": "file",
"z": "6565a887b9e27bb2",
"name": "",
"filename": "",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1010,
"y": 180,
"wires": [
]
},
{
"id": "8b34b7f277503825",
"type": "csv",
"z": "6565a887b9e27bb2",
"name": "",
"sep": ",",
"hdrin": "",
"hdrout": "none",
"multi": "one",
"ret": "\n",
"temp": "timestamp,temperature,humidity",
"skip": "0",
"strings": true,
"x": 850,
"y": 220,
"wires": [
[
"d426858ecf042060"
]
]
},
{
"id": "e8daeb3af7220a1b",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "Get file content",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "filecontent",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 180,
"wires": [
[
"fe9d77b4f7c5e330"
]
]
},
{
"id": "5ed750fb056c5df3",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "Get file content",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "filecontent",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 220,
"wires": [
[
"8b34b7f277503825"
]
]
},
{
"id": "2d077b4796ad0818",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "Set data",
"func": "var now = new Date();\n\nmsg.payload = {\n "timestamp" : now.toLocaleTimeString(),\n "temperature" : msg.FLOW,\n "humidity" : msg.LEVEL\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 160,
"y": 300,
"wires": [
[
"eea9b78c503b9a85"
]
]
},
{
"id": "c1ec9682493b9ef2",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 280,
"y": 460,
"wires": [
[
"1b23fcc0de424eb8"
]
]
},
{
"id": "1b23fcc0de424eb8",
"type": "modbus-flex-getter",
"z": "6565a887b9e27bb2",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "8c89c617315aba69",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 470,
"y": 460,
"wires": [
[
"f75070de6ebc675b",
"81b46f9f4174485c"
],
]
},
{
"id": "3c8c211e96686b93",
"type": "inject",
"z": "6565a887b9e27bb2",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": false,
"onceDelay": "60",
"topic": "",
"payloadType": "date",
"x": 110,
"y": 460,
"wires": [
[
"c1ec9682493b9ef2"
]
],
"info": "ACC Automation Sample Code"
},
{
"id": "f75070de6ebc675b",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = [msg.payload[4],msg.payload[3]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 680,
"y": 460,
"wires": [
[
"55b2640dc330c397"
]
]
},
{
"id": "55b2640dc330c397",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "FLOW",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 460,
"wires": [
[
"2d077b4796ad0818"
]
]
},
{
"id": "81b46f9f4174485c",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = [msg.payload[24],msg.payload[23]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 680,
"y": 500,
"wires": [
[
"e29b9b4f1758b92c"
]
]
},
{
"id": "e29b9b4f1758b92c",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "LEVEL",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 500,
"wires": [
[
"2d077b4796ad0818"
]
]
},
{
"id": "8c89c617315aba69",
"type": "modbus-client",
"name": "LOCATION_2",
"clienttype": "tcp",
"bufferCommands": false,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "103.62.95.175",
"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": "0",
"clientTimeout": "1000",
"reconnectOnTimeout": true,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": false
}
]
Please edit your post and put the code between backticks:
```
your code
```
or use the code icon in the text editor:

thanks for reply . Please check my flow file code:
[
{
"id": "6565a887b9e27bb2",
"type": "tab",
"label": "Flow 3",
"disabled": false,
"info": ""
},
{
"id": "eea9b78c503b9a85",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "Filename generator",
"func": "// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = \"maplin_\"+ dd + mm + yyyy + \".csv\";\n// Full filename with path for the file node later\nmsg.filename = \"/home/pi/datalog/\"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {\"pattern\":msg.fname};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.fname});\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 170,
"y": 200,
"wires": [
[
"66e04245bd7f5aca"
]
]
},
{
"id": "66e04245bd7f5aca",
"type": "fs-file-lister",
"z": "6565a887b9e27bb2",
"name": "",
"start": "/home/pi/datalog/",
"pattern": "",
"folders": "*",
"hidden": true,
"lstype": "files",
"path": true,
"single": true,
"depth": 0,
"stat": true,
"showWarnings": false,
"x": 360,
"y": 200,
"wires": [
[
"fa429e0ed8d04381",
"e40cf8a373ca74f0"
]
]
},
{
"id": "fa429e0ed8d04381",
"type": "debug",
"z": "6565a887b9e27bb2",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 530,
"y": 100,
"wires": []
},
{
"id": "e40cf8a373ca74f0",
"type": "switch",
"z": "6565a887b9e27bb2",
"name": "",
"property": "$count(msg.payload)",
"propertyType": "jsonata",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 200,
"wires": [
[
"e8daeb3af7220a1b"
],
[
"5ed750fb056c5df3"
]
]
},
{
"id": "fe9d77b4f7c5e330",
"type": "csv",
"z": "6565a887b9e27bb2",
"name": "",
"sep": ",",
"hdrin": false,
"hdrout": "all",
"multi": "one",
"ret": "\\n",
"temp": "timestamp,temperature,humidity",
"skip": "0",
"strings": true,
"include_empty_strings": false,
"include_null_values": false,
"x": 850,
"y": 180,
"wires": [
[
"d426858ecf042060"
]
]
},
{
"id": "d426858ecf042060",
"type": "file",
"z": "6565a887b9e27bb2",
"name": "",
"filename": "",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1010,
"y": 180,
"wires": [
[]
]
},
{
"id": "8b34b7f277503825",
"type": "csv",
"z": "6565a887b9e27bb2",
"name": "",
"sep": ",",
"hdrin": "",
"hdrout": "none",
"multi": "one",
"ret": "\\n",
"temp": "timestamp,temperature,humidity",
"skip": "0",
"strings": true,
"x": 850,
"y": 220,
"wires": [
[
"d426858ecf042060"
]
]
},
{
"id": "e8daeb3af7220a1b",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "Get file content",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "filecontent",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 180,
"wires": [
[
"fe9d77b4f7c5e330"
]
]
},
{
"id": "5ed750fb056c5df3",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "Get file content",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "filecontent",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 220,
"wires": [
[
"8b34b7f277503825"
]
]
},
{
"id": "2d077b4796ad0818",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "Set data",
"func": "var now = new Date();\n\nmsg.payload = {\n \"timestamp\" : now.toLocaleTimeString(),\n \"temperature\" : msg.FLOW,\n \"humidity\" : msg.LEVEL\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 160,
"y": 300,
"wires": [
[
"eea9b78c503b9a85"
]
]
},
{
"id": "c1ec9682493b9ef2",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 280,
"y": 460,
"wires": [
[
"1b23fcc0de424eb8"
]
]
},
{
"id": "1b23fcc0de424eb8",
"type": "modbus-flex-getter",
"z": "6565a887b9e27bb2",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "8c89c617315aba69",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 470,
"y": 460,
"wires": [
[
"f75070de6ebc675b",
"81b46f9f4174485c"
],
[]
]
},
{
"id": "3c8c211e96686b93",
"type": "inject",
"z": "6565a887b9e27bb2",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": false,
"onceDelay": "60",
"topic": "",
"payloadType": "date",
"x": 110,
"y": 460,
"wires": [
[
"c1ec9682493b9ef2"
]
],
"info": "ACC Automation Sample Code"
},
{
"id": "f75070de6ebc675b",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = [msg.payload[4],msg.payload[3]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 460,
"wires": [
[
"55b2640dc330c397"
]
]
},
{
"id": "55b2640dc330c397",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "FLOW",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 460,
"wires": [
[
"2d077b4796ad0818"
]
]
},
{
"id": "81b46f9f4174485c",
"type": "function",
"z": "6565a887b9e27bb2",
"name": "",
"func": "msg.payload = [msg.payload[24],msg.payload[23]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 500,
"wires": [
[
"e29b9b4f1758b92c"
]
]
},
{
"id": "e29b9b4f1758b92c",
"type": "change",
"z": "6565a887b9e27bb2",
"name": "",
"rules": [
{
"t": "move",
"p": "payload",
"pt": "msg",
"to": "LEVEL",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 500,
"wires": [
[
"2d077b4796ad0818"
]
]
},
{
"id": "8c89c617315aba69",
"type": "modbus-client",
"name": "LOCATION_2",
"clienttype": "tcp",
"bufferCommands": false,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "103.62.95.175",
"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": "0",
"clientTimeout": "1000",
"reconnectOnTimeout": true,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": false
}
]
After you flex getter node you spilt the msg. so now you have two messages each writting its own line.
You would be better keeping the flow on one wire
eg.
[{"id":"2d077b4796ad0818","type":"function","z":"6565a887b9e27bb2","name":"Set data","func":"var now = new Date();\n\nmsg.payload = {\n \"timestamp\" : now.toLocaleTimeString(),\n \"temperature\" : msg.hold.one,\n \"humidity\" : msg.hold.two\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":160,"y":300,"wires":[["eea9b78c503b9a85"]]},{"id":"eea9b78c503b9a85","type":"function","z":"6565a887b9e27bb2","name":"Filename generator","func":"// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = \"maplin_\"+ dd + mm + yyyy + \".csv\";\n// Full filename with path for the file node later\nmsg.filename = \"/home/pi/datalog/\"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {\"pattern\":msg.fname};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.fname});\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":200,"wires":[["66e04245bd7f5aca"]]},{"id":"7b352222.f800d4","type":"function","z":"6565a887b9e27bb2","name":"","func":"let pay = [msg.payload[24],msg.payload[23]];\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.hold.two = buf.readFloatBE(0).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":810,"y":460,"wires":[["2d077b4796ad0818"]]},{"id":"66e04245bd7f5aca","type":"fs-file-lister","z":"6565a887b9e27bb2","name":"","start":"/home/pi/datalog/","pattern":"","folders":"*","hidden":true,"lstype":"files","path":true,"single":true,"depth":0,"stat":true,"showWarnings":false,"x":360,"y":200,"wires":[["fa429e0ed8d04381","e40cf8a373ca74f0"]]},{"id":"f75070de6ebc675b","type":"function","z":"6565a887b9e27bb2","name":"","func":"let pay = [msg.payload[4],msg.payload[3]];\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\nmsg.hold={};\nmsg.hold.one = buf.readFloatBE(0).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":460,"wires":[["7b352222.f800d4"]]},{"id":"fa429e0ed8d04381","type":"debug","z":"6565a887b9e27bb2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":530,"y":100,"wires":[]},{"id":"e40cf8a373ca74f0","type":"switch","z":"6565a887b9e27bb2","name":"","property":"$count(msg.payload)","propertyType":"jsonata","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":200,"wires":[["e8daeb3af7220a1b"],["5ed750fb056c5df3"]]},{"id":"1b23fcc0de424eb8","type":"modbus-flex-getter","z":"6565a887b9e27bb2","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"8c89c617315aba69","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":470,"y":460,"wires":[["f75070de6ebc675b"],[]]},{"id":"e8daeb3af7220a1b","type":"change","z":"6565a887b9e27bb2","name":"Get file content","rules":[{"t":"set","p":"payload","pt":"msg","to":"filecontent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":180,"wires":[["fe9d77b4f7c5e330"]]},{"id":"5ed750fb056c5df3","type":"change","z":"6565a887b9e27bb2","name":"Get file content","rules":[{"t":"set","p":"payload","pt":"msg","to":"filecontent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":220,"wires":[["8b34b7f277503825"]]},{"id":"c1ec9682493b9ef2","type":"function","z":"6565a887b9e27bb2","name":"","func":"msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":460,"wires":[["1b23fcc0de424eb8"]]},{"id":"fe9d77b4f7c5e330","type":"csv","z":"6565a887b9e27bb2","name":"","sep":",","hdrin":false,"hdrout":"all","multi":"one","ret":"\n","temp":"timestamp,temperature,humidity","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":850,"y":180,"wires":[["d426858ecf042060"]]},{"id":"8b34b7f277503825","type":"csv","z":"6565a887b9e27bb2","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\n","temp":"timestamp,temperature,humidity","skip":"0","strings":true,"x":850,"y":220,"wires":[["d426858ecf042060"]]},{"id":"3c8c211e96686b93","type":"inject","z":"6565a887b9e27bb2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":"60","topic":"","payloadType":"date","x":110,"y":460,"wires":[["c1ec9682493b9ef2"]],"info":"ACC Automation Sample Code"},{"id":"d426858ecf042060","type":"file","z":"6565a887b9e27bb2","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":1010,"y":180,"wires":[[]]}]
Untested as i do not have your data or modbus installed. You could do all the single functions in one to.
thanks a ton

