Embedded Control Systems Design/Field busses

This chapter looks at the inter-system communication components that occur in the embedded motion systems this book is focusing on.


 * Serial lines
 * Controller Area Network (CAN)
 * Profibus
 * Realtime ethernet (RTnet, EtherCat, ProfiNet...)
 * Devicenet
 * Inter-Integrated Circuit (I2C)
 * Serial Peripheral Interface (SPI)
 * Firewire

Description
A field bus is a part of a system which provides the communication between several components in that system (for example an actuator or a sensor). A bus is a cable with an interface on the two ends. A bus system is a collective noun for all buses, this means that there is a distinguish between:


 * Factory buses (or a factory network)
 * CPU buses
 * Field busses

Factory buses
A factory bus supports the management. The data of consequence for planning, logistic, quality, etc. will be sent over this network. A factory bus has been developed especially for the connection between several computers (for example: PCL, VME, etc.).

CPU buses
See the chapter about processors

Field buses
Three communication types exist for field buses, namely serial, parallel and wireless buses. The difference between serial and parallel field buses is principally the quantity of data that can be sent in one cycle. For a serial bus the process of sending data is one bit at one time. This is in contrast to parallel communications, where all the bits of each symbol are sent together. Wireless field busses are nowadays still in development. Because of this, the use of wireless field buses is limited in control systems.

Why not use the same network everywhere?
Networks such as TCP/IP and Novell have already been on the market for a long time. Much software has been developed for it, and the paediatrics diseases are already solved. Field buses are still “young” networks which are aimed, in contrast to standard networks, to transport small quantities of information. Field busses need less hardware than standard networks. Because of this, they can be incorporated in the smallest sensors and actuators. Field bus applications secure special requirements to the hardware, for example intrinsic safe, voltage supply over the network, very high protection against electric jamming, galvanic separation, control at several places, etc.

OSI model
The operation of the network program can be described by the OSI layer model. The OSI, or Open System Interconnection, model defines a network frame for implementing protocols in 7 layers. Control is passed from one layer to the next, starting at the application layer in one station, proceeding to the bottom layer, over the channel to the next station and back up the hierarchy.

In each of these layers there are certain rules. Two computer systems that want to make contact with each other, must keep themself to these rules. Otherwise there will be misunderstandings and the communication between both will go wrong.

Transport:

Layer 1: Physical
In this layer is described which sort of cable (serial/parallel/wireless) with which bit rate is used. This layer conveys the bit stream through the network at the electrical and mechanical level. Fast Ethernet and RS232 are protocols with physical layer components.

Layer 2: Data link
This layer fixes how and at which moment a message from a computer to another computer can be sent over the same cable. Also defining the addresses and the format of the messages belongs to the agreements of this layer. The data link layer is divided into two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. The MAC sub layer controls how a computer on the network gains access to the data and permission to transmit it. The LLC layer controls frame synchronization, flow control and error checking.

Layer 3: Network
This layer provides switching and routing technologies, creating logical paths, known as virtual circuits for transmitting data from node to node. If several networks are put together it is necessary to make agreements: -How does the general addressing happen and on how is the route chosen that the message must follow?

Layer 4: Transport
This layer provides transparent transfer of data between end-systems, or hosts, and is responsible for end-to-end error recovery and flow control. In this way we obtain a reliable network connection. It ensures complete data transfer.

Application (control systems):

Layer 5: Session
This layer establishes, manages and terminates connections between applications. There are three kinds of sessions in the OSI-model: - ‘one way’: the information will be sent in one direction. - ‘two way simultaneously’: both participants can send and receive at the same time (full duplex). - ‘two ways alternate’: both sides can various send and receive (half duplex).

Layer 6: Presentation
This layer provides independence of differences in data representation (e.g., encryption) by translating from application to network format, and vice versa (for example: from ASCII to EBCDIC).

Layer 7: Application
This layer specifies which applications are available to the user. Everything at this layer is application specific. The user programs are situated in this layer with which you can read files on another computer, run a process, etc.

Typical usages of field buses at the application levels
There are several typical usages of field buses, the differences are mainly in the way they handle information. The different types in control systems are:

This type of field bus acts as a multiplexer. The data bits are offered to the network and further transported to the outputs elsewhere in the network. The master can send a task to the slave via the bus. The slave processes this task and gives an answer. Slaves can’t communicate mutually. A field bus with several masters. A client gives a task to the server. These will carry out the task first and answer afterwards. A station can be both client and server at the same time and so they can send several tasks at the same time. A field bus with several masters where each consumer station is interested in a certain piece of data, while the producer station provides the information to the consumer that wants to subscribe to the producer data.
 * Remote I/O (central controllers, distributed sensors, machine tools with CAN I/O):
 * Master/slave (master controller, distributed slave controllers)
 * Client/server :
 * Consumer/producer:

Field bus protocol
The field bus interface encodes the commands or the state of an in- or output to digital information which is arranged for transport over the cable.

Properties of field buses

 * Short response time
 * Large reliability
 * Cheap wiring
 * Open standards
 * Simple protocols
 * Low price per connection

Response time:

In real time: deterministic response time (for example CAN)

-very short response time: For the link PLC - periphery Examples: Profibus DP, CAN and Interbus-S.

-average response time: For the link PLC - supervision system Example: Profibus FMS

Wiring for field busses:

The trend is as follows:


 * parallel -> serial -> wireless:

-previous coax (Ethernet cable)

-often RS485

advantages: cheap, easy to install

disadvantage: no high speeds

-also glass fiber

advantage: large distances possible

Open standard

-why:

To make communication possible between heterogeneous systems from different vendors that exists for different OSI layers

-Examples:

DIN 19245 (Profibus), IEEE 1118 (Bitbus) ISO/DIS 11519-1 AND ISO/DIS 11898 (CAN)

-protocols in hardware or software -applicable in devices -not arranged for link of heterogeneous devices -Example: CAN
 * field bus with layer 1 and layer 2

-more complex protocols in software -arranged for link of heterogeneous apparatuses -Example: Profibus-FMS
 * field bus with layer 1, layer 2 and layer 7

Topology
The construction of a network that is built by some field buses can take several physical forms. Such a form is called a topology of a network. Some examples of different topologies are:
 * Star
 * Line
 * Tree
 * Mono-master
 * Multi-master

Advantages of field buses

 * Only a few cables necessary
 * No problems with 4-20 mA conversion (direct communication with PLC or PC.)
 * More intelligence possible in equipment
 * Simple to extend without extra wiring
 * Maintenance and jamming can be searched through the network
 * Digital technique

Disadvantages of field buses

 * There is not yet a standardization of the user interface
 * Sometimes you must contact several manufacturers for support when you have got a problem

Aspects to consider when choosing a field bus

 * The maximum bus length (see overview)
 * Number of clients
 * Data rate
 * Topology
 * Price
 * The time (difficulty) to add/remove a client
 * The maximum cycle time
 * Compatibility between the different field buses
 * Stability of the system
 * Applicability for communication between controllers, PC’s, and/or intelligent equipment
 * Availability of interface cards for PC’s
 * Maximum number of repeaters
 * Maximum number of nodes without using repeaters
 * Maximum number of nodes with use of repeaters
 * Maximum data in one message
 * Maximum number of masters

The most used different field buses

 * Interbus
 * Profibus
 * CAN
 * Ethernet
 * EtherCAT
 * AS-Interface
 * DeviceNet

Overview of the most used bus systems
Bus systems have been developed mostly to be used in a certain scope. In the table below an overview is given along with the specifications of the different bus systems.