$npx -y skills add easyzoom/aix-skills --skill canopen-integrationUse when integrating, configuring, or debugging CANopen nodes, object dictionaries, NMT, SDO, PDO, heartbeat, SYNC, EMCY, EDS/DCF files, or CANopenNode-style stacks
| 1 | # CANopen Integration |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill to debug CANopen by separating raw CAN bring-up, node identity, |
| 6 | object dictionary, NMT state, SDO configuration, PDO mapping, heartbeat, and |
| 7 | application semantics. CANopen cannot work reliably until raw CAN timing works. |
| 8 | |
| 9 | ## When To Use |
| 10 | |
| 11 | Use this skill when: |
| 12 | |
| 13 | - The user is adding or debugging CANopen master/slave nodes, object |
| 14 | dictionaries, EDS/DCF files, PDOs, SDOs, NMT, heartbeat, SYNC, or EMCY. |
| 15 | - The issue involves missing PDOs, SDO aborts, node state, heartbeat timeout, |
| 16 | wrong COB-IDs, mapping errors, or network management. |
| 17 | - The implementation uses CANopenNode, a vendor stack, or a custom CANopen layer. |
| 18 | |
| 19 | Do not use this skill for low-level CAN bit timing or transceiver bring-up. Use |
| 20 | `canbus-integration` first when raw CAN frames are not proven. |
| 21 | |
| 22 | ## First Questions |
| 23 | |
| 24 | Ask for: |
| 25 | |
| 26 | - CANopen stack, node ID, bitrate, raw CAN evidence, and network topology. |
| 27 | - Object dictionary entries, EDS/DCF, PDO mapping, COB-IDs, and NMT state. |
| 28 | - Master tool or peer node, SDO abort codes, heartbeat settings, and logs. |
| 29 | - Whether SYNC, TIME, EMCY, LSS, or boot-up messages are required. |
| 30 | - Exact frame capture from a CAN analyzer if available. |
| 31 | |
| 32 | ## Debug Workflow |
| 33 | |
| 34 | 1. Prove raw CAN. |
| 35 | Confirm bitrate, sample point, transceiver, termination, and error counters. |
| 36 | |
| 37 | 1. Prove node identity. |
| 38 | Check node ID, boot-up message, NMT state, heartbeat producer/consumer, and |
| 39 | expected COB-IDs. |
| 40 | |
| 41 | 1. Validate object dictionary. |
| 42 | Confirm index/subindex types, access rights, defaults, persistence, and |
| 43 | application backing storage. |
| 44 | |
| 45 | 1. Debug SDO first. |
| 46 | Use SDO reads/writes to verify OD entries before enabling PDO mapping. |
| 47 | |
| 48 | 1. Debug PDO mapping. |
| 49 | Check mapping parameters, transmission type, inhibit/event timers, SYNC, and |
| 50 | payload length. |
| 51 | |
| 52 | 1. Add safety behavior. |
| 53 | Handle heartbeat loss, EMCY, bus-off recovery, and safe outputs explicitly. |
| 54 | |
| 55 | ## Common Failures |
| 56 | |
| 57 | - Raw CAN works only at another bitrate or with missing termination. |
| 58 | - Node ID conflicts with another node or creates unexpected COB-IDs. |
| 59 | - OD type/access flags do not match the master expectation. |
| 60 | - PDO mapping is changed while the PDO is enabled. |
| 61 | - Heartbeat consumer timeout is shorter than realistic bus or boot timing. |
| 62 | - Application updates OD values without atomicity or endian consistency. |
| 63 | |
| 64 | ## Verification |
| 65 | |
| 66 | Before claiming CANopen works: |
| 67 | |
| 68 | - State bitrate, node ID, stack, NMT state, and object dictionary source. |
| 69 | - Confirm boot-up, heartbeat, and SDO read/write of key OD entries. |
| 70 | - Confirm PDO mapping and timing with a CAN trace. |
| 71 | - Confirm heartbeat timeout, EMCY, or bus-off behavior if safety-related. |
| 72 | |
| 73 | ## Example |
| 74 | |
| 75 | User: |
| 76 | |
| 77 | ```text |
| 78 | CANopen 主站读 SDO 返回 abort。 |
| 79 | ``` |
| 80 | |
| 81 | Agent: |
| 82 | |
| 83 | 1. Captures the abort code, index/subindex, node ID, and COB-ID. |
| 84 | 1. Checks OD type, access rights, and backing variable. |
| 85 | 1. Verifies raw CAN and NMT state before changing application logic. |