【问题标题】:Node red write double word节点红色写双字
【发布时间】:2022-11-11 09:55:15
【问题描述】:

如何在 Node-red 中将数字转换为双字?

我试着把数组扔进去 但没有回应

我不是很擅长节点红,请回答我,谢谢

【问题讨论】:

  • Edit 显示您尝试过的问题。

标签: double node-red


【解决方案1】:

将“数字”转换为“双字”是什么意思?
数据类型“双”已经是数字类型。
你的意思是字符串到数字?

[
{
    "id": "bd8884d5c2f82322",
    "type": "tab",
    "label": "플로우 1",
    "disabled": false,
    "info": "",
    "env": []
},
{
    "id": "668cc806c978ba74",
    "type": "inject",
    "z": "bd8884d5c2f82322",
    "name": "",
    "props": [
        {
            "p": "payload"
        },
        {
            "p": "topic",
            "vt": "str"
        }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": 0.1,
    "topic": "",
    "payload": "1234",
    "payloadType": "str",
    "x": 130,
    "y": 60,
    "wires": [
        [
            "68fb16f45b84ba70",
            "9ec4c379aa81d66d"
        ]
    ]
},
{
    "id": "68fb16f45b84ba70",
    "type": "function",
    "z": "bd8884d5c2f82322",
    "name": "function 6",
    "func": "msg.payload=Number(msg.payload);
return msg;",
    "outputs": 1,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 300,
    "y": 60,
    "wires": [
        [
            "641e3379102930a3"
        ]
    ]
},
{
    "id": "641e3379102930a3",
    "type": "debug",
    "z": "bd8884d5c2f82322",
    "name": "debug 19",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "false",
    "statusVal": "",
    "statusType": "auto",
    "x": 460,
    "y": 60,
    "wires": []
},
{
    "id": "9ec4c379aa81d66d",
    "type": "debug",
    "z": "bd8884d5c2f82322",
    "name": "debug 20",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "false",
    "statusVal": "",
    "statusType": "auto",
    "x": 200,
    "y": 120,
    "wires": []
}

]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-24
    • 2014-01-13
    • 1970-01-01
    相关资源
    最近更新 更多