MTTCN
MTTCN
403044
INDUSTRIAL COMMUNICATION
NETWORKS
CHAPTER 1: INTRODUCTION
fluid
The device transmits its value by means of a current loop
03/10/2016 402044 – Chapter 1: Introduction 4
Overview of Comm. Networks
What is the
differences between
two pictures?
Control Level
= Office World
Cell Level
Field Level
Electric power
generation,
transmission
and
distribution:
Electric utilities
detect current flow
and line voltage, to
monitor the
operation of circuit
breakers, and to
take sections of the
power grid online or
offline.
Digital Intrusion
Video surveillance detection
Access control
Alarms management
Energy / Inventory ….
Management Fire alarm
Power
Audio Visual
System Management
System
Video
Video Distribution
System Surveillance
System
402044
INDUSTRIAL COMMUNICATION
NETWORK
CHAPTER 2: FUNDAMENTAL
CONCEPTS OF DIGITAL
COMMUNICATION
TV E-mail
Telephone
1. Sender / Source
3. Receiver / Sink
Sender/Source Receiver/Sink
Medium
9
402044 – Chapter 2: Fundamental
03/10/2016 9
concepts of digital communication
Bits, numbers, information
Bit: number with value 0 or 1
n bits: digital representation for 0, 1, … , 2n
Byte or Octet, n = 8
Computer word, n = 16, 32, or 64
n bits allows enumeration of 2n possibilities
n-bit field in a header
n-bit representation of a voice sample
Message consisting of n bits
The number of bits required to represent a message is a
measure of its information content
More bits → More content
10
402044 – Chapter 2: Fundamental
03/10/2016 10
concepts of digital communication
Block vs. Stream Information
Block Stream
Information that occurs Information that is
in a single block produced & transmitted
Text message continuously
Data file Real-time voice
JPEG image Streaming video
MPEG file
Size = Bits / block Bit rate = bits / second
or bytes/block 1 kbps = 103 bps
1 kbyte = 210 bytes 1 Mbps = 106 bps
1 Mbyte = 220 bytes 1 Gbps =109 bps
1 Gbyte = 230 bytes 11
402044 – Chapter 2: Fundamental
03/10/2016 11
concepts of digital communication
Data Transmission Speed
12
402044 – Chapter 2: Fundamental
03/10/2016 12
concepts of digital communication
Transmission of Stream Information
Constant bit-rate
Signals such as digitized telephone voice produce a
steady stream: e.g. 64 kbps
Network must support steady transfer of signal, e.g. 64
kbps circuit
Variable bit-rate
Signals such as digitized video produce a stream that
varies in bit rate, e.g. according to motion and detail in a
scene
Network must support variable transfer rate of signal,
e.g. packet switching or rate-smoothing with constant bit-
rate circuit
13
402044 – Chapter 2: Fundamental
03/10/2016 13
concepts of digital communication
Data Transmission Quality
14
402044 – Chapter 2: Fundamental
03/10/2016 14
concepts of digital communication
2.2. Transmission modes
011001010
S R S R
15
402044 – Chapter 2: Fundamental
03/10/2016 15
concepts of digital communication
2.2. Transmission modes
16
402044 – Chapter 2: Fundamental
03/10/2016 16
concepts of digital communication
2.2. Transmission modes
Simplex
Data is directed one way only.
There is no any space for data transmission to be
directed the other way.
Examples: Television transmission, Radio transmission,
computer to the printer, mouse to computer, etc.
17
402044 – Chapter 2: Fundamental
03/10/2016 17
concepts of digital communication
2.2. Transmission modes
18
402044 – Chapter 2: Fundamental
03/10/2016 18
concepts of digital communication
2.2. Transmission modes
Television transmission
19
402044 – Chapter 2: Fundamental
03/10/2016 19
concepts of digital communication
2.2. Transmission modes
Haft Duplex
Data can be directed one way at a time.
The data flows in one direction or the other, but not
both at the same time.
Example: Walkie-talkie.
Where only one party can talk to the other at a time
20
402044 – Chapter 2: Fundamental
03/10/2016 20
concepts of digital communication
2.2. Transmission modes
Walkie –
talkie
21
402044 – Chapter 2: Fundamental
03/10/2016 21
concepts of digital communication
2.2. Transmission modes
Walkie – talkie
22
402044 – Chapter 2: Fundamental
03/10/2016 22
concepts of digital communication
2.2. Transmission modes
Asynchronous communication
Use start and stop bits for each frame
Suitable for transmitting of characters (5 – 8 bits)
Specified by clock speed, character frame length, signal
level, number of start and stop bits, and type of parity bit
(odd or even)
24
402044 – Chapter 2: Fundamental
03/10/2016 24
concepts of digital communication
2.2. Transmission modes
Synchronous communication
Use Synchronous characters to synchronize the
receiver clock signal
Data of synchronous frames is changeable
High transmission efficiency; and more and more
efficient as the amount of transferred data increases
25
402044 – Chapter 2: Fundamental
03/10/2016 25
concepts of digital communication
2.2. Transmission modes
26
402044 – Chapter 2: Fundamental
03/10/2016 26
concepts of digital communication
2.3. Protocols and OSI Model
27
402044 – Chapter 2: Fundamental
03/10/2016 27
concepts of digital communication
2.3. Protocols and OSI Model
28
402044 – Chapter 2: Fundamental
03/10/2016 28
concepts of digital communication
2.3. Protocols and OSI Model
29
402044 – Chapter 2: Fundamental
03/10/2016 29
concepts of digital communication
2.3. Protocols and OSI Model
Lower level protocols – processed by using
hard-ware
30
402044 – Chapter 2: Fundamental
03/10/2016 30
concepts of digital communication
2.3. Protocols and OSI Model
31
402044 – Chapter 2: Fundamental
03/10/2016 31
concepts of digital communication
2.4. Media access control techniques
Access control
techniques
32
402044 – Chapter 2: Fundamental
03/10/2016 32
concepts of digital communication
2.4. Media access control techniques
Master/Slave
Only masters have the right to control the bus accessing and
slaves just respond to the master request.
The direct communication between slaves is limited and data
must be transferred via master .
Use polling list to control the sequence of active slaves.
Cheap, simple, and fast, however, the communication efficiency
(between the slaves) is low.
Reliability of networks is dependent on the master working.
33
402044 – Chapter 2: Fundamental
03/10/2016 33
concepts of digital communication
2.4. Media access control techniques
Token Passing
At any given time only one of station has the right to transmit
into the medium if it takes the token.
The station taken token (only master stations) has the full right
to access the medium to transmit data to others and control the
network operation, e.g. polling its slaves.
Distributed access control technique (multi-master)
35
402044 – Chapter 2: Fundamental
03/10/2016 35
concepts of digital communication
2.4. Media access control techniques
CSMA/CD (Carrier Sense Multiple Access/Collision
Detection)
Carrier Sense: Before transmission, transceiver listen on
medium is used or not, if free then start transmission, otherwise,
wait till medium is idle before sending frame.
Multiple Access: multiple stations use the same shared media.
Each uses same access algorithm.
Collision Detection: Listen to medium – detect if possibly two
or more transmission frames collapse with each other – back off
and try again later by “evasive action following a random period
of time” 36
402044 – Chapter 2: Fundamental
03/10/2016 36
concepts of digital communication
2.4. Media access control techniques
CSMA/CA (Carrier Sense Multiple Access/Collision
Avoidance)
Carrier Sense: Before transmission, transceiver listen on medium is
used or not, if free then start transmission, otherwise, wait till
medium is idle before sending frame.
Multiple Access: multiple stations use the same shared media. Each
uses same access algorithm.
Collision Avoidance: If there is a collision between two or more
stations transmitting simultaneously, such that collision avoidance is
solved by allowing dominated signals of the higher priority station to
overwhelm that of lower priority station to seize the medium. 37
402044 – Chapter 2: Fundamental
03/10/2016 37
concepts of digital communication
2.5. Error detection techniques
39
402044 – Chapter 2: Fundamental
03/10/2016 39
concepts of digital communication
2.5. Error detection techniques
Single Parity Check
Apply for characters in asynchronous transmission
Parity bit : Character bit may include parity bit, set by
the transmitter such that the total number of ones in the
character, including the parity bit, is even (even parity)
or odd (odd parity). The receiver uses this bit for error
detection.
40
402044 – Chapter 2: Fundamental
03/10/2016 40
concepts of digital communication
2.5. Error detection techniques
Recalculate
check bits
k bits
Channel
Calculate
check bits Compare
Sent Received
Information
check check bits
accepted if
bits check bits
match
n – k bits
43
402044 – Chapter 2: Fundamental
03/10/2016 43
concepts of digital communication
2.5. Error detection techniques
column 1 0 0 1 1 1
CRC-8:
= x8 + x2 + x + 1 ATM
CRC-16:
= x16 + x15 + x2 + 1 Bisync
= (x + 1)(x15 + x + 1)
CCITT-16:
= x16 + x12 + x5 + 1 HDLC, XMODEM, V.41
Polar NRZ
NRZ-inverted
(differential
encoding)
Bipolar
encoding
Manchester
encoding
Differential
Manchester
encoding
402044 – Chapter 2: Fundamental
03/10/2016 55
concepts of digital communication
2.6. Digital Signal Modulation
NRZ/RZ
0 1 1 0 1 0 0 1
NRZ
RZ
MANCHESTER
D R
R D
D R
R T T
D
D T T
R
RS- 232
Two wire
multi-drop
network,
haft-duplex
mode.
Wired transmission
Applications of TP
QUESTION (Advantages/disadvantages)
Compare between both types
Co-axial Cable
It has a copper net woven around a copper wire.
Applications of
Coaxial cable
Used in digital
transmission
Used for analogue
transmission
Used for TV antennas
and Cable TV
Fiber Optics
Wireless Transmission
Radio
Infrared
Microware
Radio transmission
Radio transmission,
which is very familiar to
our normal lives, can be
used for data
communication very
easily.
Infrared transmission
It has a very low frequency.
These are largely used for data communication
when wire- less keyboards, mouse and printers
are used.
Microware transmission
Links
Point-to-point
Multi-drop
Multi-point
BUS
Daisy chain
Most Common
ACTIVE BUS
MASTER
ACTIVE BUS
STAR
MASTER
HUB
STAR
HYDBRID
M *
Repeater
Bridge
Router
Gateway
7 7
6 6
5 5
4 4
3 3
2 2
1 R 1
7 7
6 6
5 5
4 4
3 LLC 3
2 MAC MAC 2
1 1 1 1
7 7
6 6
5 5
4 4
3 3 3
2 2 2 2
1 1 1 1
7 7 7
6 6 6 6
5 5 5 5
4 4 4 4
3 3 3 3
2 2 2 2
1 1 1 1
403044
INDUSTRIAL COMMUNICATION
NETWORKS
Customer Benefits
Easy installation and operation thanks to simple
design.
Cost savings for connection technology and
installation due to single-line power and data
transmission.
High degree of operational reliability thanks to
continuous monitoring of the connected devices.
Reduced control cabinet size due to fewer I/O
modules and terminals.
AS-I Components
standard 100m
input data
output data
Slave 2
cycle time:
- max. 5 ms
input data
(standard mode)
- max 10 ms .
(A/B-mode) .
.
Slave n
output data
input data
0 SB A4 A3 A2 A1 A0 1 D3 D2 D1 D0 PB 1 0 SB D3 D2 D1 D0 PB 1
ST EB ST EB
DP/ASi Link
Link 20E Advanced
Your advantage: Optimum
transition to PROFIBUS
integrated in STEP 7
03/10/2016 402044 – Chapter 3: AS-i network 21
3.4. AS-i Components and Technology
I1.1 Q1.1
I1.2
I1.3
I1.4
I1.5
Mô tả bit
RESPONSE Bit đáp ứng cho giao tiếp lệnh
Mô tả bit
PLC_RUN Chế độ CPU phải gởi tín hiệu tới CP 242-2 dùng
bit PLC_RUN để tiếp tục.
PLC_RUN = 0 Cho CP 242-2 biết CPU đang trong chế độ
STOP. CP 242-2 gởi “0” tới tất cả slave.
PLC_RUN =1 Cho CP 242-2 đó biết CPU đang trong chế
độ RUN. CP 242-2 gởi nội dung của trang 0 đầu ra tới tất cả
slaves. Chương trình phải gởi set bit lên 1 khi bắt đầu giao
tiếp với các Slaves.
Mô tả bit
COMMAND Xác định nhiệm vụ của CP 242-2 trong chế
độ gởi lệnh (xem Chương 5. Mở rộng hoạt động).
BS3_BS0 Những bit chọn trang dùng để lựa chọn
trang trong mođun tương tự (xem Mục 3.3, Ý nghĩa của dữ
liệu trong mođun tương tự)
*4 bit (BS 0 3) sẽ chọn được 16 trang, mỗi trang này tương
ứng với một vùng nhớ đặc trưng trên CP 242-2.
M - Địa chỉ đầu tiên của vùng nhớ AIW của CP 242-2, phụ thuộc cấu hình Master
03/10/2016 402044 – Chapter 3: AS-i network 29
3.5. AS-i Master: CP 242-2
Output Data of Slaves at CP 242-2 Memory
Bank Thứ tự Byte Bit 7-4 Bit 3-0
0 N+0 Reserved Slave 1
bit 4 | bit 3 | bit 2 | bit 1
N - Địa chỉ đầu tiên của vùng nhớ AIW của CP 242-2, phụ thuộc cấu hình Master
03/10/2016 402044 – Chapter 3: AS-i network 30
3.5. AS-i Master: CP 242-2
Example
Find address of following signals:
S6 S28 (A2)
(A) (C2)
(C)
(B) (D2)
(B2)
S15
(C1) (A1)
CPU
CPU214,
214,6AI/3AO,
CP 242-2
(D1) (B1)
CP 242-2
3/ Cấu hình các slave: đặt địa chỉ, cấu hình cho
các pin (vào/ra), gán tên cho tín hiệu và Lập bảng
cấu hình.
Slave Tín hiệu Pin num. Input/Output
S1 Button_On_Remote 2 I
5/ Phân tích các yêu cầu điều khiển Giải thuật điều
khiển.
6/ Lập trình dùng Step 7.
Remote S6 Local S8
S1 S3 S2 S4
50 m
S1 Dong_B_TX 2 I S6 Dong_CTHT 2 I
Mo_B_TX 3 I Mo_CTHT 3 I
Dung_B_TX 4 I S8 Motion_In 1 I
S2 Dong_B_TC 1 I Motion_Out 4 I
Mo_B_TC 3 I
Dung_B_TC 4 I
S3 Dong_L 1 O
Mo_L 3 O
S4 Dong_Com 2 O
Mo_Com 3 O
Dung_Com 4 O
03/10/2016 402044 – Chapter 3: AS-i network 37
3.5. AS-i Master: CP 242-2
Slave Tín hiệu Pin I/O Add
S1 Dong_B_TX 2 I AI0.1
Mo_B_TX 3 I AI0.2
Dung_B_TX 4 I AI0.3
S2 Dong_B_TC 1 I AI1.4
Mo_B_TC 3 I AI1.6
Dung_B_TC 4 I AI1.7
S3 Dong_L 1 O AQ1.0
Mo_L 3 O AQ1.2
S4 Dong_Com 2 O AQ2.5
Mo_Com 3 O AQ2.6
Dung_Com 4 O AQ2.7
03/10/2016 402044 – Chapter 3: AS-i network 38
3.5. AS-i Master: CP 242-2
30m 80m
AS-i
402044
INDUSTRIAL COMMUNICATION
NETWORK
CHAPTER 4: PROFIBUS
Ethernet/ PROFINET
Demanding tasks,
extensive data
PC
DP/PA coupler
Master PLC
Cell/control level
PROFIBUS DP/FMS
High speed,
modest data HMI
PROFIBUS DP Exi
RS485 PROFIBUS PA - MBP
Field level
Slaves
Sensors Actuators Drives Remote Control Transmitters DP
I/O valves cells
Controllers
Actuators
Sensors
M S S S
Segment 1 – up to 32 devices
M S S S
Example
M S S S S S S
Repeater
Segment 1 – up to 32 devices Segment 2 – up to 32 more
Segment 3 – up to 32 more
Transmission 12 Mbps
speed
Transmission 31.25kBits/s
speed
Class-2 Class-1
Master/
master master Control slave
PROFIBUS DP PROFIBUS PA cycle
>=1 1 1 2 2 0 – 244 4 1
Preamble SD FC DA SA Data FCS ED
>=1 1 1 2 2 0 – 244 4 1
Preamble SD FC DA SA Data FCS ED
Preamble
SD (Start Delimiter)
FC (Frame Control)
Destination Address (DA)
Source Address (SA)
Data
FSC (Frame Check Sequence)
End of frame (ED)
Configuration
tool
Master
Class I
GSD files
PROFIBUS
Slaves
Manufacturing Automation
Car manufacturing
Bottling systems Paper and Printing
Storage systems Industry
Process Automation
Brewing
Water and sewage treatment industry
Building Automation
Traffic automation
Heating, air-conditioning
Power industry and power distribution
Power plants Food Industry
Switchgear
Functional safety systems
High reliability systems
Redundancy.
03/10/2016 402044 – Chapter 3: Typical industrial networks 30
4.5. PROFIBUS Applications
Customer benefits
Totally standardised and interoperable devices
Well tried, tested and successful on-going
technology
Excellent range of kit available : best of breed
devices
Ensures compatibility
Protects your investment
402044
INDUSTRIAL COMMUNICATION
NETWORK
CHAPTER 3: PROFINET
IT-Standards Distributed
& Security PROFINET Field Devices
Network Motion
Installation Control
Distributed
Intelligence
Office VS.
Factory
Networks
Connectors IP20
RJ45 from office application
Useful for industrial application (connectable to AWG22)
Can be assembled in the field
Connector IP65 (outside of cabinet)
Compatible to IP20 variant
Can be assembled in the field
Hybrid variant with Power & Signal
M12 plug connector (with 4 poles)
Connectors IP20
Type SC-Duplex (Push/Pull Connector)
Type BFOC/2,5 (Bayonet Connector)
Can be assembled in the field
Connector IP65 (outside of cabinet)
Simplex connector
Can be assembled in the field
Hybrid variant with Power & Signal
HMI
Controller
Distributed Sensors
I/O HMI
Proxy
Proxy Motion Control Robotic
& Drives
Other field buses
Safety
Distributed
I/O
IT-services TCP/IP
RT IRT
Real-time Ethernet
Simultaneous real-time and IT-service on one cable
Scalable real-time communication from non-critical time
applications up to high performance applications
Unlimited TCP/IP communication
03/10/2016 402044 – Chapter 5: PROFINET 15
3.4. ProfiNet
Network Configuration
Labeling
Palletizing
Packaging
CALL #BSEND (
ID: 1 DBSend PLC3:
R_ID: BoolVar1
BoolVar2
BOOL
BOOL
Labeling
SD_1:
DwordVar1 DWORD
ERROR: ...) DBRecvPLC1:
ID2 BoolVar1 BOOL
CALL #RECV
CALL #BRECV ( BoolVar2 BOOL
ID: DwordVar1 DWORD
DBRecv PLC3:
R_ID: BoolVar1 BOOL DBSendPLC1:
RD_1: BoolVar2 BOOL BoolVar1 BOOL
ERROR: ...) BoolVar3 BOOL BoolVar2 BOOL
CALL #SEND
DwordVar1 DWORD BoolVar3 BOOL
DwordVar1 DWORD
START STARTING
Labeling
STOP READY
Cnt_IN RUNNING START STARTING
ICnt_OUT
Lifestate
Filling
Graphical configuration of
START STARTING
the communication between machines
STOP READY
No detailed knowledge of communication functions required
Cnt_IN RUNNING
Cnt_OUT
Lifestate
Configuring Configuring
Programming Programming
Step 2:
Import PROFInet Engineering Tool
components
PCD PCD PCD
Labeling Packaging
Step 3: Link Reset Running Reset Running
Label
Label
Filling
Reset Running
Enable Finished Fill Fill
Start Enable
Stop Fault
Hierarchical navigation
Network
view
6ES7 820-0CC03-0YX0
available (V2.0)
PROFINET
Connection
error
Status of
connection
Device
status
Error
Details
New machine
Configuring instead
machine out of programming and debugging
machine in Simplify the interoperability between multiple vendors
Standardization of machines
and their functionality
Ethernet
?
Proxy
Cleaning Filling
Fieldbus
PROFINET PROFINET
proxies proxies
30m 80m
AS-i
402044
INDUSTRIAL COMMUNICATION
NETWORK
6.1. CAN
6.2. DEVICENET
6.3. MODBUS
CAN
Bus
Protocol
- 17 -
402044 – Chapter 6: CAN, DEVICENET,
03/10/2016 17
MODBUS
6.1. CAN
CAN Data Error Detection
Bit Monitoring (Sender Task)
Compares every bit placed on the CAN bus with the actual
bus level.
Discrepancy indicates a bit monitoring error and results in
error handling.
Stuff Check (Receiver Task)
Compares arriving bit stream for a sequence of six
homogeneous bits.
Detection of a sixth homogeneous bit indicates bit stuffing
error and results in error handling.
DeviceNet
Data Configuration
Support to cyclic and acyclic transmission services.
Supports only Standard CAN.
Uses production/consumption model for module to
module transfer.
Peer-to-Peer with Multi-Cast (one-to-many); Multi-
Master and Master/Slave Polled or change-of-state
Like CAN, the access control bus of DEVICENET
is CSMA/CA.
402044 – Chapter 6: CAN, DEVICENET,
03/10/2016 28
MODBUS
6.2. DEVICENET
Each of these components in the DEVICENET are
organized into attributes, services (methods or
procedures), and behaviors of the components.
These objects are defined by DEVICENET
specification. For instance, the identity object has
attributes such as vendor ID, device type, and
serial number.
MODBUS
Architecture
For an exception response, the server returns a code that is equivalent to the
original function code from the request PDU with its most significant bit set to
logic 1.
Data
Transmission