
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
MODBUS OPC UA server implements MODBUS TCP protocol and exposes COIL, DI, HREG and IREG registers via OPC UA interface.
--dev:<host[:port]>
MODBUS device ip and port (optionally), like "192.168.0.1" or "192.168.0.1:502".
--slave:<num>
Optional. MODBUS slave id.
--reconnectInterval:<num>
Optional. Reconnection interval between two consecutive connection atte***s, ms. Default is 5000 ms.
--requestInterval:<num>
Optional. Minimal interval between requests, ms. Default is 100 ms.
--responseTimeout:<num>
Optional. Timeout interval used to wait for a response, ms. Default is 1000 ms.
--byteTimeout:<num>
Optional. Timeout interval between two consecutive bytes of a message, ms. If there is no character in the buffer, the allowed timeout interval between two consecutive bytes is defined by byte timeout. Default is 1000 ms.
--readAtte***s:<num>
Optional. Maximal read atte***s before failure. Default is 3.
--instance:<str>
Optional. Specifies instance name for non-default instance. Instances are explained here.
--nocert
Optional. Do not use certificates. Indicates that OPC UA server should not expose secured endpoints.
The Docker container exposes TCP port 4840 for the OPC UA server.
docker run -p 4840:4840 xtensive/dpa.ua.modbus --dev:192.168.0.2 --slave:16 --reconnectInterval:3000 --nocert
To mount a volume for Instances, you can use the following command:
docker run -p 4840:4840 -v <local-path>:/dpa/instances xtensive/dpa.ua.modbus --dev:192.168.0.2 --slave:16
MODBUS OPC UA server provides [*] namespace which defines 4 variables to access COIL, DI, HREG and IREG registers respectively:
Objects/MODBUS/AS/COIL Objects/MODBUS/AS/DI Objects/MODBUS/AS/HREG Objects/MODBUS/AS/IREG
Use OPC UA indexes to access particular register. For instance, to access HREG register number 32:
Objects/MODBUS/AS/HREG[32]
Ranges are supported as well. To read HREG values of registers 32-38:
Objects/MODBUS/AS/HREG[32:38]
To explicitly specify the slave number, use indexes with two components. For instance, to read HREG values of registers 32-38 from slave 13:
Objects/MODBUS/AS/HREG[13,32:38]
Aliases are human-readable shortcuts, allowing easy access to indexed registers using clear notations such as "temperature", "speed", etc. Conversion and data transformation are also supported. For example, to convert two 16-bit registers into one value of type "float".
All diagnostic messages are sent to stdout and stderr. For instance, when OPC UA server fails to read the certificate or the private key:
[2023-10-18 11:07:13.019 (UTC+0300)] fatal/server Could not load certificate storage.
In that case ensure that .cert and .key files exist and are located according to Instances directory structure.
An invalid or corrupted alias.json file may cause service to fail to start:
[2023-10-18 11:08:54.418 (UTC+0300)] fatal/server Could not load alias json.
In that case ensure that alias.json is valid and its content respects the demands described here. Take into account that e***y alias.json file is ***ed as invalid. If aliases are not used, just remove alias.json.
If the license is not installed or if the license is not valid, for example, an expired TRIAL license, then the OPC UA server will function for 1 hour after starting the process. After the hour has elapsed, the OPC UA server will return a BADLICENSENOTAVAILABLE or BADLICENSEEXPIRED error on requests to read and write data, except for system objects and system variables of OPC UA server.
The variable "Objects/Server/Instance/LicenseKey" allows to read the loaded license and its status. Next, the license status can be checked with the command line utility dpa.opcua.rs:
dpa.opcua.rs.exe target <OpcServerIp>
To troubleshoot any MODBUS communication issues, please, refer to "Objects/MODBUS/link" variable. It provides detailed information about the status of MODBUS TCP connection as well as any errors detected, including the rich set of counters for various types of errors.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务