You are on page 1of 13

Table of Contents

Description ..............................................................................................................................................2
Basic Bus Communication requirements................................................................................................3
CAN- Addressing ..................................................................................................................................... 4
Difference between CAN and LAN(Local Area Network)........................................................................7
Mission Critical data handing in CAN......................................................................................................9
References ............................................................................................................................................10
Answer for Question (b)........................................................................................................................11

Table of figures
FIGURE 1: THE CAN DATA-FLOW MODEL ....................................................................................... 4
FIGURE 2: CAN LAYERS ............................................................................................................... 4
FIGURE 3: STANDARD CAN: 11-BIT IDENTIFIER ................................................................................ 5
FIGURE 4: EXTENDED CAN: 29-BIT IDENTIFIER ................................................................................. 5
FIGURE 5: LOCAL CAN NETWORK CONNECTS TO AN ETHERNET-CAN GATEWAY ........................................ 8

1
CAN(Controller Area Network)

Description
CAN is a serial bus network of microcontrollers which connects devices, sensors and
actuators in a main system or sub system for real time control applications without having
any addressing scheme used in controller area networks as in the sense of conventional
addressing in networks such as Ethernet. The main advantage of this network can be
mentioned as the low development cost. However, by using an identifier that is unique to the
network, messages are broadcast to all the nodes in the network. Based on the identifier, the
individual nodes decide either to process or not to process the message. What is more, they
determine the priority of the message in terms of competition for bus access. Therefore this
method allows for uninterrupted transmission when a collision is detected, unlike Ethernets
that would stop transmission upon collision detection.

Because of all devices which connected to a single shared bus are allowed to start a
transmission, a Carrier Sense Multiple Access (CSMA) / Collision Avoidance (CA) scheme
is implemented in the CAN model. There is a priority based arbitration scheme to decide
which one will be granted permission to continue if two (2) or more devices start transmitting
at the same time.

As this is a very robust protocol with error detection and signaling, self checking and fault
confinement, faulty CAN data and remote frames are retransmitted automatically. On the
other hand, bitrates up to one (1) Mbit/s are not impossible at networks length below 40m.
Decreasing the bit rate allows longer network distances as well; as an example 250 kbit/s at
250m. [1]

There are several CAN physical layer standards such as;

 ISO 11891-2 : CAN High Speed


 ISO 11898-3 : CAN Fault Tolerant (Low Speed)
 ISO 11992-1 : CAN Fault Tolerant for Truck / Trailer Communication
 SAE J2411 : Single Wire CAN (SWC) [1]

2
The ISO 11898-2 uses a two wire balanced signaling scheme is the most common
physical layer in car power train applications and also industrial control networks.

The ISO 11898-4 is based on the CAN data link layer protocol providing a system
clock for the scheduling of messages whose standard defines the time triggered
communication on CAN (TTCAN).

What is more, there were created many implementations of higher layer protocols as
the CAN standard does not include tasks of application layer protocols, such as flow control
and also device addressing and transportation of data blocks larger than one message though.

Examples :- DeviceNet, CANopen, SDS, CAN Kingdom

Basic Bus Communication requirements

To initialize communication on a CAN bus, minimum of two (2) nodes must be used.
The transmitting controller will send out an error flag if the message is not properly ACKed
since a transmitted message must be acknowledged in the ACK bit by a receiver.

3
CAN- Addressing

The CAN data flow model is like follows;

Figure 1: The CAN Data-Flow Model

A transmitting node places data on the network for all nodes to access since CAN is a
broadcast system requiring updated data allow the message to pass through a filter that is set
by the network designer like shown in the above diagram, that means messages from certain
nodes can pass and all others are ignored. Furthermore, much of a node’s microcontroller
processing time will be spent sorting through messages that are not need if this filter is not
used by a system designer.

Figure 2: CAN Layers


Figure 3: Standard CAN: 11-Bit Identifier [1]

Figure 4: Extended CAN: 29-Bit Identifier [1]

SOF :- Start Of Frame


RTR :- Remote Transmission Request
SRR :- Substitute remote request
IDE :- Identifier Extension Bit
DLC :- Data Length Code
CRC :- Cyclic Redundancy Check
ACK : - Acknowledgement
EOF :- End Of Frame
IFS :- Inter Frame Space [2]

Every message begins with the 11 bit or 29 bit identifier shown in above diagrams can
be used by a system designer to identify the content of a message; such as temperature or
shaft position. In this way, messages can be prioritized by a designer as well. Likewise, an
automotive message with brake information is given a higher priority identifier than a turn
signal identifier.

CAN’s multiple reception provides for the concept of modular electronics and the
synchronization of distributed control processes what data needed by several nodes is
broadcast on the network in such a way that it becomes unnecessary for a node to know
origin of the data. Since data transmission is not dependent upon the availability of a specific
type of node, it allows for easy servicing and upgrading networks also.
On the other hand, system flexibility is achieved as a result of the content oriented
addressing scheme which enables the reconfiguration of an existing CAN network without
making any hardware or software modifications. Likewise, a new node may be added that
only receives operating data from the other transmitting nodes in a system and also never
sends data.

6
Difference between CAN and LAN(Local Area Network)

Yet CAN implementations are more cost effective as CAN is much far superior to
conventional serial technologies such as RS232 in regards to functionality and reliability. It is
designed for real time requirements and with its 1 (one) Mbit/s baud rate can easily beat a
100 (hundred) Mbit/s TCP/IP connection when it comes to short reaction times, timely error
detection, quick error recovery and error repair while TCP/IP is designed for the transport of
large data amounts.

The use of CAN is restricted to small sized embedded multi processor applications
due to a limited data length of 8 (eight) bytes per message where the transfer of raw process
data such as digital or analog I/O information is sufficient. Such as CANopen or DeviceNet
what are higher layer protocols based on CAN are available in order to allow data transfer of
unlimited length and to use CAN for industrial machinery, including motion control.
Furthermore, with or without the use of higher layer protocols is the limited physical network
length that is called as another restriction of CAN. The maximum bus length depends on the
chosen baud rate which is roughly about 2000 feet at 125kbit/s down to 120 feet at 1Mbit/s.

The greatest benefit of Ethernet comes with the use of the TCP/IP protocol stack and
also the possible connection to a company intern LAN (Local Area Network) or WAN (Wide
Area Network) or even worldwide through the internet. Physically larger networks are
allowed by Ethernet plus TCP/IP with far greater information carrying capacity than CAN.
When it is compared to CAN, Ethernet does not support non destructive priority arbitration
and message latency or deterministic behavior cannot be guaranteed. Therefore Ethernet is
still suitable for field bus applications where real time responses through the network are not
important.

7
Ethernet network cards are low cost items due to the extensive use in PCs where
CAN-PC interface cards are more expensive. The price for a CANopen or DeviceNet
protocol stack can range between a few hundred Dollars for an API up to several thousand
Dollars for source code while TCP/IP sockets are provided within the most popular operating
system such as Windows or Linux. However, the CAN technologies still have a considerable
edge in items of implementation into embedded devices when it comes to implement either
CAN / CANopen / DeviceNet or Ethernet-TCP/IP.

The advantages of both technologies can be combined. For instance, in a system that
requires real time responses within the network plus means to provide service and
maintainability over long distances. For the understand, the way local CAN network connects
to an Ethernet gateway shown below;

Figure 5: Local CAN network connects to an Ethernet-CAN gateway


[3]
Mission Critical data handing in CAN

CAN was created for automotive use and its most common application is in vehicle
electronic peripherals networking. Then the companies realized the reliability of CAN and
adopt it to the automation of systems in production line. CAN also adopted in aircrafts with
flight state sensors, navigation systems, research PCs in the cockpit, aircraft engine control
systems such as fuel systems, pumps, and linear actuators. CAN is used in medical facilities
also because of its dependability of it as an embedded system.

When CAN comes in automobiles, it is very important to give a higher priority to the
brake system of them other than fuel injection system and other stuff why because if some
malfunctioning occurs, it may cause to a critical disaster. What is more, if an accident
happens suddenly, then the high priority should get connected to the fuel inlet valve.
Therefore the fuel inlet valve will stop itself immediately if an accident occurs.

9
References

[1] http://focus.ti.com/lit/an/slla270/slla270.pdf

[2] http://www.semiconductors.bosch.de/pdf/can2spec.pdf

[3] http://www.copperhillmedia.com/cannewsletter/article3.html

10
Answer for Question (b)
i)

The process control and monitoring system to be implemented in the electroplating factory will
allow the factory to be fully automated thus reducing errors, wastage and improve productivity of
the factory. In order to implement the automated system the requirements of the application have
been identified as the following:

1. Due to the increasing number of process controls and system diagnostics that need to be
monitored, using a centralized system for all the process controls and diagnostics is not
feasible. The new system should be able to have individual nodes in a distributed control
architecture that individually are able to independently provide both control and diagnostics
functions for the machine parts under its control.
2. The individual nodes have to be connected in a control-architecture through a gateway and
should be able to be accessed via a Human machine interface locally or from a mobile unit
where the operator can monitor the running of the factory as well as perform
troubleshooting for each individual node as well as the entire network as a whole.
3. A data management system needs to be implemented where the essential production and
system performance data is recorded and kept ready for review when required.
4. The network has to implement a low cost solution to facilitate for real time system diagnosis
in order to prevent or fix any errors or drawbacks in the system.
5. Since all the processes have to be running in a hard real-time environment, the response of
all the components of the network have to be real time where the response, error handling
and communication of the network have to all adhere to hard real time constraints.
6. The communication factor between each and every node and device in the network is
essential to the success of the system. Thus a very robust and yet convenient-to-use
communication network is required.
7. The system should be able to perform both in adverse conditions and also be resilient
against errors that may occur within the system.
8. Cheap and easy to implement

ii)

In order to achieve the full automation of the electroplating factory the best solution that would be
most feasible has been deemed to be the CAN (Controller Area Network) network. A few reasons
why the CAN network was chosen are as follows:

1. A CAN system is able to control multiple nodes at a single time. Due to its fieldbus
architecture almost an unlimited number of nodes can be installed into the network.
Furthermore CAN does not use a conventional type of addressing for the nodes but rather
uses a system of unique identifiers for each node and network. Thus the communication to
the entire system as a whole, as well as to individual nodes is made much easier and
network congestion is considerable reduced.
2. In order to be able for the operator to control the entire system, the CAN network is
connected to a single CAN gateway which is connected to a Human Machine Interface device
such as a Personal or mobile computer. This allows the operator to monitor, adjust and if
need be fix the system as and when required without any delay and hassle free.
3. Using the individual nodes the data required to be collected can be stored. Also through the
CAN network the data from the nodes can also be stored on a backup storage server via the
gateway

11
4. In the modern market the availability of CAN based microcontrollers and other hardware
allows the implementation of the system to be both easy and cost effective. Furthermore
due to the distributed nature of the system the connection requirements reduce greatly as
sensor and actuator related connections will be of minimal length where the major
communication between the nodes and the Human Machine interface will be implemented
via a single CAN fieldbus. In expanding the network only the new nodal equipment is
required. Thus the node can be easily incorporated in to the system with very little change if
any at all
5. Due to the lack of addressing requirements in the CAN network control signals are
immediately released in to the network and the targeted nodes immediately pickup the
signals and implement the instructions with very minimal transmission delay. Furthermore
with CAN frame ID arbitration the normal control message will assign a high priority CAN
frame ID thus guaranteeing the delivery of real-time control messages.
6. In order to guarantee the robustness of the network in the system two CAN wired networks
are used. One CAN network uses standard CAN cable in order to connect all the fixed
installations such as temperature controllers, rectifier controllers and filter pump controls.
Further the fixed installations are powered by a three phase ring circuit. The second CAN
network uses flat form cabling for the movable hoists as the constant motion of the hoists
require flexible cabling. Although in the CAN system the number of flat cables is reduced by
a fifth.
7. The CAN system can be customized to be incorporated in almost any environment with the
use of the same equipment with just a difference in firmware that are installed. If any error
is detected, the CAN controller will transmit an Error flag. The transmitter can recognize
such error flags and initiate retransmission of corrupted messages. That along with bit error
control, Stuff error control, CRC error control and Acknowledgment Errors, the CAN system
ensures the system reliability even when the network has an internal error. Moreover any
detected failure from a distributed controller will inform the gateway to alert the operator
and activate the error handling function of the gateway. At the same time the maintenance
personnel can use mobile terminals to plug in to the CAN network and fix the error.
Furthermore collisions within the network data stream are avoided by the use of non-
destructive bit-wise arbitration thus allowing uninterrupted message transmission with no
data corruption occurring during collisions.
8. Wide availability, ease of installation and use, minimal requirements for training and self
diagnosing system makes a CAN system very cost effective

iii)

In the implementation of a wireless control and monitoring system the following considerations
have to be adhered to:

1. Flexible deployment and easy-to-use, easy –to-install property


2. Ability to run a long period of time at a low cost
3. Ability to handle a large number of connections with no significant loss in the network
4. High level of security
5. Real-time response system
6. Reliability of the control architecture

12
iv)

In order to satisfy the requirements of a wireless network in the electroplating factory, the best
choice has been the ZigBee wireless network. The reasons for this are as follows:

1. ZigBee is an emerging wireless technology specifically designed for large sensor networks.
Thus due to its application specific property it will be both very cost effective and easy to
implement since the equipment is tailor made for this type of application
2. Due to its specific design the hardware involved is designed for long-term use with long-
lasting batteries for the battery powered devices which all out perform any existing wireless
hardware from technologies such as Wi-Fi, WiMax and Bluetooth.
3. ZigBee by design is able to handle large sensor networks, up to 65000 nodes per network.
Thus expansion of the wireless network will have no detrimental bearing on network
performance
4. ZigBee also addresses through its protocols issues of security by encryptions and other
methods to prevent wireless tampering as well as eavesdropping making ZigBee ideal for
internal factory communication as well.
5. ZigBee has incorporated CSMA-CA (carrier sense multiple access with collision avoidance)
protocols which ensure the collision avoidance, data transmission and reception thus having
no delays in transmission. Furthermore it employs GTS(guaranteed time slot) mechanisms
which are assigned for high priority communications thus ensuring real time
communications.
6. ZigBee is available as part of a distributed control system thus it enables the remote
debugging function of machines under its monitor via a command line interface. The
interface is available within the distributed controller operating system and the operator can
examine internal status of the controller as well as maintenance and debugging for the
controller.

13

You might also like