其他分享
首页 > 其他分享> > CANOPEN介绍

CANOPEN介绍

作者:互联网

1.CIA(CAN IN AUTOMINIION)

CIA官网

2.CANOPEN的开源代码库

CANOPEN开源库

有关stm32的移植应用

3.github的质量不错的一个库

Easy CANopen

Easy CANopen is a protocol for shaping the CAN-bus message in a specific way that suits industrail automation.

CANopen is a very difficult protocol to use, due to the complexitivity of CANopen. So therefore I’m writing a Easy CANopen protocol available for free to use on any embedded systems such as STM32, Arduino, AVR, PIC etc or PC.

To learn to build on this project, you need to use my examples. I have written this project in C language because C is an industry standard. The C language dialect I have chosen is C99 and I don't use dynamical memory allocation in this library. So it will work with MISRA C standard.

With this library, you can communicate with valves, engines, actuators, machinery, hardware and all other things that are suitable for industrial automation. I have build up a basic structure of the project and the purpose with my basic structure is to make Easy CANopen work for very small embedded CAN-bus systems.

Looking for SAE J1939 library? https://github.com/DanielMartensson/Open-SAE-J1939/

Getting started

Learn the structure of the project, else you won't be able to understand Easy CANopen. The project structure follows the same pattern. After you have got a basic understanding of the project, you are able to build on it. Keep it simple and follow how the manufatures implement the their CANopen protocol. I don't recomend to implement the complete protocol from CiA beacause they are too heavy. Only use the documents from CiA as reference manual.

After you have understand the structure of the project, then select processor choice in Hardware -> Hardware.h file. Here you can select for example STM32ArduinoPICAVR etc. or if you want to run it on PC first, then select PROCESSOR_CHOICE 0 and run some examples. That's the debugging mode for internal CAN feedback.

How to use the project

#include <stdlib.h>
#include <stdio.h>

/* Include Easy CANopen */
#include "Easy_CANopen/Easy_CANopen.h"

int main() {

	/* Code will update soon */

	return 0;
}

See the examples in Examples folder for more examples.

The structure of the project

a

Easy CANopen functionality

Questions and answers

标签:use,code,CANOPEN,library,project,介绍,Easy,CANopen
来源: https://www.cnblogs.com/breakr-yu/p/16220379.html