#DEUTSCH
>>

<< CANopen Slave Stack Source Code <<

Overview The CANopen Slave Stack Basic of emotas is a software library that provides all communication services according to the CANopen communi­cation 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

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:

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

Scope of delivery/Licensing model

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();
}

  |||||

// GENERAL

<< Top ten reasons for emotas <<

Choose emotas as your development partner! Why? Here are 10 good reasons:   =>

// [:DE]DIENSTLEISTUNGEN[:EN]SERVICES[:]

<< Implementation support <<

You wish to integrate our communication protocol stacks into your device yourself – but you need some   =>




By continuing to use the site, you agree to the use of cookies. Get more

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen