0
\$\begingroup\$

I'm building a library called Easy CANopen and it will focus on embedded systems due to the portability. Language C.

But storing the Node ID in the Object Dictionary can be done, but I don't know if it's according to the standard, or I have free choice to modify according to the standard.

For the moment, I have put the Node ID in Identity Object at index = 0x1018 and sub index 0x5. Is that OK according to the standard?

enter image description here

\$\endgroup\$
14
  • \$\begingroup\$ Does Node ID belong to any of objects? Isn't the Node ID to be already decided before any objects become available on the bus? Where did the table come from? \$\endgroup\$
    – jay
    Oct 14, 2021 at 19:47
  • \$\begingroup\$ @jay I made it. docs.google.com/document/d/… \$\endgroup\$
    – DanM
    Oct 14, 2021 at 20:19
  • \$\begingroup\$ @jay I can sett the address via NMT commands, but what if I want to save the Node ID? \$\endgroup\$
    – DanM
    Oct 14, 2021 at 20:20
  • \$\begingroup\$ @jay I'm building a CANopen library in C. Do you have intressts in CANopen? \$\endgroup\$
    – DanM
    Oct 14, 2021 at 20:20
  • \$\begingroup\$ How do you set the address using NMT? In order to take NMT, a receiving node must be addressed, addressed using a known Node ID. What does your question, "Do you have intressts in CANopen? ", imply? Are you trying to build an open-source library? "Saving a node ID" does not need to be any of CAN object, I guess. \$\endgroup\$
    – jay
    Oct 15, 2021 at 1:17

2 Answers 2

1
\$\begingroup\$

Why invent the wheel if one is invented for you already?

It is called Layer Setting Services (LSS), and is designed specifically for setting Node ID and even changing bus bitrate dynamically.

\$\endgroup\$
4
  • \$\begingroup\$ Because most of the CANopen libraries are not for embedded, or very heavy. \$\endgroup\$
    – DanM
    Nov 21, 2021 at 22:00
  • \$\begingroup\$ I wasn't talking about libraries. I was talking about protocol. You cannot claim you are writing your own "CANOpen library" if you do not follow CANOpen standards. \$\endgroup\$
    – Maple
    Nov 22, 2021 at 1:31
  • \$\begingroup\$ The reason most CANOpen stacks are heavy is that the CANOpen protocol is over bloated. Yet, most of the stacks we evaluated were written specifically for embedded applications and worked there just fine. We ended up writing our own stack couple years ago and it supports about 30% of the protocol. For this reason nowhere in our documentation you can find word "CANOpen", despite the fact that we can work with about 90% devices out there. \$\endgroup\$
    – Maple
    Nov 22, 2021 at 1:40
  • \$\begingroup\$ Also, entry level MCUs usually do not have CAN controller hardware. By the time you find one that does, you usually have enough RAM/Flash/Clock to run even heaviest stack. \$\endgroup\$
    – Maple
    Nov 22, 2021 at 1:53
0
\$\begingroup\$

I place the Node ID in Identity Object (0x1018) at Object Dictionary at sub index 0x5 because can CANopen standard for Identity Object is

  • Sub index 0x0 = Highest sub index
  • Sub index 0x1 = Vendor ID
  • Sub index 0x2 = Product code
  • Sub index 0x3 = Revision number
  • Sub index 0x4 = Serial number

So I think Node ID will fit at sub index 0x5.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.