Hello everybody,
I'm a fan of CANopen and author of
CANopenNode. Michael invited me here after a long
conversation.
CANopenNode runs perfectly on microcontrollers (16bit+) and now is aproaching to Linux. It has some master functionality. A "competitor" is CANfestival. Both are free software.
CANopen is widely used by small to medium sized manufacturers. It has a large set of standards - device profiles for: automation devices (generic IO, drives, encoders), lifts, medical devices, plastic machinery and much more. For a relative small fee for membership company gets full access to all standards with no restrictions. Some standards are freely
available, like CiA301(main standard), CiA401(generic IO), etc. Unfortunately CiA402(drives) is not free for public, but some manufacturers provide very well description of that standard for their drives (for example
EPOS2). CiA402 is also internationally standardized under DIN EN 61800-7-1,
DIN EN 61800-7-201:2015(most important) and DIN EN 61800-7-301.
Here is preview of older edition (There are two editions of the standards and also of the CiA402, quite different)
There is a myth, that CAN suffer from bandwidth. It is not true. Well, it depends, how smart communication is implemented. If there is still lack of bandwidth, then CAN FD was freshly developed (flexible data rate, higher bandwidth, more data in single CAN message). CAN chips are cheap as they are produced in large quantities. They are smart - once the device successfully transmits a message, it can be sure it was successfully received on all other (healthy) devices.
CANopen device according to CiA402 is capable of autonomous positioning. There are different capabilities in different devices. Besides homing, velocity and torque modes there are three positioning modes possible. In each case drive receives Target position and controlword and transmits actual position and statusword:
- Profile position mode: Drive receives one target position and start signal. It calculates ramps and drive autonomously. Reports "position reached". Simple to use, but not suitable to synchronized movement of multiple axes.
- Interpolated positioning mode: Interesting mode, will be described below.
- Cyclic synchronous position mode: Quite simple, requires higher bandwidth.
How do I suggest to implement CANopen drives in machinekit:
Machinekit generates trajectory for each axis. It sends interpolation points (delta time, position, velocity, 8bytes) to drives. It is third order curve, so not much points are necessary. They are sent ahead (10 to 100 ms), so there is no need for hard real time. Controlword is faster and it starts movement of all drives simultaneously. Controlword can also perform a quick stop in case of emergency. Of course all drives are perfectly synchronized. This is possible with Interpolated positioning mode. Very nice description is in EPOS2-Firmware-Specification from the link above, page 48. I can help with some equations, if there will be interest. It is also easy to get fine interpolation points from spline, so implementation of the CANopen (and Arduino) based (stepper) drive is not so unreachable.