Hello
Somehow I can't get to the solution.
Is intended for an IO-Link Device with two analog out.
I have two sliders for entering the target output value, adding folders to 16bit Value Topic, merging them into one number, and now I want to transfer this to the master with an http request, but how do I pass the new value to the sliders?
I'm grateful for any help.
Philipp
[
{
"id": "b7bcc2fa2dfe4f77",
"type": "tab",
"label": "Flow 3",
"disabled": false,
"info": "",
"env": []
},
{
"id": "e859f84d5936504a",
"type": "ui_slider",
"z": "b7bcc2fa2dfe4f77",
"name": "",
"label": "slider-1",
"tooltip": "",
"group": "14b5f743f8a10343",
"order": 0,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "dpOut1",
"topicType": "msg",
"min": 0,
"max": "650",
"step": "5",
"className": "",
"x": 80,
"y": 120,
"wires": [
[
"0f693393d958ab90"
]
]
},
{
"id": "f120df8155d96e93",
"type": "ui_slider",
"z": "b7bcc2fa2dfe4f77",
"name": "",
"label": "slider-2",
"tooltip": "",
"group": "14b5f743f8a10343",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "dpOut2",
"topicType": "msg",
"min": 0,
"max": "650",
"step": "5",
"className": "",
"x": 80,
"y": 320,
"wires": [
[
"d06e3ed5730e0b2d"
]
]
},
{
"id": "0f693393d958ab90",
"type": "range",
"z": "b7bcc2fa2dfe4f77",
"minin": "0",
"maxin": "650",
"minout": "0",
"maxout": "1000",
"action": "scale",
"round": true,
"property": "payload",
"name": "",
"x": 240,
"y": 120,
"wires": [
[
"c178d3a7ab805aab"
]
]
},
{
"id": "d06e3ed5730e0b2d",
"type": "range",
"z": "b7bcc2fa2dfe4f77",
"minin": "0",
"maxin": "650",
"minout": "0",
"maxout": "1000",
"action": "scale",
"round": true,
"property": "payload",
"name": "",
"x": 240,
"y": 320,
"wires": [
[
"460fabb846b4f234"
]
]
},
{
"id": "c178d3a7ab805aab",
"type": "function",
"z": "b7bcc2fa2dfe4f77",
"name": "topic pdOut1",
"func": "msg.topic=\"pdOut1\";\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 120,
"wires": [
[
"77837895ff6fd0eb"
]
]
},
{
"id": "460fabb846b4f234",
"type": "function",
"z": "b7bcc2fa2dfe4f77",
"name": "topic pdOut2",
"func": "msg.topic=\"pdOut2\";\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 320,
"wires": [
[
"77837895ff6fd0eb"
]
]
},
{
"id": "77837895ff6fd0eb",
"type": "join",
"z": "b7bcc2fa2dfe4f77",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"useparts": false,
"accumulate": true,
"timeout": "5",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 630,
"y": 220,
"wires": [
[
"40844efd97a74e3d",
"e9b1509ea10b06e8"
]
]
},
{
"id": "40844efd97a74e3d",
"type": "debug",
"z": "b7bcc2fa2dfe4f77",
"name": "join",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 160,
"wires": []
},
{
"id": "e9b1509ea10b06e8",
"type": "function",
"z": "b7bcc2fa2dfe4f77",
"name": "pdOut",
"func": "var pdOut1= msg.payload.pdOut1;\nvar pdOut2= msg.payload.pdOut2;\nvar pdOut = (pdOut1 <<16) +pdOut2;\nmsg.payload.pdOut = pdOut;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 240,
"wires": [
[
"8dcc58553722529f",
"28a33b22eed6dd38"
]
]
},
{
"id": "8dcc58553722529f",
"type": "debug",
"z": "b7bcc2fa2dfe4f77",
"name": "pdOut",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1010,
"y": 160,
"wires": []
},
{
"id": "28a33b22eed6dd38",
"type": "function",
"z": "b7bcc2fa2dfe4f77",
"name": "function 7",
"func": "var value = msg.payload.pdOut\nmsg.payload = { \n code: \"request\", \n cid: \"4\", \n adr: \"/iolinkmaster/port[1]/iolinkdevice/pdout/setdata\",\n data: \"value\"\n};\n\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1000,
"y": 260,
"wires": [
[
"0536f0a37e7a55b5",
"3f89874dadd793c3"
]
]
},
{
"id": "0536f0a37e7a55b5",
"type": "http request",
"z": "b7bcc2fa2dfe4f77",
"name": "",
"method": "POST",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://169.254.12.28/",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 1010,
"y": 340,
"wires": [
[
"d502c1a4387fc232"
]
]
},
{
"id": "d502c1a4387fc232",
"type": "debug",
"z": "b7bcc2fa2dfe4f77",
"name": "debug 28",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1180,
"y": 340,
"wires": []
},
{
"id": "3f89874dadd793c3",
"type": "debug",
"z": "b7bcc2fa2dfe4f77",
"name": "debug 29",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1200,
"y": 260,
"wires": []
},
{
"id": "14b5f743f8a10343",
"type": "ui_group",
"name": "Test",
"tab": "260eb08ed6b9a3a0",
"order": 1,
"disp": true,
"width": 6,
"collapse": false,
"className": ""
},
{
"id": "260eb08ed6b9a3a0",
"type": "ui_tab",
"name": "Test",
"icon": "dashboard",
"disabled": false,
"hidden": false
},
{
"id": "2ffba28f5d9dbbb5",
"type": "global-config",
"env": [],
"modules": {
"node-red-dashboard": "3.6.6"
}
}
]