Mittuniversitetet
References
Books:
• Practical Industrial Data Communications
by Reynders, Deon
Mackay, Steve
Wright, Edwin
• Industrial Communication Systems
by Wilamowski,
Bogdan M. Irwin,
J. David
Industriell Datakommunikation - Fieldbus 2
Mittuniversitetet
Program
04/05/2018
• Seminar I:
• Introduction to Fieldbus and Industrial Automation
• Overview of fieldbus technologies (Part 1)
07/05/2018
• Seminar II:
• Overview of fieldbus technologies (Part 2)
• Real Time Ethernet
• WirelessHART
Industriell Datakommunikation 3
Mittuniversitetet
Control System
Industriell Datakommunikation 4
CONTROL
ALGORITHMPLANT
SENSOR
ACTUATOR+
-
Control System
Feedback
Reference Set
Mittuniversitetet
Networked Control System
Industriell Datakommunikation 5
Communication
NetworkSensor(s) Actuator(s)
Controller(s)
Mittuniversitetet 6Industriell Datakommunikation - Fieldbus
Fieldbuses are real-time networks for sensors and actuators.
Used for the communication among sensors, actuators and controllers
What is a Fieldbus?
Fieldbus
Data and Nodes
Management
Diagnostic and
Integration
Safety and Security
Mittuniversitetet
Real Time
“A real-time system is one whose logical correctness is based on
both the correctness of the outputs and their timeliness”
Soft vs Hard Real Time
Industriell Datakommunikation 7
Failure to meet
deadline
Catastrophic Failure Performance degradation
HARD RT SOFT RT
Mittuniversitetet 8
Office Network: TCP IP, Ethernet
Plant Network: Ethernet, ControlNet
Fieldbus: FF, PROFIBUS PA, LON
Simple fieldbus or
Sensor Bus:
CAN, DeviceNet, SDS, ASI-bus, Interbus-S
The Automation Pyramid
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Traditionally in industries the communication was completly analog
Moving to digital communication brings many benefits:
• Immunity to noise;
• Less cabling;
• Better Diagnostic;
Fieldbus replace the traditional
4 – 20 mA analog technology.
9
Fieldbuses: the beginning
[mA
]
20
4
Measurement Range
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 10Industriell Datakommunikation - Fieldbus
4-20 mA vs Fieldbus
4-20 mA Fieldbus
Information Analog Digital
Signal Integrity Low (EMI,
Attenuation, ...)
High
Communication
Layer
Phyisical Physical, Data Link,
Application
Diagnostic Minimal Extensive
Installation cost High Low
Cost per device Low High
Mittuniversitetet
One of the key requirements for the adoption of fieldbus is
the distribuited intelligence.
To access the fieldbus sensors and actuators are required
to implement a communication stack.
Smart Sensors:
• Computetion capabilities;
• Communicate in a digital way;
• They use a communication standard (at least layers 1 and 2 of ISO/OSI);
11
Fieldbuses: field devices
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 12
Fieldbus Evolution
From the first proprietary solutions (’80) to the actually used standard (’90)
1969
First PLC
(Modicon 084)
1979
MODBUS
CAN
HART
1991 … 1996
Profibus FMS/DP/PA
FOUNDATION fieldbus
Predecessors Proprietary solutionsInternational
Standards
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 13
Fieldbus Evolution
From the first proprietary solutions (’80) to the actually used standard (’90)
2007
Release of
WirelessHART
2009
Release of
ISA100.11a
2010
Introduction
of IO-Link
2001 … 2006
EtherCAT (2003)
Eth/IP (2001)
Profinet (2004)
SafetyNET (2006)
…
Industrial Ethernet Wireless Networks
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 14
Layer ISO/OSI Model
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data link
1 Physical
Layer ISO/OSI Model
7 Application
2 Data link + MAC
1 Physical
OSI Model Implementation Model
Fieldbus and the OSI Model
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 15Industriell Datakommunikation - Fieldbus
Fieldbus: the applications
FIELDBUS
Factory Automation
Automative
Home Automation
Process Automation
Mittuniversitetet
FIELDBUS FOR AUTOMOTIVE
16
Safety
• Redundancy, Check codes, very low data error rate
Determinism
• Synchronized communications, TDMA
Wireless networks are considered unreliable and, up to now, are used for
entertainment and extravehicular communications
IEEE 802.11p for data exchange between high-speed vehicles (V2V) in
the licensed ITS band of 5.9 GHz (5.85-5.925 GHz).
Examples:
LIN – very simple protocol (e.g. window automation)
CAN – CAN version with TDMA (e.g. ABS)
FlexRay – New (BMW, Audi, Mercedes …), increases baud rate with
respect to CAN (up to 10Mbytes/s) and adopts a TDMA with dynamic
slots assignment.
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
FIELDBUS FOR HOME AUTOMATION
17
The low-cost is mandatory, non-invasive and mobile sensors
could be the future (wireless fieldbuses)
Primary needs: low-cost, simple installation, auto-configuration
There are a lot of proprietary solutions:
• CAN – based solutions (different application layers)
• Some emerging Ethernet-based solutions (security and costs problems)
• EIB, EHS and Batibus converge into Konnex (KNX) (ISO/IEC 14543-
3,EN50090)
• European Standard (Siemens, ABB, Bticino, Vimar, etc.)
• Wired and wireless
• LONWorks
• Widespread in USA
• Supported by electronic devices (Neuron Chips produced by
Toshiba, Freescale, Cypress)
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
FIELDBUS FOR PROCESS AUTOMATION
18
• Safety is mandatory (particularly in chemical, oil, industries,…)
• High availability (redundant system)
• Reduce wiring (long distances) - the bus also powers the devices
• Speed is not important
• Cycle time are in the order of several hundreds of ms
• Timestamp is important in case of fault (resolution ~ 100 ms)
There are only two big players:
• PROFIBUS PA
• FIELDBUS FOUNDATION (it has local loop control between devices)
They use the same physical layer (Manchester, powered, 31.25kbaud)
but they are totally different at the data layer.
Wireless can be used for non critical processes, as it reduce wiring and
allow a range extension by suitable network topologies (mesh)
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
FIELDBUS FOR FACTORY AUTOMATION
19
The main goals are:
• Fast and low-cost
• High rejection to noise
• Safety (e.g.protection of human operator)
Speed can be very important
• Reduced communication times means more products, i.e.
higher gain…
• Motion control (motor drives) need isochronous
communication
More than 20 fieldbuses for Factory Automation
• PROFIBUS DP is the most diffused but holds only the 15%
of the market (RS485, max 12Mbit/s)
• DeviceNet, CANOpen, use CANbus (max 1Mbit/s) Factory
environment is hostile for wireless technology (metal,
walls,…)
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
The Ideal Fieldbus: some characteristics
• Transfers a “big number” of small data;
• Supports real-time traffic (Upper bounded response times, ex. 1ms..1s);
• Operates in hazardous environments (high temperature, vibrations, etc.);
• Is robust and easy to install;
• Has high availability (e.g. redundant architectures);
• Has continuous supervision and diagnostic;
• Manages long distances (100m .. 4 km);
• Has good data transmission rate (e.g. 50 kbit/s … 5 Mbit/s);
• Supports clock synchronization (e.g. milliseconds up to microseconds);
• Manages non real-time traffic for maintenance and diagnosis.
20Industriell Datakommunikation - Fieldbus
Mittuniversitetet 21Industriell Datakommunikation - Fieldbus
Fieldbus: the topology
Fieldbus daisy chain topology Tree topology
• Flexibility of the hardware of the measurement system
• Cable reduction
• Every node can share information with other nodes
•Different delays from node to the measurement system•Less realiable
Mittuniversitetet 22Industriell Datakommunikation - Fieldbus
Fieldbus: distributed measurements
In Industry to ensure good control and monitoring actions, sensor nodes
should…
A. Be synchronized
• Synchronization protocols
• Delay
• Jitter
B. Be identified and localized
• Identifier for each sensor
• Localization of moving sensor
C. Be qualified
• Uncertainty measurement
• Status report
Mittuniversitetet 23Industriell Datakommunikation - Fieldbus
Fieldbus: Measurement and Control
Measurement
• Data require a time reference
(timestamp)
Loop Control
• Delay must be limited
(deterministic transmission)
Mittuniversitetet 24Industriell Datakommunikation - Fieldbus
Fieldbus: Networked Control System (NCS)
Process
Controller
Communication Network
Actuator Sensor
Close loops in Process Automation• Process (temperature, humidity,…Tcycle > 1s)
Close loops in Factory Automation• Motion (positioning, speed, torque… Tcycle < 1 ms)
Mittuniversitetet 25
Fieldbus: a complex scenario
Ethernet
WorldFIPProfibus-PA
Batibus
BacNETHart
FieldBusFoundation
ControlNet
CANOpen
Profibus-FMS
DeviceNet
Profibus-DP
Modbus
Sercos
ControlFIP
Seriplex
CAN
Profisafe
M-Bus
IEEE 802.11
FlexRay
Ethercat
EtherLinkPROFInet
ModBus-RTPS
AND MANY OTHERS
!!!
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
HART
Mittuniversitetet
HART (Highway Addressable Remote Transducer)
• Developed in 1980, from 1990 is an open communication technology for process automation.
• Enables the transmission of digital information superimposed on analog 4-20 mA communication.
• The 4-20 mA is used for transmitting the analog data from sensor in the field.
27
LayerISO/OSI Model
HART
7 Application HART Commands
6 - 3
2 Data link HART Protocol Rules
1 Physical Bell 202 (FSK modulation)
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
“Analog” for sensing information, digital for diagnostics
28
FSK modulation
‘0’ – 2200 Hz
‘1’ – 1200 Hz
The average value of the Frequency Shift Keying (FSK) modulation is
zero, the analog communication is unaffected by it.
Industriell Datakommunikation - Fieldbus
Mittuniversitetet 29Industriell Datakommunikation - Fieldbus
HART: Point to Point communication
HART: Multi-point communication
Mittuniversitetet 30
HART Telegram
Three classes of commands:
• Universal Commands
• Common Practice Commands;
• Device-Specific Commands.
Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Reference
• Official Website
• Practical Industrial Data Communications - Ch. 18a
31Industriell Datakommunikation - Fieldbus
Mittuniversitetet
MODBUSRTU and ASCII
Mittuniversitetet
• Application layer (Layer 7) messaging protocol
• Developed by Modicon in 1980
• Mainly Used in SCADA system
• Master-slave protocol
• Communication is initiated by the Master (Client)
• Slaves (Server) communicate only to the Master
• One communication at the time (Unicast or Multicast)
• Peer-to-peer
• UART (RS232, RS485)
• 1 master, <248 slaves
33Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Communication based around a
Query-Response cycle
The function code in the query tells
the addressed slave device the
action to perform.
(ex. read Input Registers, Force
Single Coil, Read Coil Status )
Modbus message Frame
34Industriell Datakommunikation - Fieldbus
Mittuniversitetet
• Two serial transmission mode (no coexistence):
• ASCII mode
• 1 byte -> 2 char (0-9, A-F)
• Error Check -> LRC
• Bits per Byte:
• RTU mode
• 1byte -> 8 bit (0 … 255)
• Error Check -> CRC
• Bits per Byte:
35Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Reference
• Modbus over serial line
• Modbus Specifications
• Official Website
• Practical Industrial Data Communications - Ch. 8a
36Industriell Datakommunikation - Fieldbus
Mittuniversitetet
CANbus
Mittuniversitetet
Controller Area Network (CAN)
Developed in ’85 by Bosch for automotive
• Random access bus (32 users, 1Mbps @ 40m)
• CSMA/CA
• Multi-master bus
• Asynchronous Serial Bus
• 4 frames: DATA (data exchange), REMOTE (request to send
data), ERROR (error signaling), OVERLOAD (temporary
unavailable)
38Industriell Datakommunikation - Fieldbus
Mittuniversitetet
The CAN standard includes:
• Physical layer
• Data-link layer
• Message types
• Arbitration rules for bus access
• Methods for fault detection and fault confinement
39Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Phy layer
• Maximum bitrate 1Mbps.
• The bitrate depend on the bus length.
• The bitrate is limited to sense the collision between distant nodes.
• Twisted pair cable, differential transmission
40Industriell Datakommunikation - Fieldbus
Mittuniversitetet 41Industriell Datakommunikation - Fieldbus
• Bit Coding: NRZ (does not ensure enough edges for synchronization)
• Bit Stuffing is Required
• “open-collector like”, that is “0” level wins
• Automatic bus release if collision occurs and retransmission
(CAN, …)
(Profibus, Ethernet …)
Mittuniversitetet
Higher Layer Protocols
• CANOPEN
• DEVICENET
• CAN Kingdom
• …
The Arbitration Field contains
a 11-bit (CAN 2.0 A) or 29-bit
(CAN 2.0 B) identifier for the
data.
Data with higher priority have
the MSBs at ´0´ and win the
arbitration.
42Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Reference
• Official Website
• Industrial Communication Systems - Ch. 31
43Industriell Datakommunikation - Fieldbus
Mittuniversitetet
PROFIBUS
Mittuniversitetet
PROFIBUS (Process Field Bus)
Three versions of the standard:
• Profibus FMS (1991)
• PLC-PLC, PLC-SCADA, PLC-Field device (complex, obsolete)
• Profibus DP (1994)
• Simpler than FMS, normally 1 master (PLC), several slaves (field devices)
• Market leader
• Profibus PA (1995)
• Different and more robust physical layer (IEC 61158-2)
45Industriell Datakommunikation - Fieldbus
Mittuniversitetet
LayerISO/OSI Model
FMS DP PA
User FMS Devices ProfilesDP - Profiles PA - Profiles
DP - Acyclic PartDP - Cyclic Part
7 ApplicationFieldbus Message Specification
(FMS)6 - 3
2 Data link (Fieldbus Data Link (FDL)IEC Interface
1 Physical RS-485 Fiber OpticIEC 61158-2 (Manchester
Encoded Power Bus)
46Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Profibus: the actors
• DPM1 (Master Class 1):central controller which exchanges data
with the connected I/O devices (slaves).
• Determines the bitrate.
• Handles the Token;
• Several class1 masters are permitted, typical devices are
PLC, PC.
• DPM2 (Master Class 2): diagnostic and startup tool, typically a
configuration tool, can control one slave at a time.
• Slave: passive station which acknowledges messages or
answers per request
47Industriell Datakommunikation - Fieldbus
Mittuniversitetet
• At least one master is mandatory.
• Profibus networks allow for multiple masters.
• In total 127 stations can be addressed
48Industriell Datakommunikation - Fieldbus
Mittuniversitetet
The slave is in one of four possible states:
• Power_ON / Reset
• Wait for Parameters
• Wait for Configuration
• Data Exchange
Cyclic data exchange between a Class 1
master and a DP slave can only take place if
the DP slave is in the data-exchange state
(DXCHG).
Master-Slave Communication
DP Slave State Machine
The master with the token can make use of
communications to address any other station
(masters and slaves).
49Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Master-Master Communication
Using a DP-DP gateway:
• combination of two mono master
systems;
• simple data exchange between the
two masters up to 244 byte.
Via the master-slave combination:
• whenever one master has the token the
other PLC can be a slave to this
master.
50Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Profibus transmission media
RS-485 Twisted cable
Baudrate 9.6 kbit/s to 12 Mbit/s
Maximum 32 devices
Distance can be extended by means of repeaters
• 12 Mbit/s @ 100 m
• 187.5 kbit/s @ 1000 m
Fiber Optic Single and Multi Mode
Baudrate 9.6 kbit/s to 12 Mbit/s
Distance can be extended by means of repeater to 100 km
MBP-IS
Twisted cable
Fixed Baudrate of 31.25 kbit/s
Maximum distance 1900 m
Between 10 and 32 devices per segments
Power Supply directly from the bus
51Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Fieldbus Data Link
• 4 types of frames
• Identified by the value of the first byte (Start Delimiter)
SYN: 33 bits at 1
SD1 10h 01101000
SD2 68h 10100010
SD3 A2h 00010000
SD4 DCh 11011100
Hamming Distance equals to 4
Note: SD3 practically unused
52Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Message SD2 (data exchange)
SD2 Start Delimiter (68H)
LE Information length (from 4 to 249)
LEr Information length repeated (Hamming distance = 4)
DA Destination address
SA Source address
FC Frame Control
DATA UNIT Data field (max length 246)
FCS Frame Check Sequence
ED End Delimiter (16H)
L Information length (L = from 4 to 249)
53Industriell Datakommunikation - Fieldbus
Mittuniversitetet
Message SD1 (data request or Ack)
Message SD4 (token transfer)
Message SC (short Ack)
SD4 Start Delimiter (DCH)
DA Destination address
SA Source address
SC Short acknowledgment (E5H)
SD1 Start Delimiter (10H)
DA Destination address
SA Source address
FC Frame Control
FCS Frame Check Sequence
ED End Delimiter (16H)
L Information length (L = 3)
54Industriell Datakommunikation - Fieldbus
Mittuniversitetet
GSD file (General Station Description)
• each slave or master class 1 device on PROFIBUS needs to have a device description file, the characteristic of each PROFIBUS device is described in the GSD-File;
• the GSD-file contains all device specific parameters e.g.:
• Supported Baudrate
• Supported Message Length
• Number of input / output data
• Meaning of diagnostic messages
• Options for modular devices e.g. which are available
• text file (ASCII-format);
• each configuration tool relates to the GSD information.
57Industriell Datakommunikation - Fieldbus