Checking the Data Connection

<< 点击显示目录 >>

主页  exOS使用助手 > exOS Automation Help > Getting started >

Checking the Data Connection

exOS 提供 ExDataConnectionInfoExSyncInfoExDatamodelInfo 功能块,用于检查整体数据连接状态、同步状态和特定数据模型的连接 状态 。

使用 ExDataConnectionInfo 功能块可以检查整体数据连接状态  。

首先要查看的是 TargetConnected 输出。状态 为 "true" 意味着数据连接已正确配置,本地和目标机上的所有服务都已启动,并且相互连接。除非该标志被设置(如在启动和部署过程中),否则功能块不会提供进一步的诊断信息。如果出现任何问题,下一级诊断是 ExComponentInfo(数据连接组件下)ExTargetInfo 功能块 ,以及ExDeploy 日志记录器

在 DatamodelsActive下可以看到 WaterTank 的连接情况(或 AR 应用程序与数据连接的连接情况) 。在 WaterTank 数据模型连接之前,该计数器的值为 0(当然,除非有其他应用程序正在运行)。

ExDataConnectionInfo

如果设置了 WaterTankCyclic_0.Connected ,并且连接了 WaterTank 数据模型,则  可使用ExDatamodelInfo 功能块监控数据模型连接的进一步信息。

请注意,需要设置 TargetConnected (连接到目标的数据模型)才能获得数据模型的更多信息。从下图中可以看到,有一个 "本地对等体 "连接到了数据模型。这表示 WaterTankCyclic 功能块实例 的 数量  ,而多个功能块可以连接到同一个数据模型,接收来自 Linux 或 AR 的相同发布数据(如有需要,可跨不同任务类)。  有关此主题的更多信息, 请参阅 " 开发人员 "部分的 "数据通信" 章节 。

ExDatamodelInfo


For examining the state of the overall data connection, the synchronization state, and the connection of a certain datamodel, exOS offers the ExDataConnectionInfo, ExSyncInfo and ExDatamodelInfo function blocks.

The overall data connection state can be examined using the ExDataConnectionInfo function block.

The first thing to look for is the TargetConnected output. State TRUE means that the dataconnection has been configured correctly, that all services locally and on the target have been started up, and that they are connected with eachother. Unless this flag is set (like during bootup and deployment), the function block offers no further diagnose information. If any problems should occur, the next levels of diagnosis are the ExComponentInfo (under Data connection component) and the ExTargetInfo function blocks, as well as the ExDeploy logger.

The connection of the WaterTank (or connections of AR applications towards the dataconnection in general) can be seen under the DatamodelsActive. This counter is 0 until the WaterTank datamodel has been connected (unless of course, there are other applications already running)

ExDataConnectionInfo

In case WaterTankCyclic_0.Connected is set, and the WaterTank datamodel is connected, the ExDatamodelInfo function block can be used to monitor further information regarding the datamodel connection.

Note that the TargetConnected (datamodel connected to the target) needs to be set in order to get further information about the datamodel. In the picture below it is visible that one "local peer" is connected to the datamodel. This indicated the number of WaterTankCyclic function block instances, whereas several function blocks can be connected to the same datamodel, receiving the same published data from Linux or AR (across different taskclasses if needed). Please see the chapter Data communication in the Developer section for more info regarding this topic.

ExDatamodelInfo