industrial
Industrial communication protocols for Zephyr RTOS. Covers Modbus RTU (serial), Modbus TCP (Ethernet/Wi-Fi), and CANopen basics. Trigger when building factory automation controllers, industrial sensors, or medical equipment interfaces.
适合你,如果你正在使用Zephyr RTOS开发工业通信协议。
/ 通过 npx 安装 校验哈希
npx oh-my-skill add beriberikix/zephyr-agent-skills/industrial/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- beriberikix/zephyr-agent-skills/industrial/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify beriberikix/zephyr-agent-skills/industrial安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
58GitHub stars
~602最小装载
~3.1K含声明引用
~3.1K文本包总量
索引托管
怎么用
商店整理自技能原文 · 版本 ed63cdf · 表述以原文为准它做什么
装上后,Claude 能帮你实现基于 Zephyr RTOS 的工业通信协议:Modbus RTU(串行)、Modbus TCP(以太网/Wi-Fi)和 CANopen 基础集成。它会提供代码示例、配置工具和验证清单。
什么时候触发
当你需要构建工厂自动化控制器、工业传感器或医疗设备接口时触发。
装好后可以这样说
Claude 会给出配置代码示例。
Claude 会运行寄存器检查脚本。
Claude 会引用参考文档说明。
技能原文 SKILL.md
Zephyr Industrial Protocols
Build robust, industry-standard communication systems using Zephyr's modular industrial protocol stacks.
Core Workflows
1. Modbus RTU (Serial)
Implement serial-based industrial communication for meters, PLCs, and sensors.
- Reference: [modbus_rtu.md](references/modbus_rtu.md)
- Key Tools:
CONFIG_MODBUS, RS-485 DE/RE handling, Register Mapping.
2. Modbus TCP
Bridge industrial data over standard Ethernet or Wi-Fi networks.
- Reference: [modbus_tcp.md](references/modbus_tcp.md)
- Key Tools: Port 502, TCP/IP networking, Client/Server patterns.
3. CANopen Basics
Integrate with complex automation networks using the CANopenNode stack.
- Reference: [canopen_basics.md](references/canopen_basics.md)
- Key Tools: Object Dictionary (OD), PDO/SDO, Network Management (NMT).
Quick Start (Modbus RTU Server)
# prj.conf CONFIG_MODBUS=y CONFIG_MODBUS_SERIAL=y
// Initialize a server on a serial device
const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_modbus_serial));
struct modbus_iface_param param = {
.mode = MODBUS_MODE_RTU,
.server = { .node_addr = 1, .cb = &my_callbacks },
.serial = { .baud = 115200, .parity = UART_CFG_PARITY_NONE },
};
modbus_init_server(dev, param);
Professional Patterns (Reliability & Safety)
- RS-485 Hardware Handling: Always use the devicetree
uart-rs485property to handle transceiver direction signals automatically at the driver level. - Isolated Communication: Use galvanically isolated transceivers for both serial and CAN lines in factory environments to prevent damage from ground loops.
- Watchdog Integration: In industrial control, always pair your communication loops with the watchdog_reliability pattern (see specialized skill) to ensure the system enters a fail-safe state on protocol lockup.
Automation Tools
- [modbus_register_lint.py](scripts/modbus_register_lint.py): Validate register map CSV files for duplicate addresses and overlaps.
Examples & Templates
- [modbus_register_map_template.csv](assets/modbus_register_map_template.csv): Starter register allocation sheet for Modbus projects.
Validation Checklist
- [ ] Modbus RTU request/response exchange succeeds against a known test slave/master.
- [ ] Modbus TCP endpoint responds on port 502 with correct register mappings.
- [ ] CANopen node transitions through expected NMT states during startup.
- [ ] Communication faults trigger safe retry or watchdog-protected recovery behavior.
Resources
- [References](references/):
modbus_rtu.md: Serial Modbus master/slave setup.modbus_tcp.md: Ethernet Modbus client/server patterns.canopen_basics.md: Object Dictionary and PDO mapping.- [Scripts](scripts/):
modbus_register_lint.py: Register-map consistency checker.- [Assets](assets/):
modbus_register_map_template.csv: Register planning template.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…