OPC 发布者不会按照 OPC 模拟服务器生成的顺序发送数据

问题描述

我一直在尝试将 OPC 模拟服务器生成的传感器数据(在 excel 文件中列出并由 OPC 模拟读取的数据)检索到 Azure IOT Edge 中的自定义模块之一。当数据记录在控制台中时,它向我显示数据尚未按顺序记录。以下是作为模块托管在 iot edge 中的 OPC 发布者的 JSON。

        "OPcpublisher": {
        "version": "1.0","type": "docker","status": "running","restartPolicy": "always","settings": {
          "image": "mcr.microsoft.com/iotedge/opc-publisher:2.8","createOptions": {
            "Hostname": "publisher","Cmd": [
              "publisher","--pf=/appdata/publishednodes.json","--lf=/appdata/publisher.log","--aa"
            ],"HostConfig": {
              "Binds": [
                "/home/sineth/iiotedge:/appdata"
              ]
            }
          }
        }
      }

以下是网关设备中发布的节点json。

enter image description here

以下是我的excel表格数据的截图

enter image description here

但是 OPC 发布者不会将数据路由到模块中,以便从任何地方开始但按顺序。 例如,它从第 11 行开始发送 Tag11 的值为 11,然后再次发送下一行,其值为 17 的标签 11。有时还会发送一批数据。没有正确的顺序。 这不是 OPC 服务器模拟的问题,因为我已经使用独立的 OPC 客户端测试了模拟服务器,并且它按顺序获取数据。 Excel由模拟服务器读取。 下图是我的 IoT 边缘模块 (python) 的屏幕截图,我将数据记录到控制台,从 OPC Publisher 路由中检索。

enter image description here

感谢您对此的任何帮助。 非常感谢。

解决方法

所以一些问题:

  1. 您使用的是什么版本的 iotedge?
  2. 是日志没有按顺序还是接收到的消息没有顺序?
  3. 您使用的是 MQTT 还是 AMQP 什么协议?