Overview The CANopen Slave Stack Basic of emotas is a software library that provides all communication services according to the CANopen communication profile CiA301 V4.2.
The stack is developed in ANSI-C and it is MISRA-conform. CANopen-conform devices can be quickly and easily developed or extended with our CANopen Software Stack.
Highlights
- ANSI-C compatible CANopen source code stack
- MISRA-C-conform
- supports all CANopen services of CiA 301
- Layer Setting Service (LSS) CiA305 included
- extensions for further standards available
- available for many CAN controller and CPU types
- comfortable user interface
- widely configurable and scalable
Besides the standard services, extensions for additional communication profiles such as redundant communication (CiA 302), safety relevant communication (CiA 304) as well as device profile implementations like Generic I/O Modules (CiA 401) are available.
A flexible user interface provides functions to evaluate the received data and to use the CANopen services in the network.
To connect the CANopen stack to multiple CAN controllers and CPU types, a well-defined driver interface is used. Using this driver interface the CANopen stack can also easily be adapted to new CAN controllers or CPU types. Also it is possible to substitute hardware platforms with only little effort. The CANopen Stack can be used with various Realtime Operating Systems and as well with Linux (SocketCAN, can4linux) or QNX and also with Real time extensions for Windows.
Besides the function API there is also an Mailbox API available for an easy use with multiple tasks resp. threads. Messages between application modules and CANopen stack are send via mailboxes instead of function calls. This secures a non-blocking communication. An application may consist of several tasks that use the CANopen Stack in parallel.
To save resources the CANopen stack is widely configurable and scalable. The settings for these features are supported by the graphical configuration tool, CANopen DeviceDesigner, which also allows the creation of the object directory and EDS file using a built-in database. As a consequence, changes can be realized fast and easy. Using the unique CANopen DeviceDesigner valuable development time is saved.
Many ready-to-run examples are provided to make the start with the CANopen stack as easy as possible. Additionally a user manual, which describes principles and use cases and a reference manual, which describes each API function in detail belongs to the scope of delivery. The stack is constantly tested with the CANopen Conformance Test for compliance with the specification.
CANopen Profile Support
CANopen defines a large number of device or application profiles that specify the interface and behavior of certain devices. We offer extensions to support the functionalities of these profiles and to provide the data and events to the application in a preprocessed way. Currently extensions for the following profiles are available:
- CiA 401 – device profile for IO modules
- CiA 402 – device profile for drives
- CiA 404 – device profile for measurement devices and closed-loop controllers
- CiA 406 – device profile for encoder
- CiA 413 – interface profile for truck gateways
- CiA 418 – device profile for batteries
- CiA 419 – device profile for chargers
- CiA 437 – application profile for grid-based photovoltaic components
- CiA 443 – Device profile for sub sea instruments (SIIS Level-2)
- CiA 447 – application profile for add-on devices for passenger cars (taxi, police, …)
- CiA 454 – application profile for Energy Management Systems e.g. in LEVs(EnergyBus)
Additionally, the CANopen Stack can be used to develop any CANopen application even for other profiles as mentioned before.
Detailed Feature Overview Supported Controllers
System requirements
- ANSI-C compiler
Scope of delivery/Licensing model
- CANopen protocol sourcecode (ANSI-C compatible)
- ready to run example application
- user manual and reference manual
- site license
- incl. 6 months support ba e-mail or telephone
- optional maintenance agreement available
- optional integration support
- 1 license of CANopen DeviceDesigner included
Source Code Example (excerpt)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
/* initizalize CAN driver */ if (codrvCanInit(125) != RET_OK) { exit(1); } /* initialize Timer */ if (codrvTimerSetup(CO_TIMER_INTERVAL) != RET_OK) { exit(2); } /* initialize CANopen Stack */ if (coCanOpenStackInit(NULL) != RET_OK) { exit(1); } /* register event functions */ if (coEventRegister_NMT(nmtInd) != RET_OK) { exit(3); } if (coEventRegister_ERRCTRL(hbState) != RET_OK) { exit(4); } if (coEventRegister_PDO(pdoInd) != RET_OK) { exit(5); } if (coEventRegister_LSS(lssInd) != RET_OK) { exit(6); } if (codrvCanEnable() != RET_OK) { exit(7); } /* write emcy */ if (coEmcyWriteReq(0x1234, &emcyData[0]) != RET_OK) { exit(15); } /* main loop */ while (1) { /* CANopen main function*/ coCommTask(); /* do application */ appl(); } |