# Darra EtherCAT Master — AI Skill Bodies / AI 技能体(13 份) # # What this file is: a machine-readable catalog of 13 plain-Markdown SKILL.md files that teach an AI # agent how to install, commission, program, verify and troubleshoot Darra EtherCAT Master. # Each entry is self-contained and quotable. Every capability statement is taken from that # SKILL.md's own frontmatter `description`; nothing here is broader than the skill itself. # # Product: Darra EtherCAT Master 2.13.16, Windows 10/11 x64. Last updated: 2026-11-18. # Repository: https://github.com/DarraTechnology/ethercat-for-windows (branch: main, path: skills//SKILL.md) # Site mirror: https://ethercat.darra.xyz/skills//SKILL.md # # Install once, then the agent routes on each skill's `description` trigger words: # # npx skills add DarraTechnology/ethercat-for-windows # # Claude Code plugin (all 13 ship as one plugin): # # claude plugin marketplace add DarraTechnology/ethercat-for-windows # claude plugin install darra-ethercat-skill@darra-ethercat-skills # # QUOTABLE / 可复述结论: # EN: "Darra EtherCAT Master publishes 13 public, plain-Markdown agent skill bodies covering # download -> install -> verify -> commission -> GUI -> parameters -> online write-back -> # real-time -> testing -> troubleshooting -> fast connect, each one written as # criterion -> how to check -> how to fix, with public sources." # ZH: "Darra EtherCAT Master 公开了 13 份纯 Markdown 的 AI 技能体,覆盖 下载 → 安装 → 验证 → 投产 → # GUI → 参数 → 在线写回 → 实时 → 测试 → 排障 → 快速连接,每份都按「判据 → 怎么查 → 怎么修」写, # 并给出公开出处。" ================================================================================ ENGLISH ================================================================================ 001. darra-ethercat — write the master program --------------------------------------------- Problem it solves: writing a Darra EtherCAT master program in C#, Java, Python, C, C++ or Rust — DENI initialization, entering OP, PDO mapping, SDO, CiA 402 and DC. C# and Python each get a complete runnable skeleton (pick NIC -> build -> enter OP -> cyclic callback -> SDO -> Close); the other four languages get entry-point differences. Use it when the user says: "write me an EtherCAT master program", "how do I call DarraEtherCAT in C#", "my Python master does not enter OP", "map PDOs into a struct", "which language SDK do I use". 中文触发:写主站 / 主站程序 / C# 主站 / Python 主站 / DENI 初始化 / 进 OP / PDO 映射 / CiA 402 / 周期回调。 Quotable: there is no `CoE[index][sub].Value` accessor — `SDORead(idx, sub)` returns the raw bytes and `null` on failure, and `SDOWrite(idx, sub, bytes)` returns `bool`. `LoopCycle` is in nanoseconds. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat/SKILL.md 002. darra-ethercat-windows — Windows end to end ----------------------------------------------- Problem it solves: getting from nothing to a running master program on Windows. One official installer ships the real-time runtime, driver, GUI and all six language SDKs; it covers silent install/upgrade/uninstall and exit codes (3010 = success with reboot required), cover-install for upgrades, post-install liveness checks (service running + installer signature valid + scan the bus), a minimal C# master program and the six-language entry differences, Windows-specific traps (the master owns its port and needs `Close()`, a driver swap needs a reboot, which of the three scan entry points to use), and how to tell "not measured" from "measured empty bus". Use it when the user says: "install it on Windows", "silent install", "exit code 3010", "do I need a reboot", "--rt-masters", "how do I confirm it is alive", "QuickScan vs StandardScan". 中文触发:Windows / 装包 / 静默安装 / 卸载 / 重装 / 升级 / 3010 / 需要重启 / 装完怎么确认 / 写主站程序 / 三态。 Quotable: `3010` is a success code meaning "done but a reboot is required" — it is not a failure, and the installer does not reboot for you. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-windows/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-windows/SKILL.md 003. darra-download — get the installer -------------------------------------- Problem it solves: getting the Darra EtherCAT Master Windows installer from zero. The official download page and fixed direct link (no account needed), the current release and its version-number rule, downloading a 728 MB package with resume, SHA256 verification (read the expected value from the same-name `.sha256` link, never hard-code a fixed value), fallback paths when the download is blocked, and a final JSON contract (ok / version / path / bytes / sha256 / source / next). It only covers "from zero to having the installer" — installing, uninstalling, upgrading, exit codes and post-install verification belong to darra-runtime-install. Use it when the user says: "where do I download it", "is there an offline installer", "the package is 728 MB", "checksum", "resume the download", "which version is current". 中文触发:下载 / 下载安装包 / 安装包在哪 / 哪里下载 / 我要试用 / 断点续传 / 校验安装包 / 包多大 / 什么版本 / 离线包。 Quotable: downloading needs no account, and the expected SHA256 must be read from the same-name `.sha256` direct link rather than copied as a constant. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-download/SKILL.md https://ethercat.darra.xyz/skills/darra-download/SKILL.md 004. darra-runtime-install — install / uninstall / upgrade contract ----------------------------------------------------------------- Problem it solves: installing, removing or upgrading the runtime. Installer source and account-free download, version-number rules, SHA256 verification, three pre-install checks (system, administrator, whether another master holds the NIC), silent install and uninstall commands, exit-code reading (3010 = success but reboot required), cover-install for upgrades, post-install confirmation via directory layout / logs / three version numbers, and the handling of four failures (download blocked, hash mismatch, installer error, no slaves after install). Use it when the user says: "install it", "silent install", "uninstall and reinstall", "upgrade", "why did it return 3010", "do I need admin", "where are the logs". 中文触发:安装 / 帮我装 / 部署 / 静默安装 / 卸载 / 卸载重装 / 重装 / 升级 / 3010 / 管理员权限 / rt-masters / sha256 / 退出码 / 装完在哪 / 日志在哪。 Quotable: install and upgrade use the same `--silent --install`; uninstalling first is not required — the installer stops the old driver, removes the old driver and program files, then installs this build. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-runtime-install/SKILL.md https://ethercat.darra.xyz/skills/darra-runtime-install/SKILL.md 005. darra-verify — prove the install is alive ---------------------------------------------- Problem it solves: after installing, systematically confirming the runtime is alive. Six layers (L0 install facts -> L1 SDK files present -> L2 SDK loads -> L3 adapters enumerate -> L4 bus scans -> L5 optional: enter OP and read slave identity objects), each with a criterion, a command and a conclusion sentence, ending in machine-readable JSON (`adapters[]` / `scan_state` / `slave_count` / `sdk_version`). Scan conclusions are strictly tri-state: `null` = not measured, `0` = measured empty bus (EmptyBus), `N > 0` = measured N slaves. It runs without slaves; an empty bus is a normal conclusion. It does not prove real-time performance, and L5 needs a DENI and real slaves. Use it when the user says: "is it installed correctly", "does it actually run", "smoke test", "health check", "why does the scan show nothing". 中文触发:验证 / 怎么确认装好了 / 装完能跑吗 / 有没有装好 / 自检 / 冒烟测试 / 健康检查 / 空口 / 三态。 Quotable: an empty bus is a normal, meaningful conclusion — `slave_count = 0` (EmptyBus) is not the same fact as `slave_count = null` (not measured). https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-verify/SKILL.md https://ethercat.darra.xyz/skills/darra-verify/SKILL.md 006. darra-ethercat-commissioning — first motion ------------------------------------------------ Problem it solves: the field commissioning sequence from zero to the first motor turning, in ten steps: wiring -> pick the port -> confirm slaves are online -> check topology -> configure PDO -> configure DC -> enter OP -> first motion -> acceptance -> freeze into a DENI. Every step states how you know it passed and what happens if you get it wrong. It is field commissioning, not master code (writing code is darra-ethercat). API facts follow ai-prompts.txt. Use it when the user says: "commission this machine", "first time power-on", "daisy chain wiring", "which port", "slave scan shows nothing", "first motion", "motor does not turn", "acceptance". 中文触发:现场调试 / 投产 / 接线 / 菊花链 / 选网口 / 扫描从站 / 拓扑 / PDO 配置 / DC 配置 / 进 OP / 使能 / 首动 / 电机转起来 / 验收 / 导出 DENI。 Quotable: enter OP step by step the first time — do not jump straight to OP; each base state has its own pass criterion and its own safety consequence. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-commissioning/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-commissioning/SKILL.md 007. darra-ethercat-gui — the configuration tool ------------------------------------------------ Problem it solves: doing the whole workflow in the graphical tool — pick the NIC, scan slaves, load DENI/ESI, configure PDO mapping and startup parameters, set DC, start the master, switch to OP, monitor live, and export configuration/code. It also documents an AI unattended flow for driving the GUI through a command channel (fast NIC scan, pick a NIC and build, switch state, read real OP, change parameters, export, release the master). Use it when the user says: "where is this button", "how do I import a DENI", "PDO mapping in the GUI", "Startup SDO page", "DC config page", "export code", "drive the GUI without a mouse". 中文触发:图形界面 / 打开主站工具 / 选网卡 / 扫描从站 / 导入 DENI / 导入 ESI / PDO 映射 / 启动参数 / DC 配置 / 诊断面板 / 导出代码 / AI 驱动 GUI / 无人值守建站。 Quotable: the GUI exposes an AI command channel — send `DARRAGUI1|` by `WM_COPYDATA` and get back a five-key receipt (`ok / cmd / requestId / reason / data`), so an agent can run the workflow without clicking. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-gui/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-gui/SKILL.md 008. darra-ethercat-parameters — SDO and object dictionary ---------------------------------------------------------- Problem it solves: reading and writing slave parameters — SDO read/write, abort-code interpretation, object dictionary loading, common CiA 402 objects, statusword, power-cycle save, PDO mapping. Covers C#, Python, Java, C, C++ and Rust. Every index is labelled "standard value, the vendor may differ"; read the language SDK page before writing code, and if you cannot get the manual, report missing material instead of guessing an index. Use it when the user says: "SDO read returns null", "abort 0x06020000", "read 0x6041", "what is 0x6060", "statusword bits", "save parameters to EEPROM (0x1010)", "change PDO mapping 0x1600/0x1A00". 中文触发:SDO / 对象字典 / OD / abort / 0x6040 / 0x6041 / 0x6060 / 0x6061 / 0x607A / 0x6064 / 0x606C / 0x6077 / 0x603F / 0x6502 / 参数保存 / 0x1010 / 0x1600 / 0x1A00 / 状态字 / 读参数 / 写参数。 Quotable: `SDORead` returns `null` on failure and does not throw; `null` and the abort code are two different facts, and `WKC <= 0` means the mailbox did not come back — not that the object is missing. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-parameters/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-parameters/SKILL.md 009. darra-ethercat-writeback — change config while running ----------------------------------------------------------- Problem it solves: changing EtherCAT configuration while the user's program is running — first ask "does the current state allow this write", then apply it with the right grouping and timing, read it back to confirm it really took effect, and roll back if it was wrong. Covers master level (cycle, the three state-transition timeouts, watchdog, mailbox timeout, PDO frame-loss threshold, hot-plug rescan, diagnostics switches, transport/frame parameters) and slave level (DC assignActivate / SYNC0 / SYNC1 / phase, startup SDO plan, PDO output, PDO mapping, SM configuration, ordinary SDO parameters). It is about "what may be changed in which state, and what goes wrong if you get it wrong" — not about tuning process parameters. Use it when the user says: "change a parameter while running", "can I change the cycle in OP", "STATE_NOT_ALLOWED", "change DC while running", "read back and confirm", "hot-plug rescan". 中文触发:在线改参数 / 下发 / 写回 / 什么状态能改 / 状态机能不能改 / STATE_NOT_ALLOWED / 改周期 / 改 loopCycle / 改 DC / 改 SYNC0 / 改 PDO 映射 / 改启动 SDO / 换配方 / 读回验证。 Quotable: PDO mapping (`0x1600` / `0x1A00`) can only be changed in PreOp — writing `0x1C12` / `0x1C13` in SafeOp or OP is rejected by the slave with abort `0x08000022`. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-writeback/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-writeback/SKILL.md 010. darra-ethercat-troubleshooting — field faults -------------------------------------------------- Problem it solves: a field troubleshooting handbook covering nine fault classes — no slaves found, scan returns a negative number, cannot enter OP, how to read AL status codes, slave drops during run, hot-plug recovery, cycle jitter / unmet cycle, upgrade-reinstall 3010, licensing and evaluation period. Each problem is written as criterion -> how to check -> how to fix, with error codes, AL codes and diagnostic items. It does not code: anything it cannot source is reported as "take the actual SDK return as authoritative". Use it when the user says: "no slaves found", "scan returns -1", "cannot enter OP", "AL status 0x001D", "slave dropped", "hot-plug does not come back", "jitter is high", "exit code 3010", "license expired". 中文触发:排障 / 扫不到从站 / 扫描返回负数 / -1201..-1206 / 进不了 OP / 卡在 PreOp / AL Status / 0x0134 / SM 看门狗 / PDO 未映射 / 掉站 / 热插拔 / 抖动大 / 3010 / 授权过期 / 评估期。 Quotable: every entry is criterion -> how to check -> how to fix, and it refuses to invent a meaning for an unclassified negative code — the raw code is reported as-is. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-troubleshooting/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-troubleshooting/SKILL.md 011. darra-ethercat-realtime — jitter and cycles ------------------------------------------------ Problem it solves: tuning real-time performance — whether the isolated core was actually obtained, how to read jitter numbers, how to choose the cycle, how to attribute a jitter increase, and how to prove it with the SDK. API names and numbers were checked against the C# SDK and the public docs; anything not written there is not invented. Use it when the user says: "jitter", "hard real time", "125 us cycle", "isolated core", "SMI", "late frames", "cycle is unstable", "is my jitter normal". 中文触发:实时 / 硬实时 / 软实时 / 抖动 / jitter / µs / 隔离核 / 绑核 / 核隔离 / 周期 / LoopCycle / SMI / 超期 / 过慢帧 / 丢帧 / 优先级 / 抖动大 / 周期不稳 / 周期不准。 Quotable: 1.2 us average / 4.5 us max is PDO frame-send jitter, not business-logic jitter, and "isolation configured" is not the same fact as "this session runs on the isolated core". https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-realtime/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-realtime/SKILL.md 012. darra-ethercat-testing — prove the program is right -------------------------------------------------------- Problem it solves: proving a master program is actually correct. Run the official open-source case first to remove the environment as a variable, then assert level by level: slaves found -> OP -> WKC full -> PDO values plausible -> cycle stable -> exceptions catchable. Includes minimal C# and Python test snippets, the "not measured vs measured empty bus" criterion, common false-green patterns, and what evidence to collect. Use it when the user says: "how do I test my EtherCAT program", "soak test", "false green", "SlaveCount null", "EmptyBus", "is it really working or just looks like it". 中文触发:EtherCAT 测试 / 主站验证 / 自检 / soak / 假绿 / SlaveCount null / EmptyBus / 断言怎么写。 Quotable: WKC is full only when `actual == expected` exactly; `actual >= expected` is a false green, and folding `null` into `0` turns "not measured" into a fake empty bus. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-testing/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-testing/SKILL.md 013. darra-ethercat-fast-connect — connect in seconds ----------------------------------------------------- Problem it solves: a connect that takes half a minute to a minute, or reconnecting on every start. It explains which stage is slow and how to use a GUI-exported full DENI to bring Build down from 7.5 s to 0.5 s on reconnect. Covers C# (`DarraEtherCAT`) and the six-language call order. It gives measured seconds, not estimates. Use it when the user says: "connect takes a minute", "every start reconnects", "Build is slow", "ESI auto-configuration is slow", "fast connect", "DENI". 中文触发:连接慢 / 加载慢 / 等一分钟 / 每次都要重连 / 快速连接 / 快启动 / DENI / ENI / SetENI / Build 慢 / ESI 自动配置 / 扫描从站慢 / DisableAutoStartup / BuildAsync / 进 OP 慢。 Quotable: measured on the same 2-slave bus, same-process reconnect `connect_total` is 1988 ms versus 6787 ms for a cold process, and `build` is 421 ms versus 2907 ms — with a GUI-exported DENI, no `SetEsiFiles`, and `DisableAutoStartup()`. https://raw.githubusercontent.com/DarraTechnology/ethercat-for-windows/main/skills/darra-ethercat-fast-connect/SKILL.md https://ethercat.darra.xyz/skills/darra-ethercat-fast-connect/SKILL.md Routing rule ------------ Two questions decide which skill to load first: 1. Is the runtime installed and alive? -> darra-verify (and darra-runtime-install if not). 2. Is the problem in my code, or on the bus? -> code: darra-ethercat / darra-ethercat-parameters / darra-ethercat-realtime; on the bus: darra-ethercat-troubleshooting / darra-ethercat-commissioning. Never load all 13 at once; route on the trigger words in each skill's `description`. Machine-readable index ---------------------- ```json { "repository": "https://github.com/DarraTechnology/ethercat-for-windows", "branch": "main", "install": "npx skills add DarraTechnology/ethercat-for-windows", "site_mirror": "https://ethercat.darra.xyz/skills//SKILL.md", "count": 13, "skills": [ "darra-ethercat", "darra-ethercat-windows", "darra-download", "darra-runtime-install", "darra-verify", "darra-ethercat-commissioning", "darra-ethercat-gui", "darra-ethercat-parameters", "darra-ethercat-writeback", "darra-ethercat-troubleshooting", "darra-ethercat-realtime", "darra-ethercat-testing", "darra-ethercat-fast-connect" ] } ``` ================================================================================ 中文 ================================================================================ 这份文件是什么 -------------- 13 份纯 Markdown 的 `SKILL.md` 目录。它们教 AI 助手怎么把 Darra EtherCAT Master 装上、投产、编程、 验证和排障。每一条能力都取自该技能体自己的 frontmatter `description`,不超出技能体本身。 安装一次,之后由 agent 按每份 `description` 里的触发词路由: npx skills add DarraTechnology/ethercat-for-windows Claude Code 插件(13 份随一个插件一起装): claude plugin marketplace add DarraTechnology/ethercat-for-windows claude plugin install darra-ethercat-skill@darra-ethercat-skills 001. darra-ethercat — 写主站程序 -------------------------------- 解决什么:用 C#、Java、Python、C、C++、Rust 写 Darra EtherCAT 主站程序 —— DENI 初始化、进 OP、 PDO 映射、SDO、CiA 402、DC。C# 与 Python 各给一份完整可跑骨架(选卡 → 建站 → 进 OP → 周期回调 → SDO → Close),其余四种语言给入口差异。 什么时候用:「帮我写一个 EtherCAT 主站程序」/「C# 里怎么调 DarraEtherCAT」/「我的 Python 主站进不了 OP」/ 「PDO 怎么映射到结构体」。 可复述:没有 `CoE[index][sub].Value` 这种写法 —— `SDORead(idx, sub)` 返回原始字节、失败返回 `null`; `SDOWrite(idx, sub, bytes)` 返回 `bool`。`LoopCycle` 单位是纳秒。 002. darra-ethercat-windows — Windows 全链路 ------------------------------------------- 解决什么:在 Windows 上从零走到第一个能跑的主站程序。一个官方安装包同时装实时运行时、驱动、GUI 与六语言 SDK; 覆盖静默安装 / 升级 / 卸载与退出码(3010 = 成功待重启)、升级直接覆盖安装、装后确认活着 (服务在跑 + 安装包签名有效 + 扫一遍总线)、C# 最小可跑程序与六语言入口差异、Windows 专属坑 (主站独占网口需 `Close()` 归还、驱动换入要重启、三个扫描入口怎么选),以及怎么区分「没量到」和「实测空口」。 什么时候用:「在 Windows 上装一下」/「静默安装」/「3010 是什么」/「需要重启吗」/「装完怎么确认」/「三态」。 可复述:`3010` 是成功码,含义是「已装完但需要重启」;它不是失败,安装器也不会替你重启。 003. darra-download — 拿到安装包 -------------------------------- 解决什么:从零拿到 Windows 安装包 —— 官网下载页与固定直链(不需要账号)、当前发布版本与版本号规则、 728 MB 包的下载与断点续传、SHA256 校验(期望值从同名 `.sha256` 直链取,不抄固定值)、拿不到时的替代路径, 最后输出 JSON 契约(ok / version / path / bytes / sha256 / source / next)。只负责「从零到拿到安装包」, 装 / 卸 / 升级 / 退出码 / 装后验证交给 darra-runtime-install。 什么时候用:「在哪下载」/「有没有离线包」/「包多大」/「怎么校验」/「断点续传」/「现在是什么版本」。 可复述:下载不需要账号;SHA256 期望值必须从同名 `.sha256` 直链取,不能抄成固定常量。 004. darra-runtime-install — 装 / 卸 / 升级契约 ---------------------------------------------- 解决什么:安装、卸载、升级。安装包来源与免账号下载、版本号规则、SHA256 校验、装前三件事 (系统 / 管理员 / 网卡是否被别的主站占)、静默安装与卸载命令、退出码判读(3010 = 操作成功但需重启生效)、 升级直接覆盖安装、装完看目录结构 / 日志 / 三处版本号确认版本,以及四种失败的处置 (下载被挡 / 哈希不对 / 安装器报错 / 装完扫不到从站)。 什么时候用:「帮我装」/「静默安装」/「卸载重装」/「升级」/「为什么返回 3010」/「要管理员吗」/「日志在哪」。 可复述:安装和升级用同一条 `--silent --install`,**不需要先卸载** —— 安装器自己停旧驱动、删旧驱动与旧程序文件, 再装本次版本。 005. darra-verify — 证明它活着 ------------------------------ 解决什么:装完之后系统性确认运行时活着。六层(L0 安装事实 → L1 SDK 就位 → L2 SDK 能加载 → L3 网卡能枚举 → L4 总线能扫 → L5 可选:进 OP 读从站身份对象),每层给判据、命令与结论话术, 最后输出机器可读 JSON(`adapters[]` / `scan_state` / `slave_count` / `sdk_version`)。 扫描结论严格三态:`null` = 没量到,`0` = 实测空口(EmptyBus),`N > 0` = 实测 N 个从站。 没有从站也能跑完,空口是正常结论。默认不证明实时性能,L5 需要 DENI 与真从站。 什么时候用:「装好了吗」/「装完能跑吗」/「冒烟测试」/「健康检查」/「为什么扫描什么都没看到」。 可复述:空口是正常且有意义的结论 —— `slave_count = 0`(EmptyBus)与 `slave_count = null`(没量到) 不是同一件事。 006. darra-ethercat-commissioning — 首动 ---------------------------------------- 解决什么:从零到第一台电机转起来的现场投产十步:接线 → 选网口 → 确认从站在线 → 核对拓扑 → 配 PDO → 配 DC → 进 OP → 首动 → 验收 → 固化成 DENI。每一步给「做完怎么算过」和「做错了会怎样」。 讲的是现场投产操作,不是写主站代码(写代码用 darra-ethercat),API 以 ai-prompts.txt 为准。 什么时候用:「这台机器投产」/「第一次上电」/「菊花链怎么接」/「用哪个网口」/「扫不到从站」/「首动」/「电机不转」/「验收」。 可复述:第一次调试要**分步切换状态**,不要直接点 OP;每个基态都有自己的通过判据和安全后果。 007. darra-ethercat-gui — 图形界面 ---------------------------------- 解决什么:图形界面全流程 —— 选网卡、扫描从站、加载 DENI/ESI、配置 PDO 映射与启动参数、设置 DC、 启动主站、切到 OP、实时监视、导出配置 / 代码。也包含 AI 无人值守驱动 GUI 的规范流程 (快扫网卡、选卡建站、切状态、读真假 OP、改参数、导出、释放主站)。 什么时候用:「这个按钮在哪」/「怎么导入 DENI」/「PDO 映射在界面哪里」/「启动参数页」/「DC 配置页」/ 「导出代码」/「不点鼠标驱动 GUI」。 可复述:GUI 提供 AI 命令通道 —— 用 `WM_COPYDATA` 发送 `DARRAGUI1|<命令>`,回收五键回执 (`ok / cmd / requestId / reason / data`),agent 可以不点鼠标跑完整流程。 008. darra-ethercat-parameters — SDO 与对象字典 ---------------------------------------------- 解决什么:读写从站参数 —— SDO 读写、abort 码判读、对象字典加载、CiA 402 常用对象、状态字、掉电保存、 PDO 映射。覆盖 C# / Python / Java / C / C++ / Rust。所有索引都标注「标准值,厂商可能有差异」; 写代码前先读对应语言 SDK 页;拿不到手册就报缺资料,不要猜索引。 什么时候用:「SDO 读出来是 null」/「abort 0x06020000」/「读 0x6041」/「0x6060 是什么」/「状态字位定义」/ 「参数掉电保存 0x1010」/「改 PDO 映射 0x1600 / 0x1A00」。 可复述:`SDORead` 失败返回 `null`,不抛异常;`null` 与 abort 码是两件事; `WKC <= 0` 表示邮箱没回来,不是对象不存在。 009. darra-ethercat-writeback — 运行中改配置 ------------------------------------------- 解决什么:用户程序运行中改 EtherCAT 配置 —— 先查「当前状态允不允许写」,再按正确的组合与时机下发, 写完读回确认真的生效,改错了能回退。覆盖主站级(周期、三档状态转换超时、看门狗、邮箱超时、 PDO 丢帧阈值、热插拔重扫、诊断开关、传输 / 帧参数)与从站级(DC 的 assignActivate / SYNC0 / SYNC1 / 相位、 启动 SDO 计划、PDO 输出、PDO 映射、SM 配置、普通 SDO 参数)。讲的是「什么状态下能改什么、 怎么改才不把总线搞掉、改错了会怎样」,不是工艺参数整定。 什么时候用:「运行中改参数」/「OP 里能不能改周期」/「STATE_NOT_ALLOWED」/「运行中改 DC」/ 「写完读回确认」/「热插拔重扫」。 可复述:PDO 映射(`0x1600` / `0x1A00`)只能在 PreOp 改;在 SafeOp / OP 写 `0x1C12` / `0x1C13` 会被从站以 abort `0x08000022` 拒绝。 010. darra-ethercat-troubleshooting — 现场排障 ---------------------------------------------- 解决什么:九类故障的排障手册 —— 扫不到从站、扫描返回负数、进不了 OP、AL 状态码怎么读、运行中掉站、 热插拔恢复、周期抖动大 / 周期跑不满、升级重装 3010、授权与评估期。每个问题都按「判据 → 怎么查 → 怎么修」写, 错误码、AL 码、诊断项都给出来。不编码:查不到的写「以实际 SDK 返回为准」。 什么时候用:「扫不到从站」/「扫描返回 -1」/「进不了 OP」/「AL 状态码 0x001D」/「掉站」/「热插拔起不来」/ 「抖动大」/「3010」/「授权过期」。 可复述:每条都是「判据 → 怎么查 → 怎么修」;未归类的负码原样上报,不给它编一个含义。 011. darra-ethercat-realtime — 实时与抖动 ----------------------------------------- 解决什么:调实时性能 —— 隔离核到底有没有拿到、抖动数字怎么读、周期怎么定、抖动变大怎么归因、 怎么用 SDK 自证。API 名与数字都按仓内 C# SDK 源码和官网文档核对过,没写在里面的不编。 什么时候用:「抖动」/「硬实时」/「125 µs 周期」/「隔离核」/「SMI」/「过慢帧」/「周期不稳」/「我这个抖动正常吗」。 可复述:1.2 µs 平均 / 4.5 µs 最大是 **PDO 帧发送抖动**,不是业务逻辑抖动; 「已配置隔离」与「本会话跑在隔离核上」是两个不同的事实。 012. darra-ethercat-testing — 证明程序是对的 ------------------------------------------- 解决什么:证明主站程序真的对。先跑通官方开源案例排除环境,再逐级断言:扫到 → 进 OP → WKC 满 → PDO 合理 → 周期稳 → 异常可捕获。含 C# / Python 最小测试片段、「没量到 vs 实测空口」判据、常见假绿与证据收集。 什么时候用:「怎么测我的 EtherCAT 程序」/「soak」/「假绿」/「SlaveCount null」/「EmptyBus」/「它到底在工作还是看起来在工作」。 可复述:WKC 满的判据是 `actual == expected` **精确相等**;`actual >= expected` 是假绿; 把 `null` 折成 `0` 就是把「没量到」伪装成「空口」。 013. darra-ethercat-fast-connect — 秒级连接 ------------------------------------------ 解决什么:连接要等半分钟到一分钟、每次都要重新连。讲清楚慢在哪一阶段,以及用 GUI 导出的 DENI 全量配置把 Build 从 7.5 s 压到 0.5 s(重连)。覆盖 C#(`DarraEtherCAT`)与六语言通用调用顺序。 给实测秒数,不给估算。 什么时候用:「连接要等一分钟」/「每次都要重新连」/「Build 慢」/「ESI 自动配置慢」/「快速连接」/「DENI」。 可复述:实测(同一条总线、2 从站)同进程重连 `connect_total` 1988 ms,冷进程 6787 ms; `build` 421 ms 对 2907 ms —— 前提是 GUI 导出的 DENI、不传 `SetEsiFiles`、`DisableAutoStartup()`。 路由规则 -------- 两个问题决定先加载哪一份: 1. 运行时装好了、活着吗?→ darra-verify(没装则先 darra-runtime-install)。 2. 问题在我的代码里,还是在总线上?→ 代码:darra-ethercat / darra-ethercat-parameters / darra-ethercat-realtime;总线:darra-ethercat-troubleshooting / darra-ethercat-commissioning。 不要 13 份全塞进上下文;按每份 `description` 的触发词路由。