从 OPC 发布者处获取无连接消息 iothub

问题描述 投票:0回答:1

我正在使用 OPC 发布者以给定的时间间隔从 OPC ua 服务器(西门子 s7-1200)读取值,这工作正常但是当服务器和客户端之间没有连接时我没有在物联网集线器中收到任何消息.

我想继续发送带有某种消息的消息,表明服务器和 OPC 发布者设备之间没有连接。我怎样才能做到这一点?我目前唯一拥有的是日志文件。

设置:

"Cmd": [
        "-c",
        "--PkiRootPath=/mount/pki",
        "--pf=/mount/published_nodes.json",
        "--lf=/mount/publisher.log",
        "--mm=PubSub",
        "--me=Json",
        "--fd=false",
        "--bs=100",
        "--bi=1000",
        "--di=20"
        "--aa"
    ],

Opc 端点已连接? : 错

我只能在日志文件中看到端点未连接。我想在 IotHub 中收到消息说它没有连接。

azure-iot-hub opc-ua azure-industrial-iot
1个回答
0
投票

您可以通过配置 HeartbeatIntervals 来使用心跳机制。您可以通过命令行设置 DefaultHeartbeatInterval 为配置中的所有节点全局执行此操作,如下所述:https://github.com/Azure/Industrial-IoT/blob/main/docs/modules/publisher-commandline.md . 或者,您可以在 published_nodes.json 配置文件中为每个选定节点启用 HeartbeatInterval,如下所述: https://github.com/Azure/Industrial-IoT/blob/main/docs/modules/publishednodes_2.8.json.

© www.soinside.com 2019 - 2024. All rights reserved.