Hi all
I would like to increment the addresses but I can't.
[
{
"id": "f4b3eb2c38e0f0f1",
"type": "inject",
"z": "cde86a8aacec4fc2",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "1",
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 110,
"y": 900,
"wires": [
[
"880181626008d60b"
]
]
},
{
"id": "880181626008d60b",
"type": "function",
"z": "cde86a8aacec4fc2",
"name": "",
"func": "for (var add = 1; add < 265; add++)\n{\n\n msg.payload={\n value:msg.payload,\n 'fc':03,\n 'unitid':2,\n 'address':add,\n 'quantity':68\n }\n return msg\n}\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 900,
"wires": [
[
"753a1011362dbd2b"
]
]
},
{
"id": "753a1011362dbd2b",
"type": "debug",
"z": "cde86a8aacec4fc2",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 430,
"y": 900,
"wires": []
}
]
with the code
for (var add = 1; add < 265; add++)
{
msg.payload={
value:msg.payload,
'fc':03,
'unitid':2,
'address':add,
'quantity':68
}
return msg
}
Thank you