-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create CANopen abstraction layer #223
Comments
SDO protocolFrom 3.2.3, Service Data Objects (SDO):
Apparently, iPOS drives do not support block transfers (www.can-cia.org). Comprehensive examples on using both expedited and segmented transfers are given on this site. Again, the object dictionary for iPOS drives is designed in such a way that only expedited transfers are needed, with very little exceptions (see object 1008h, Manufacturer Device Name).
We vastly abuse this protocol in terms of querying current drive status: most notably, modes of operation and error registers listed in section 5.4, Error monitoring. Those should be treated in an event-driven manner via TPDOs. For non-frequent, query-like requests (e.g. get current limits, set reference velocity&acceleration, and so on), SDO will prevail. Implementation notes:
|
SDO abstraction layer ready at ebcfe13. Supports normal (segmented) and expedited transfers for integer types and strings. Expects response/confirmation with timeout (#159), parses abort codes. I decided to leave the dictionary .ini file thing out. All SDO dictionary data is employed in the code itself, anywhere it is actually necessary. This file would cover much more than we actually need, it requires certain effort to understand and learn the exact format, and I doubt that YARP's .ini parser conforms to it anyway. |
Initial implementation available in libraries/CanBusSharerLib (merged from #229). I initially intended to follow the null object pattern in the |
PDO protocolFrom 3.2.4, Process Data Objects (PDO):
Object mapping is exhaustively described in several places, refer to the linked resources in the issue description and objects 16xxh/1Axxh. Objects 1400h through 1403h and 1800h through 1803h describe communication parameters of default RPDOs and TPDOs, respectively. In this way, the following transmission types can be configured:
This family of objects also provide access to specific parameters such as inhibit time, event timer and SYNC start value (only cyclic synchronous TPDO). iPOS drives are only permitted to perform event-driven RPDO and TPDO, and acyclic synchronous TPDO; at least, I can tell the user manual omits communication parameters that refer to the remaining transmission types. |
I can confirm iPOS drives, at least at firmware F508M/F509M, do support cyclic synchronous TPDOs. They don't support subindex 06h in transmission type comms params, i.e. SYNC start value, though. |
EMCY protocolFrom 4.1.4, Emergency messages:
From CiA 301, 7.2.7.1, Emergency object usage:
iPOS drives do not define Object 1029h: Error behavior object (concerns the behavior of the NMT state machine on any severe error condition). |
NMT protocolFrom 4, Network Management:
From CiA 301, 7.3.2, NMT state machine:
From CiA 301, 7.3.2.2.1, NMT state initialisation:
|
SYNC protocolFrom 4.1.3.4, Synchronization between devices:
From 7.2.5, Synchronization object (SYNC) in CiA 301:
This CAN feature is very much linked to PDO protocol and, more precisely, to synchronous transmission types (either RTR, cyclic or acyclic). |
TIME protocolFrom 4.1.3.4, Synchronization between devices:
From https://www.can-cia.org/can-knowledge/canopen/special-function-protocols#c1947:
From Elmo Motion Control CANopen DS 301 Implementation Guide, Chapter 8: SYNC and Time STAMP:
From O. Pfeiffer et al., Embedded Networking with CAN and CANopen, p. 374 (object 1013h):
|
Boot-up protocolFrom 4.1.3.3, Boot-up protocol:
From https://www.can-cia.org/can-knowledge/canopen/error-control-protocols#c2671:
Note certain hardware supports an "extended boot-up" (H. Boterenbrood, CANopen: high-level protocol for CAN-bus, v3.0). The iPOS drives don't. |
Heartbeat protocolFrom 4.1.3.2, Heartbeat protocol:
From https://www.can-cia.org/can-knowledge/canopen/error-control-protocols#c2670:
From https://www.canopensolutions.com/english/about_canopen/Heartbeat-service.shtml:
iPOS drives provide the following objects:
Also, EMCY message with code 0x8130 reports a "Life guard error or heartbeat error". However, I presume both 6007h and said EMCY are aimed at iPOS nodes configured as heartbeat consumers. |
Node- and life-guarding protocols (legacy)From 4.1.3.1, Node guarding protocol:
From https://www.can-cia.org/can-knowledge/canopen/error-control-protocols#c2672
From https://www.ni.com/es-es/innovations/white-papers/13/the-basics-of-canopen.html:
See also 7.2.8.2.2, Error control services in CiA 301. |
Commit fbeb6a3 removes the dependency of EMCY and NMT objects on an SDO client instance. So, no more |
I had to take another design decision regarding the ICanBusSharer.hpp header):
Not fully sure about it, but I chose the second option for simplicity's sake: ea9546c. |
Eventually, I decided to pick the hard way and go for the first option: commit 9182ca2 splits old CanBusSharerLib into itself, StateObserverLib and CanOpenNodeLib. Also, those three targets are now being exported and installed by CMake for casual consumers.
So, most of old CanBusSharerLib is now CanOpenNodeLib and the |
Known open-source implementations:
Moar links:
Documents:
Also, CiA 402 / IEC / UNE-EN mappings (ref, UC3M access via AENOR):
The text was updated successfully, but these errors were encountered: