简介/概要
本文介绍如何配置ThingsBoard PE平台并连接KERNEL设备。ThingsBoard PE平台是一款开源IoT平台,用于数据采集、处理、可视化及设备管理。支持通过业界标准MQTT协议实现设备连接。ThingsBoard具备可扩展性、容错能力和高性能特点,确保数据不丢失。## 说明
本流程适用于所有配备以太网口的ARM微处理器的KERNEL PLC。
集成流程
步骤1 ThingsBoard:设备配置
-
[步骤1.1] 登录ThingsBoard实例。
<img src=”/images/samples/kernel/Thingsboard 000.png”width=”400”alt=”Thingsboard 1”>
-
[步骤1.2] 打开「设备Groups」页面。
<img src=”/images/samples/kernel/Thingsboard 002.png”width=”1000”alt=”Thingsboard 2”>
-
[步骤1.3] 进入默认设备组「ALL」。
<img src=”/images/samples/kernel/Thingsboard 003.png”width=”1000”alt=”Thingsboard 3”>
-
[步骤1.4] 点击表格右上角「+」图标,选择「添加设备」。
<img src=”/images/samples/kernel/Thingsboard 004.png”width=”1000”alt=”Thingsboard 4”>
-
[步骤1.4a] 输入设备名称,例如「PLC KERNEL设备」。此时无需其他修改。点击「添加」添加设备。
-
[步骤1.5] 此时设备应排在列表最前,因表格默认按创建时间排序。
<img src=”/images/samples/kernel/Thingsboard 005.png”width=”1000”alt=”Thingsboard”>
步骤2 LogiPaint配置
连接PLC KERNEL设备前需先获取设备凭证。ThingsBoard支持多种设备凭证。本指南推荐使用默认自动生成的access令牌。* [步骤2.1] 点击表格中的设备行打开设备详情。
<img src=”/images/samples/kernel/Thingsboard 006.png”width=”1000”alt=”Thingsboard 6”>
-
[步骤2.2] 点击「Copy access令牌」。令牌将复制到剪贴板。请妥善保存。
<img src=”/images/samples/kernel/Thingsboard 007.png”width=”1000”alt=”Thingsboard 7”>
-
[步骤2.3] 打开「LogicPaint」。
<img src=”/images/samples/kernel/LogicPaint 000.jpg”width=”1000”alt=”LogicPaint 0”>
-
[步骤2.4] 通过串口将PLC KERNEL连接到PC。
-
[步骤2.5] 打开菜单「File」»「Show Ethernet 端口配置」。
<img src=”/images/samples/kernel/LogicPaint 001.png”width=”1000”alt=”LogicPaint 1”>
-
[步骤2.6] 点击「MQTT配置」按钮:
<img src=”/images/samples/kernel/LogicPaint 002.png”width=”1000”alt=”LogicPaint 2”>
-
[步骤2.7] 将复制的access令牌粘贴到指定框:
<img src=”/images/samples/kernel/LogicPaint 003.png”width=”1000”alt=”LogicPaint 3”>
-
[步骤2.8] 填写以下字段:
<img src=”/images/samples/kernel/Table 000.png”width=”1000”alt=”Table 0”>
-
[步骤2.9] 为每个需要监测的数值添加slot:
<img src=”/images/samples/kernel/Table 001.png”width=”1000”alt=”Table 1”>
-
[步骤2.10] 使用CLOSE按钮关闭两个打开的窗口。
-
[步骤2.11] 最后使用「Compile + Send Application」按钮编译并将应用发送到KERNEL PLC。
-
[步骤2.12] 成功发布「temperature」读数后,应能立即在设备遥测选项卡中看到。点击表格中的设备行打开设备详情:
<img src=”/images/samples/kernel/Thingsboard 006.png”width=”1000”alt=”Thingsboard 6”>
-
[步骤2.13] 进入「Latest遥测」选项卡:
<img src=”/images/samples/kernel/Thingsboard 008.png”width=”1000”alt=”Thingsboard 8”>
步骤3创建仪表板
最后一步是根据需要创建仪表板。仪表板用于收集和展示数据集。可通过丰富的部件实现数据可视化。可参考以下ThingsBoard主要功能指南:
- 创建 仪表板 - 如何创建新仪表板
- Working with IoT dashboards - 如何使用仪表板