Engineering Autonomous Vehicles and Robots. Shaoshan Liu. Читать онлайн. Newlib. NEWLIB.NET

Автор: Shaoshan Liu
Издательство: John Wiley & Sons Limited
Серия:
Жанр произведения: Программы
Год издания: 0
isbn: 9781119570547
Скачать книгу
up-to-date data between nodes. Embedded networks are different from PC-based networks in that they have a closed configuration and do not change once they are assembled in the production product. This eliminates the need for additional mechanisms to automatically discover and configure devices at run time.

CAN FlexRay
Bandwidth 1 Mbps 10 Mbps
Number of channels 1 2
Frame data length 0~8 0~254
Communication Dynamic arbitration TDMA
Complexity Low High
Composability No Yes
Flexibility One topology Many different topologies

      CANopen is a communication protocol and device profile specification for embedded systems used in automation. In terms of the OSI model (shown in Figure 2.1), CANopen implements the layers above and including the network layer. The CANopen standard consists of an addressing scheme, several small communication protocols, and an application layer defined by a device profile [5].

      The CANopen communication protocol has support for network management (NMT), device monitoring, and communication between nodes, including a simple transport layer for message segmentation and desegmentation. The lower level protocol implementing the data link and physical layers is usually CAN, although devices using some other means of communication (such as Ethernet Powerlink, EtherCAT) can also implement the CANopen device profile.

      The basic CANopen device and communication profiles are given in the CiA 301 specification released by CAN in Automation. Profiles for more specialized devices are built on top of this basic profile, and are specified in numerous other standards released by CAN in Automation, such as CiA 401 for I/O modules and CiA 402 for motion control.

      Every CANopen device has to implement certain standard features in its controlling software. A communication unit implements the protocols for messaging with the other nodes in the network. Starting and resetting the device is controlled via a state machine. It must contain the states Initialization, Pre-operational, Operational, and Stopped.

      The application part of the device actually performs the desired function of the device, after the state machine is set to the operational state. The application is configured by variables in the object dictionary and the data are sent and received through the communication layer.

      2.4.1 Object Dictionary

      CANopen devices must maintain an object dictionary, which is used for configuration and communication with the device. An entry in the object dictionary is defined by:

       Index, the 16-bit address of the object in the dictionary.

       Object name (Object Type/Size), a symbolic type of the object in the entry, such as an array, record, or simple variable.

       Name, a string describing the entry.

       Type, this gives the datatype of the variable (or the datatype of all variables of an array).

       Attribute, which gives information on the access rights for this entry, this can be read/write, read-only, or write-only.

       The Mandatory/Optional field (M/O) defines whether a device conforming to the device specification has to implement this object or not.

      The basic data types for object dictionary values such as Boolean, integers, and floats are defined in the standard (their size in bits is optionally stored in the related type definition, index range 0x0001–0x001F), as well as composite data types such as strings, arrays, and records (defined in index range 0x0040–0x025F). The composite data types can be subindexed with an 8-bit index; the value in subindex 0 of an array or record indicates the number of elements in the data structure, and is of type UNSIGNED8.

      2.4.2 Profile Family

      CANopen defines a standardized application for distributed industrial automation systems based on CAN. The CANopen profile family is based on a “Communication Profile,” which specifies the basic communication mechanisms and on a standardized form for describing the functionality of devices.

      The most important device types such as digital and analog I/O modules, drives, operating devices, sensors, or programmable controllers are described by so-called “Device Profiles.” In the device profiles the functionality, parameters, and data of standard devices of the corresponding types are specified. Based on the standardized profiles, devices of different manufacturers can be accessed via the bus in exactly the same manner. Therefore devices of different manufacturers are interoperable and exchangeable.

      You can describe the functionality and characteristics of a CANopen device by means of an “Electronic Data Sheet” (EDS) using an ASCII format. An EDS must be understood as a kind of template for describing all the data and features of device as accessible from the network. The actual device settings are described by the so-called “Device Configuration File” (DCF). The EDS and DCF can be provided in the form of a data file, which can be downloaded from the Internet or stored inside the device.

      2.4.3