Skip to content

技术文档: PLCnext

将设备添加到 Proficloud

在接通您PLCnext设备的电源和更改网络设置后,将设备连接到互联网,您可以(通过在浏览器中输入IP)打开WBM。

在WBM中,您可以在“配置→Proficloud”部分,找到设备的UUID。

In the WBM you can find the UUID of the device in the Configuration → Proficloud V3 section.
在 WBM 中,您可以在配置 → Proficloud 部分中找到设备的 UUID

复制此 UUID 并在 proficloud-io.cn 上登录您的帐户, 您可以在此处单击“添加设备”按钮并按照说明进行操作。

Device entry of a freshly added device in the Device Management Service
设备管理服务中新添加设备的设备入口

添加设备后,它会出现在设备列表中, 一旦连接到 Proficloud,它将获得所有静态信息, 这可能需要一点时间。

启用 Proficloud 连接

现在您可以在设备WBM中启用Proficloud 服务, 在进行配置后,设备会收集唯一的客户证书和令牌,并建立与云端的连接。

Device entry with attention state in the Device Management Service
设备管理服务中具有注意状态的设备条目

技术文档: AnyCloud

支持的设备

  • EMpro (没有发布版本)

设备准备

检查您的设备上是否安装了所需版本的 Pcv3CloudConnector 和 Pcv3AwsCloudConnector。

由于没有发布支持 AnyCloud-Feature 的设备,您需要联系 Phoenix Contact Smart Business GmbH (info@phoenixcontact-sb.io)。

将设备添加到AWS

要注册设备,请登录 阿里 控制台并打开 AWS IoT Core。 之后就可以通过点击【管理】→【事物】→【创建】来添加设备

您将被引导完成创建对话框。 在对话期间,您可以下载设备证书和客户端。

设备配置

需要设置以下配置

Connector_CloudConnectorAWS
AC_ConnectionUrlThe url is responded to the following command1 aws iot describe-endpoint --endpoint-type iot:data-atsAlso take a look at https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html
AC_CertPathPath where the device certificate is stored (per formatted)
AC_KeyPathPath where the private key is stored
AC_CaPathPath where the Ca-Certificate is stored
AC_DeviceIDIdentifier of the device (choose your own one)

After this configuration and a restart of the device, it will send its Time Series Data (TSD) to AWS. You can check this by opening the Test page in the IoT Core and subscribing to the following topic:1 dt/proficloud-v1/dcx/<<device identifier>>/json

You will get the following.

技术文档:设备

PLCnext

在本节中,您将找到有关 PLCnext 设备以及如何将设备添加到 Proficloud 的信息。

Technical Documentation: NodeRed

Proficloud的NodeRed库是将您不同来源的数据在Proficloud上进行整合和显示的简单途径。 该库提供了Proficloud设备节点,表示在NodeRed中具有所有能力的云设备。

ProficloudDevice-Node, which represents the Cloud-Device in NodeRED with all its capabilities

Getting started

您可以通过 manage palette 对话框安装库. 搜索并安装“ node-red-contrib-proficloud ” 。

您也可以使用预装 proficloud/node-red (https://hub.docker.com/repository/docker/proficloud/node-red) docker 。

启动Docker(要求安装Docker)

首先,您需要从Docker集线器中拉出最新的图片:

docker pull proficloud/node-red

拉动后,您可以进行首次启动了。 容器将创建用于永久存储流程配置和设置的一个体积。 为更简单地进行管理,应对容器进行命名。 因此,运行以下命令进行启动:

docker run -d -it -p 1880:1880 --name <container-name> proficloud/node-red

Proficloud设备节点的使用

现在你可以访问 NodeRED 通过<<ip of your host>>/node-red.

连接

双击“连接节点”,输入您的设备的UUID(如果您还没有将您的设备添加到登台帐户的设备管理服务中)。

启用“自动连接”时,节点将在配置延迟后连接到Proficloud, 在“节点状态”中报告连接状态。

时间序列数据

向它发送一个 msg.payload.data 对象。 它将数据发送到云,以在时间序列数据服务的仪表板上可视化。

example payload:

msg = {};
msg.payload = {};
msg.payload.data = {"humidity": 12.0, "temp": 2.0};
return msg;

StateOfHealth

您还可以将日志或交通灯状态发送到 Proficloud。

要发送日志,该节点需要一个msg.payload.log对象,其中包含要在设备管理服务的“日志”面板中显示的消息和日志级别,不得缺失任何一项。

example payload:

msg = {};
msg.payload = {"log": {"level": 2, "tag":"Node-RED","msg": "System started"}};
return msg;

可以在设备管理服务中查看设备交通灯的状态。 该节点需要一个msg.payload.trafficlight对象,其中包含表示颜色的交通灯的数值(0=绿色;1=橙色;2=红色),以及显示为设备状态的消息。 不得缺失任何一项。

example payload:

msg = {};
msg.payload = {"trafficlight": {"color": 0, "msg": "Everything is okay"}};
return msg;

Reference implementation

You can import the following flow as a reference implementation.

[{"id":"e73dae77.7b465","type":"tab","label":"Proficloud Reference","disabled":false,"info":""},{"id":"c386f827.16eb38","type":"ProficloudDevice","z":"e73dae77.7b465","uuid":"","deviceType":"NodeRED-Node","env":"Production","autostart":true,"autodelay":0,"meta_by_payload":false,"serialnumber":"","hardwareVersion":"","x":650,"y":500,"wires":[[]]},{"id":"2f7723f2.906d24","type":"function","z":"e73dae77.7b465","name":"","func":"msg = {};\nmsg.payload = {\"data\" : {\"humidity\": 12.0, \"temp\": 2.0}};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":280,"wires":[["c386f827.16eb38"]]},{"id":"788d6d09.2e35ec","type":"inject","z":"e73dae77.7b465","name":"","props":[],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":280,"wires":[["2f7723f2.906d24"]]},{"id":"60b2ef0a.8aed9","type":"comment","z":"e73dae77.7b465","name":"TimeSeriesData","info":"","x":180,"y":240,"wires":[]},{"id":"ee768abb.14ce08","type":"function","z":"e73dae77.7b465","name":"","func":"msg = {};\nmsg.payload = {\"trafficlight\": {\"color\": 0, \"msg\": \"Everything is okay\"}};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":420,"wires":[["c386f827.16eb38"]]},{"id":"11d12be5.0a1a34","type":"inject","z":"e73dae77.7b465","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":420,"wires":[["ee768abb.14ce08"]]},{"id":"ded8d7ba.28c2f","type":"comment","z":"e73dae77.7b465","name":"TrafficLight - Green","info":"","x":190,"y":380,"wires":[]},{"id":"c17f2af0.f833b8","type":"function","z":"e73dae77.7b465","name":"","func":"msg = {};\nmsg.payload = {\"log\": {\"level\": 2, \"tag\":\"Node-RED\",\"msg\": \"System started\"}};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":720,"wires":[["c386f827.16eb38"]]},{"id":"8a321346.644d7","type":"inject","z":"e73dae77.7b465","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":720,"wires":[["c17f2af0.f833b8"]]},{"id":"6f96f6c8.4315f8","type":"comment","z":"e73dae77.7b465","name":"Log","info":"","x":150,"y":680,"wires":[]},{"id":"726085a2.7b897c","type":"function","z":"e73dae77.7b465","name":"","func":"msg = {};\nmsg.payload = {\"trafficlight\": {\"color\": 1, \"msg\": \"Some warning\"}};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":500,"wires":[["c386f827.16eb38"]]},{"id":"36dbfce5.50a28c","type":"inject","z":"e73dae77.7b465","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":500,"wires":[["726085a2.7b897c"]]},{"id":"b2e339a0.6f9588","type":"comment","z":"e73dae77.7b465","name":"TrafficLight - Orange","info":"","x":190,"y":460,"wires":[]},{"id":"a86c7275.a4358","type":"function","z":"e73dae77.7b465","name":"","func":"msg = {};\nmsg.payload = {\"trafficlight\": {\"color\": 2, \"msg\": \"Fatal error\"}};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":580,"wires":[["c386f827.16eb38"]]},{"id":"2f33ea50.4da396","type":"inject","z":"e73dae77.7b465","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":580,"wires":[["a86c7275.a4358"]]},{"id":"4a0ad995.ab5d6","type":"comment","z":"e73dae77.7b465","name":"TrafficLight - Red","info":"","x":180,"y":540,"wires":[]},{"id":"6a408571.4f517c","type":"comment","z":"e73dae77.7b465","name":"Reference implementation","info":"This is an example flow to show the capabilities of the ProficloudDevice-Node.\nThe inject->function combination can be replaced by the way you like to connect your application. You can also use one of the pre configured Nodes for PxC devices. Just install [this](https://www.npmjs.com/package/node-red-contrib-phoenix-contact).","x":150,"y":180,"wires":[]}]

其他数据来源

当然,可以将来自任何NodeRed数据来源的数据发送到Proficloud。

如果您正在使用预装的docker,已经安装有OPC UA和Modbus等节点。要获得NodeRed的PLCnext控制器的数据,查看 https://www.youtube.com/watch?v=PhM6ot3CtB8&list=PLTLcz6IpeLYLidXE0y6bIwD5cBRZp7dMt&index=11.

参考文献和从哪里了解更多信息

技术文档:操作方法

设备

在本节中,您将找到有关如何在 WBM 中准备设备的信息,例如,将其连接到 Proficloud。

NodeRed

在本节中,您将找到有关 proficloud NodeRed 库的信息, 它描述了一种将来自不同数据源的数据导入 Proficloud 的简单方法。


免费注册

从这里登录