Skip to content

CanOpenCobId Class

CiA 301 pre-defined connection set: helpers that translate CANopen node identifiers into the 11-bit COB-IDs used for NMT, SYNC, EMCY, PDO, SDO and heartbeat traffic.

public static class CanOpenCobId

Inheritance Object → CanOpenCobId

Remarks

Constants and helpers only — no state, no allocation. The layout mirrors CiA 301 §7.2: - NMT master command frame — 0x000 - SYNC — 0x080 - EMCY — 0x080 + node-id - TPDO1..4 — 0x180/0x280/0x380/0x480 + node-id - RPDO1..4 — 0x200/0x300/0x400/0x500 + node-id - SDO server → client — 0x580 + node-id - SDO client → server — 0x600 + node-id - NMT error control (heartbeat / bootup) — 0x700 + node-id

Fields

CanOpenCobId.EmcyBase Field

Base COB-ID for EMCY frames: 0x080 + node-id.

public const uint EmcyBase = 128;

Field Value

UInt32

CanOpenCobId.HeartbeatBase Field

Base COB-ID for NMT error control (heartbeat + bootup): 0x700 + node-id.

public const uint HeartbeatBase = 1792;

Field Value

UInt32

CanOpenCobId.MaxNodeId Field

Largest legal CANopen node identifier (CiA 301 §7.2.4).

public const byte MaxNodeId = 127;

Field Value

Byte

CanOpenCobId.MinNodeId Field

Smallest legal CANopen node identifier (CiA 301 §7.2.4).

public const byte MinNodeId = 1;

Field Value

Byte

CanOpenCobId.NmtCommand Field

NMT master command COB-ID (single-broadcast, no node offset).

public const uint NmtCommand = 0;

Field Value

UInt32

CanOpenCobId.Rpdo1Base Field

Base COB-ID for RPDO1: 0x200 + node-id.

public const uint Rpdo1Base = 512;

Field Value

UInt32

CanOpenCobId.Rpdo2Base Field

Base COB-ID for RPDO2: 0x300 + node-id.

public const uint Rpdo2Base = 768;

Field Value

UInt32

CanOpenCobId.Rpdo3Base Field

Base COB-ID for RPDO3: 0x400 + node-id.

public const uint Rpdo3Base = 1024;

Field Value

UInt32

CanOpenCobId.Rpdo4Base Field

Base COB-ID for RPDO4: 0x500 + node-id.

public const uint Rpdo4Base = 1280;

Field Value

UInt32

CanOpenCobId.SdoRxBase Field

Base COB-ID for SDO client → server requests: 0x600 + node-id.

public const uint SdoRxBase = 1536;

Field Value

UInt32

CanOpenCobId.SdoTxBase Field

Base COB-ID for SDO server → client responses: 0x580 + node-id.

public const uint SdoTxBase = 1408;

Field Value

UInt32

CanOpenCobId.Sync Field

SYNC COB-ID.

public const uint Sync = 128;

Field Value

UInt32

CanOpenCobId.Tpdo1Base Field

Base COB-ID for TPDO1: 0x180 + node-id.

public const uint Tpdo1Base = 384;

Field Value

UInt32

CanOpenCobId.Tpdo2Base Field

Base COB-ID for TPDO2: 0x280 + node-id.

public const uint Tpdo2Base = 640;

Field Value

UInt32

CanOpenCobId.Tpdo3Base Field

Base COB-ID for TPDO3: 0x380 + node-id.

public const uint Tpdo3Base = 896;

Field Value

UInt32

CanOpenCobId.Tpdo4Base Field

Base COB-ID for TPDO4: 0x480 + node-id.

public const uint Tpdo4Base = 1152;

Field Value

UInt32

Methods

CanOpenCobId.Emcy(byte) Method

Returns 0x080 + node-id, the EMCY COB-ID.

public static uint Emcy(byte nodeId);

Parameters

nodeId Byte

Returns

UInt32

CanOpenCobId.Heartbeat(byte) Method

Returns 0x700 + node-id, the heartbeat / bootup COB-ID.

public static uint Heartbeat(byte nodeId);

Parameters

nodeId Byte

Returns

UInt32

CanOpenCobId.RpdoDefault(byte, int) Method

Returns the default RPDO COB-ID for pdoIndex (1..4) and nodeId according to the CiA 301 pre-defined connection set.

public static uint RpdoDefault(byte nodeId, int pdoIndex);

Parameters

nodeId Byte

pdoIndex Int32

Returns

UInt32

CanOpenCobId.SdoRx(byte) Method

Returns 0x600 + node-id, the SDO client → server (SDO Rx) COB-ID.

public static uint SdoRx(byte nodeId);

Parameters

nodeId Byte

Returns

UInt32

CanOpenCobId.SdoTx(byte) Method

Returns 0x580 + node-id, the SDO server → client (SDO Tx) COB-ID.

public static uint SdoTx(byte nodeId);

Parameters

nodeId Byte

Returns

UInt32

CanOpenCobId.TpdoDefault(byte, int) Method

Returns the default TPDO COB-ID for pdoIndex (1..4) and nodeId according to the CiA 301 pre-defined connection set.

public static uint TpdoDefault(byte nodeId, int pdoIndex);

Parameters

nodeId Byte

pdoIndex Int32

Returns

UInt32

CanOpenCobId.ValidateNodeId(byte) Method

Validates that nodeId falls in the legal CiA 301 range.

public static void ValidateNodeId(byte nodeId);

Parameters

nodeId Byte

Exceptions

ArgumentOutOfRangeException
Thrown when nodeId is outside [1, 127].