2

我的实验是根据 csv 文件中的数字更改 ui_guage。每个数字延迟 5 秒。(代码在末尾)

csv 文件的输入是多行 msg.payload,每行三个值,即

 name1, numerical1,numerical11
 name2 numerical2,numerical22,  etc

问题:仪表上的每条消息没有延迟 5 秒...它直接显示最后一列中存在的最终值(我也使用了延迟节点,但仍然...)

示例:将第 3 列数字显示为指示器,仪表上延迟 5 秒。

仪表输出:numeric22(指示器立即设置到此位置)因此,不存在所需的每条消息延迟(5 秒)。

我需要延迟。

我正在研究 IBM Cloud lite 计划,node red v1.0.6

请查看以下代码,如果回答类似问题,欢迎提供任何帮助,然后再将解决方案重定向给我。

要运行以下代码:

  1. 打开 Node-RED
  2. 点击三行(右上角)
  3. 进口
  4. 复制并粘贴以下流程 json 代码,然后单击“导入”按钮

了解更多:在 Node-RED 中导入和导出流

编码:

[
    {
        "id": "c9b43c3a.da2e4",
        "type": "ui_gauge",
        "z": "ac0d0d22.69ebb",
        "name": "",
        "group": "c604d450.9712c8",
        "order": 13,
        "width": "5",
        "height": "5",
        "gtype": "gage",
        "title": "<img height=\"50\" width=\"50\" src=\"https://upload.wikimedia.org/wikipedia/commons/b/bf/Pressure_gauge.svg\"/>",
        "label": "units",
        "format": " {{msg.payload.col3}}",
        "min": 0,
        "max": 10,
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "x": 840,
        "y": 320,
        "wires": []
    },
    {
        "id": "c604d450.9712c8",
        "type": "ui_group",
        "z": "",
        "name": "tab1",
        "tab": "c733c61c.6e4828",
        "order": 1,
        "disp": true,
        "width": "12",
        "collapse": false
    },
    {
        "id": "c733c61c.6e4828",
        "type": "ui_tab",
        "z": "",
        "name": "Home1",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

4

0 回答 0