|
|
Implementation of CANopen |
Implementation of CANopen |
Protocol software packages, which are usually offered in the form of company licenses, can be used for the implementation of CANopen in embedded devices. IXXAT, for example, offers a comprehensively tested CANopen protocol stack, proven in many applications, as general C-code or already adapted to a large number of conventional microcontrollers. The CANopen software, available as "Slave" or "Master/Slave" complies with the current CANopen specification DS301, version 4.02. The terms "Slave" and "Master" refer to the different functionality with regard to network management, which is implemented in CANopen in the form of a logical Master/Slave relationship.
The CANopen protocol software already provides the developer with the complete functionality required for communication, network management, general system services and device description. Implementation on the basis of a purchasable protocol stack is therefore reduced to the connection of the application functionality to the protocol stack.
Structure of the CANopen protocol software
The CANopen software package from IXXAT is structured in scalable, modular form in accordance with the various services of CANopen, such as Network Management (NMT), Process Data Objects (PDOs), Service Data Objects (SDOs), Emergency (EMCY), Synchronization (SYNC), SDO-Manager (SDM/SDR), Layer Setting Services (LSS) and Object Dictionary (OBD). The modular structure of the software enables optimum, resource-saving adaptation of the software to the relevant target system. All modules have access to the object dictionary, which represents the central instance of the software package as an interface between the communication interface and the data, parameters and functions of the application.
Access to the CAN controller (e.g. for transmitting and receiving messages) is carried out via a "Data Link Layer" interface, which is also integrated in a separate module (DLL-module). This allows simple adaptation of the CANopen protocol software to different CAN controller implementations.
CANopen Bus |
 |
 |
CAN controller |
Data Link Layer |
 |
Communication Interface
| SDO |
| PDO |
| SYNC |
| MNS |
| NMM |
| ENCY |
| LED |
| FLY |
| SDM, SRD |
| LSS |
|
 |
Object Dictionary (OBD) |
 |
Application (USR) |
Software structure of the IXXAT CANopen stack
Simple configuration and optimized memory requirement
The functionality of the IXXAT CANopen software can be easily adapted to the requirements of the application. For this, the developer only has to activate or deactivate functions/modules by means of "defines" in a central configuration file.
For the implementation of a slave with a reasonably useful functional scope on a 16-bit microcontroller, a memory requirement of approx. 13k ROM and 1k RAM can be assumed as standard values. If the developer has fewer resources available, these values can be further reduced by means of specific modifications.
The important factors are a high degree of flexibility, comprehensive tests and assured long-term maintenance and further development
IXXAT offers its CANopen protocol software as hardware-independent C-source code or already adapted to specific microcontrollers and CAN controllers. The developer therefore has all degrees of freedom and can adapt and manage the software if required, as with an own development.
Since the beginning of the development of the CANopen standard, IXXAT has been actively involved in the various CANopen organizations and is therefore always able to implement the current version of the specifications in its software at an early stage. IXXAT invests not inconsiderable amounts in the continual further development and maintenance of the available CANopen software packages. By means of a software maintenance agreement, our customers can participate in continual further development and benefit from the expert support of our CANopen specialists.
In order to supply customers with high quality products, IXXAT always tests its protocol software with the current conformance test software of the CiA. In addition, IXXAT performs comprehensive tests with special test environments developed by us. This, and the fact that the IXXAT software has been successfully used in the field for many years, guarantees our customers unproblematic, successful implementation of CANopen in their products and its long-term maintenance.
Develop or buy?
Time and again there are developers who consider whether they should develop CANopen protocol software themselves, since the specifications are freely available without license costs. Of course this is an interesting development challenge. However, from an economic point of view it is not at all worthwhile, as CANopen protocol software is offered nowadays by several manufacturers at very attractive prices.
The price for a Slave license, for example, is between EUR 4,000 and EUR 5,000, depending on functional scope and for a Master/Slave license approx. EUR 6,500. Based on this license, any number of devices can then be manufactured in one division or branch. And, of course, the software is supplied as source code.
If you compare these one-off procurement costs with the costs of an own development, it quickly becomes apparent that purchasing is by far the better option, not only in terms of price but also with regard to the development risk, quality and "time-to-market" of an own development.
Based on a price of approx. EUR 4,000 for standard Slave software and an assumed internal hourly rate of EUR 60, the development and testing of own software should not take more than 67 hours, i.e. approximately 1½ weeks.
For a sufficiently tested and documented own development, on the other hand, a development time of at least 4 to 6 months is to be expected, if the full functional scope of the specifications is not implemented. However, it remains to be seen whether an "initial implementation" is already a sufficiently optimized, fault-free product and whether the "subtleties" of the not exactly straightforward CANopen specification are correctly implemented.
The possible setting up of a simple, freely available sample implementation of minimum functionality does little to change this fact. These approaches are not very professional and only really of interest for a training environment.
What does implementation of CANopen involve?
IXXAT supplies its CANopen protocol software with comprehensive documentation and sample programs. Project files are supplied with the sample programs that allow direct integration into the corresponding development environments of the compiler manufacturer. All sample programs can be run directly on a reference platform (evaluation board or IXXAT interface card).
The implementation is carried out as follows:
- Adaptation to the hardware of the target platform (Timer, Interrupt system)
- Creation of object dictionary entries
- Adaptation of configuration file
- Compiling and testing. For testing, the sample application can be transferred to the target platform. This can then also serve as the basis for the own application.
First CANopen implementations on the target system can be set-up within a few days.
Alternatively, implementation can also be carried out by IXXAT. In this case, the requirements are specified together with the customer and then implemented by IXXAT. As the implementation is carried out by experienced engineers who are familiar with the software, this represents a low-cost, fast alternative to self-implementation.
Available CANopen software and tools
An overview of the available IXXAT protocol stacks can be found in the section "Protocol Stacks" or on the IXXAT website.
Useful tools for development and start-up, such as the canAnalyser, the CANopen ConfigurationStudio or the EDS-Editor, can be found in the section "Tools / Interfaces".
|
 | |
|