水泵模拟服务器
OPC UA 服务器可实现简单的水泵机器仿真。
水泵仿真服务器是使用 OPC UA 为水泵和Qt Quick 水泵示例创建的。
模拟
OPC UA 服务器运行一个包含两个水箱、一个水泵和一个阀门的机器仿真。水可以从第一个水箱泵入第二个水箱,然后通过打开阀门从第二个水箱冲出。这两项操作都有一个用户可配置的设定点,以便控制泵入或冲出第二个水箱的水量。
服务器上存在以下节点:
节点 ID | 功能 |
---|---|
ns=2;s=Machine | 包含机器方法和变量节点的文件夹 |
ns=2;s=Machine.State | 机器的状态 |
ns=2;s=Machine.Tank1.PercentFilled | 第一个油箱的当前加注状态 |
ns=2;s=Machine.Tank2.PercentFilled | 第二个油箱的当前加注状态 |
ns=2;s=Machine.Tank2.TargetPercent(目标百分比 | 泵送和冲洗的设定值 |
ns=2;s=Machine.Tank2.ValveState | 第二个水箱阀门的状态 |
ns=2;s=机器名称 | 用于显示的机器名称,可由人工读取 |
ns=2;s=Machine.Start | 调用此方法启动泵 |
ns=2;s=Machine.Stop | 调用此方法停止泵 |
ns=2;s=Machine.FlushTank2 | 调用此方法冲洗水箱 2 |
ns=2;s=Machine.Reset | 调用此方法重置模拟 |
如果操作成功,所有方法都返回Good ;如果操作非法(例如,在第一个水箱为空的情况下试图启动水泵),则返回BadUserAccessDenied 。
文件:
另请参见 Qt Quick 水泵和水泵。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.