Basic principle and application of CANopen (I) -- overview of can and its high-level protocol

Programmer base 2021-10-14 04:33:25

from OSI From the perspective of network model, it is the same as , Generally, fieldbus network only realizes the second 1 layer ( The physical layer )、 The first 2 layer ( Data link layer )、 The first 7 layer ( application layer ). Because fieldbus usually includes only one network segment , Therefore, there is no need to 3 layer ( Transport layer ) And the 4 layer ( The network layer ), There is no need for a second 5 layer ( The session layer ) The first 6 layer ( Description layer ) The role of .

CAN(Controller Area Network) Fieldbus only defines the second 1 layer 、 The first 2 layer ( see ISO11898 standard ); In actual design , These two layers are completely implemented by hardware , Designers no longer need to develop relevant software for this (Software) Or firmware (Firmware).

meanwhile ,CAN Only physical layer and data link layer are defined , No application layer is specified , It's not complete in itself , You need a high-level protocol to define CAN In the message 11/29 Bit identifier 、8 Use of byte data . and , be based on CAN Bus is used in industrial automation , There is a growing need for an open 、 Standardized high level agreements : This protocol supports a variety of CAN Interoperability of vendor equipment 、 Interchangeability , Can be realized in CAN Provide standard services in the network 、 Unified system communication mode , Provide device function description mode , Perform network management functions .

application layer (Application layer): It can provide a set of useful services and protocols for every effective device in the network .

Communication description (Communication profile): Provide configuration equipment 、 Meaning of communication data , Define data communication mode .

Equipment description (Device proflile): For the device ( class ) Add code compliant behavior

The following sections will introduce the methods based on CAN High level agreement for :CAL Agreement and based on CAL Protocol Extended CANopen agreement .CANopen Agreement is CAN-in-Automation(CiA) One of the criteria defined , And it was widely recognized soon after its release . Especially in Europe ,CANopen The agreement is considered to be based on CAN The leading standard in the industrial system . Most important equipment types , For example, digital and analog input and output modules 、 Driving equipment 、 Operating equipment 、 controller 、 Programmable controller or encoder , Are called “ Equipment description ” Described in the protocol ;“ Equipment description ” Different types of standard equipment and their corresponding functions are defined . rely on CANopen Protocol support , Devices from different manufacturers can be configured through the bus .

stay OSI In the model ,CAN standard 、CANopen The relationship between protocols is shown in the figure below :

1、CAL  agreement

CAL(CAN Application Layer) The agreement is currently based on CAN One of the high-level communication protocols , The earliest by Philips The medical equipment department formulates . Now? CAL By independent CAN User and manufacturer groups CiA(CAN in Automation) The association is responsible for managing 、 Develop and promote .

CAL Provides 4 An application layer service function :

CMS (CAN-based Message Specification)

CMS Provides an open 、 Object oriented environment , Application for implementing users .CMS Provide variable based 、 event 、 Objects of domain type , To design and specify a device ( node ) How the functions of are accessed ( for example , How to upload and download more than 8 A set of bytes of data ( Domain ), And it has the function of terminating transmission ).

CMS from MMS (ManufacturingMessage Specification) inherited .MMS yes OSI Application layer specification for remote control and monitoring of industrial equipment .

NMT (Network ManagemenT)

Provide network management ( Such as initialization 、 Start and stop nodes , Detect failed nodes ) service . This service adopts the master-slave communication mode ( So there's only one NMT Master node ) To achieve .

DBT (DistriBuTor)

Provide dynamic allocation CAN ID( The official name is COB-ID,Communication Object Identifier) service . This service adopts the master-slave communication mode ( So there's only one DBT Master node ) To achieve .

LMT (Layer ManagemenT)

LMT Provide services for modifying layer parameters : A node (LMTMaster) You can set another node (LMT Slave) A layer parameter of ( Such as changing the of a node NMT Address , Or change CAN Bit timing and baud rate of the interface ).

CMS Defines... For its message 8 Priority , Each priority has 220 individual COB-ID, Range from 1 To 1760. The remaining signs (0,1761-2031) Reserved for NMT,DBT and LMT, See the table below

Notice this is CAN2.0A standard ,11 position ID Range [0,2047], For historical reasons, it is limited to [0,2031]. If you use CAN2.0B standard ,29 position ID It doesn't change the description ; In the table 11 Bits map to 29 position COB-ID The highest of the 11 position , So that... In the table COB-ID The range becomes much larger

Mapping to CAL Of services and objects COB-ID(11 position CAN identifier )

2、CANopen

CAL It provides all network management services and message transmission protocols , But there is no definition CMS The content of the object or the type of object being communicated ( It only defines how, No definition what). And that's what CANopen The breakthrough point .

CANopen Is in CAL Developed on the basis of , Used CAL Subset of communication and service agreements , An implementation scheme of distributed control system is provided .CANopen While ensuring the interoperability of network nodes, the functions of nodes are allowed to expand at will : Or simple or complex .

CANopen The core concept of is the device object dictionary (OD:Object Dictionary), On other fieldbus (Profibus,Interbus-S) This device description form is also used in the system . Be careful : The object dictionary is not CAL Part of , But in CANopen Implemented in .

About Hongke Industrial Communication

Hongke is a company in the field of industrial automation , In particular, industrial bus communication industry experience more than 10 Hi tech company of . Hongke industrial communication business department With world-famous industrial communication experts PEAK-System,Hilscher,Kunbus,SYS TEC,Koenig-Pa,Port,Copa-data,TenAsys,SoC-e、RELYUM】 And so on , Provide the industry's top level industrial bus protocol hardware and software solutions , Protocol types include 【CAN、CANopen、EtherCAT、Profibus、Profinet、EtherNET/IP、TSN】 etc. , Product type contains code 、 Software 、 chip 、 card 、 Module etc. . Hongke industrial communication is customer-oriented , Based on technical capability , For domestic enterprises to provide the most suitable products and the most satisfactory service . Especially in industry 4.0 In a big environment , Hongke industrial communication keeps pace with the times , Launched TSN( Time sensitive networks ) Solutions for , The latter will play the role of a highway in promoting the interconnection of all things .

Wechat scan , Pay attention to us to get more industrial communication dry goods ~

Click the link , Focus on our real-time news :www.hongconsys.com

Please bring the original link to reprint ,thank
Similar articles