Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

USB3, I2C, SPI£1.50

Title: Programmable Logic Controllers Networks and Communications
Description: Programmable Logic Controllers - Assignment 3: Networks and Communications Input/output I/O. Binary, hexadecimal and octal to denary conversions. Data Integrity: Longitudinal Redundancy Check (LRC), Cyclical Redundancy Checking (CRC). RS232 and RS422 signal communications. Networking topologies: star and bus. Grade received: DISTINCTION Tutor: Susan Armstrong Institute: Teesside University (TU), delivered by Middlesbrough College (MC) Programme: Higher National Certificate (HNC) in Electrical and Electronic Engineering

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


HNC Electrical and Electronic Engineering
Year One - 2013/14
Module: Programmable Logic Controllers

Programmable Logic
Controllers

Networks and
Communications

Keith A
...
Hudson

2

PLCs
13 May, 2014

Contents
1

PLC I/O
...
1

Digital
...
1
...
4

1
...
2

Example
...
2

Analogue
...
2
...
4

1
...
2

Example
...
2
...
4

1
...
4

Example
...
5

3

Signal Communications
...
1

RS-232
...
1
...
7

3
...
2

Standards
...
2

RS-422
...
2
...
9

3
...
2

Standards
...
3

RS-485
...
3
...
3
...
10
Standards
...
11
4
...
1

Data Integrity
...
2

Longitudinal Redundancy Check (LRC)
...
3

Cyclical Redundancy Checking (CRC)
...
13

6

Twisted-pair Wiring
...
15

8

Network Topologies
...
1

Star Topology
...
2

Bus Topology
...
23

10

Modbus
...
25

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
8
Figure 2: One byte of asynchronous data
...
14
Figure 4: Multiple Transceivers on a Twisted-Pair
...
15
Figure 6: Female 25-pin D-type connector
...
15
Figure 8: Female 9-pin D-type connector
...
24/RS-232 Interface
...
(BBC - GCSE Bitesize, 2014)
...
(BBC - GCSE Bitesize, 2014)
...
23

Tables
Table 1: Conversions
...
7
Table 3: RS-422 Line length vs max data rate
...
10
Table 5: ASCII Message Frame
...
12
Table 7: Comparison of Characteristics of RS232, RS422, RS423 and RS485
...
16
Table 9: RS-232 D-type connector pin-outs
...
20
Table 11: Advantage / disadvantages of a Bus Topology
...
Hudson

PLCs
13 May, 2014

4

1 PLC I/O
Input to and output from a PLC can be digital and/or analogue
...

They are converted to digital format using an Analogue to Digital Convertor (ADC)
...
)

1
...
1
...
g
...
These
binary values relate to the state of a set of switch or relay contacts which can be open or closed
...
Apart from that, digital signals can be
connected directly to the I/O circuits of the PLC (via opto-isolation)
...
1
...
If on, the PLC switches a light “on” (12V
DC) or “off” (0V DC)
...
2 Analogue
1
...
1 Input
This type of data has continuous values that fall within set limits
...
The value is a Real Number with resolution determined by the sensing device
...

Current - 4-20 mA signals are the Industry standard signal
...
)
Resistance - Resistance measurement is most commonly associated with direct inputs from temperature
sensing devices, such as thermistors and RTD's
...
There can, however, be multiple inputs of different ranges and types,
connected to the PLC (via ADCs)
...

1
...
2 Example
A temperature of 20 degrees is detected by a temperature sensor
...
34mV
...
(Assuming
the PLC has 8-bit words
...
2
...

1
...
4 Example
Typical analogue control includes speed control of motors, degree of valve opening, dampers, etc
...
Hudson

PLCs
13 May, 2014

5

2 Number System Conversions
Table 1: Conversions

Starting
Value

Conversion

10111011

binary to denary

FFFF

hexadecimal to denary

12467661

octal to binary

2AE5

hexadecimal to binary

HNC Electrical and Electronic Engineering

Calculation
128*1 +
32*1 +
16*1 +
8*1 +
2*1 +
1*1
Total=187
4,096*15=61,440
256*15=3,840
16*15=240
1*15=15
Total=65,535
1=0001
2=0010
4=0100
6=0110
7=0111
6=0110
6=0110
1=0001
2=0010
A=1010
E=1110
5=0101

Answer

187

65535

0001 0010 0100 0110 0111 0110 0110 0001

0010 1010 1110 0101

Year One: 2013/14

Keith A
...
At an electrical level, the signals must have compatible voltage and current levels
...
This may be a
straight forward task if both devices are made by the same manufacturer
...

Standards are developed by groups of manufacturers and/or users
...


The Electronics Industry Association (EIA) has produced a number of standards dealing with data communications:
RS-232, RS-422, RS-423 and RS-485
...
Hudson

PLCs
13 May, 2014

7

3
...
e
...
These devices operate at speeds of up to 20K bits/second over short distances
...

(Note: Master=Driver=Transmitter, Slave=Receiver)
RS-232 devices may be classified as:
 Data Terminal Equipment (DTE)
E
...
PC, Terminal, Micro-controller
 Data Communications Equipment (DCE)
E
...
Modem, Printer
The signals are unidirectional, so the output from the DTE is the input to the DCE, and vice-versa
...
5
meters)
...
e
...
Both
communicating devices share a common power and ground
...

When data is transmitted positive voltages are used
...

Table 2: RS-232 Line length vs max data rate

Line Length

Max Data Rate

15m
120m
1200m

20 kbits/sec
1 Mbits/sec
1 kbits/sec

Full speed communication can be maintained over longer distances (up to about 300m) by using low-capacitance
cables
3
...
1 Applications
Connection of PCs, terminals and micro-controllers to equipment such as modems and printers
...

3
...
2 Standards
The current version of the standard is: ANSI/TIA-232-F (October 2002) F Interface between Data Terminal Equipment
and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange
...
24/V
...


HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
2 RS-422
(RS-485 is based on RS-422
...
)
This specification is designed to allow serial communication over a two wire, (plus ground), balanced system
...
(One is
inversely proportional to the other
...
The usual configuration is a 1:1 (point-to-point) Master-Slave arrangement
...

Table 3: RS-422 Line length vs max data rate

Line Length

Max Data Rate

12m
10 Mbits/sec
120m
1 Mbits/sec
1200m
100 kbits/sec
(Brainboxes Limited, 2014)
(Note: Balanced=Differential)
Traditionally, balanced means the signal on one wire is the same magnitude as the signal on the second wire but
opposite in sign (e
...
+5V and -5V)
...
Figure 1 shows this graphically
...
2 volts for valid operation
...
(Maxim Integrated, 2001)

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
2
...
(Wikipedia, the free encyclopedia, 2014)
3
...
2 Standards
The current version of the standard is: TIA/EIA-422-B (May 1994) Electrical Characteristics of Balanced Voltage Digital
Interface Circuits
...
11, (a
...
a
...
27)
...
Hudson

10

PLCs
13 May, 2014

3
...
It is similar to the RS422 standard upon which it is
based
...
The specification defines a multi-point, communication
network
...
(Only
one transmitter may be active at any given time
...
RS485 drivers are designed to handle bus fault conditions and bus contention (data collisions)
...
3
...
g
...
(Middlesbrough College, 2014)
In commercial aircraft RS-485 is used for low-speed data communications
...

For building automation RS-485 provides bus wiring is used to control CCTV, security control panels, fire detection
and access control card readers
...
3
...
Hudson

11

PLCs
13 May, 2014

4 Data Integrity
4
...
1 Data Integrity
Figure 2 illustrates how a byte of data is transmitted
...
…111” – “Mark”)
 One start-bit
(“0” - “Space”)
 Seven data bits
(“1000001”)
 One parity bit
(“11” – “Mark”)
 Back to idle
(“111
...
For even parity there should always be an even number of
“1”s in the data bits if there aren’t the parity bit is set
...
If it
isn’t even the data is corrupt
...
Error correction, therefore, is not possible so the receiver
will request retransmission
...
After that the conversation is lost
...

If two bits are wrong, no error will be detected
...
d
...
As well checking the parity of individual bytes, other check
can be performed on the contents of the message frame
...
2 Longitudinal Redundancy Check (LRC)
The LRC field is an 8–bit (one byte) value
...
The receiving device then recalculates the LRC based on the received message
...
An error results if the two values are not equal
...

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
3 Cyclical Redundancy Checking (CRC)
The transmitting device calculates the CRC value and appends it to the message
...
It then compares the calculated value with the value received
in the CRC field
...
CRC checks are performed on RTU (Remote Terminal
Unit) based messages
...
5
char

Slave
Address
1
byte

Function
Code
1
byte

Data
Count (n)
1
byte

Variable length
Data
N
byte(s)

CRC
Lo
1
byte

CRC
Hi
1
byte

The LRC and CRC values are calculated by performing binary operations on each bit of the data potion of the
message to be transmitted
...
)
The above checks are performed within Layer 2 - the Data Link of the OSI model
...
Hudson

PLCs
13 May, 2014

13

5 Comparison of RS232 and RS485
Table 7 compares key characteristic of RS232 and RS485
...
)
Table 7: Comparison of Characteristics of RS232, RS422, RS423 and RS485

Characteristics
Differential
Max Number of
Drivers
Max Number of
Receivers
Modes of
Operation
Network
Topology
Max Distance
(Standard)
Max Speed
@ 12 m
Max Speed
@ 1200 m
Max Slew
Rate
Receiver Input
Resistance
Driver Load
Impedance
Receiver Input
Sensitivity
Receiver Input
Range
Max Driver
Output Voltage
Min Driver Output
Voltage (with load)
(Bies, 2013)

RS232

RS423

RS422

RS485

No

No

Yes

Yes

1

1

1

32

1

10

10

32

Half-duplex
Full-duplex

Half-duplex

Half-duplex

Half-duplex

Point-to-point

Multi-drop

Multi-drop

Multi-point

15 m

1200 m

1200 m

1200 m

20 kbs

100 kbs

10 Mbs

35 Mbs

(1 kbs)

1 kbs

100 kbs

100 kbs

30 V/μs

adjustable

n/a

n/a

3
...
7 kΩ

≧ 450 Ω

100 Ω

54 Ω

±3 V

±200 mV

±200 mV

±200 mV

±15 V

±12 V

±10 V

–7
...
12 V

±5 V

±3
...
0 V

±1
...
Hudson

14

PLCs
13 May, 2014

6 Twisted-pair Wiring
The use of balanced signals and twisted pair wires reduces the effects of Electro-Magnetic Interference (EMI)
...


Figure 3: Twisted-Pair communications

Figure 4 shows how multiple transceivers (multi-point) can be connected using a twisted pair cable
...


Figure 4: Multiple Transceivers on a Twisted-Pair

(Maxim Integrated, 2001)

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
The RS-485 standard
does not specify (or even) recommend connector types
...


Figure 7: Male 9-pin D-type connector

Figure 8: Female 9-pin D-type connector

Figure 9 shows the pin assignments for a male 25-pin D-type connector
...
24/RS-232 Interface

(ARC Electronics, n
...
)

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...


HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
24
Code

RS-232
Code

1

GND

101

AA

Shield Ground

3

2

TXD

103

BA

Transmit Data

2

3

RXD

104

BB

Receive Data

7

4

RTS

105

CA

8

5

CTS

106

CB

6

6

DSR

107

CC

5

7

GND

102

AB

Signal Ground

1

8

DCD

109

CF

Data Carrier Detect
...
Used by the Data Terminal to signal the Data Set that it may
begin sending data
...


Clear to Send
...
The Data Terminal will not send out data without this signal, active high
...
Used by the Data Set to signal to the Data Terminal that it is
ready for operation and ready to receive data, active high
...


9

RESERVED
...
Can be -12V

11

SCF

Select Transmit Frequency

S
...
CTS

121

SBA

Secondary Clear to Send

14

S
...
RXD

119

SBB

Secondary Receive Data

17

RCK

115

DD

Receive Clock

18

LL

19

S
...
Used by the Data Terminal to signal to the Data Set that it

21

SQD

110

CG

Signal Quality Detect

22

RI

125

CE

Ring Indicator
...


condition has been detected
...
)

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
e
...
There are a number of network
topologies, each with their own advantages and disadvantages
...

Factors to consider:
 Initial Number of nodes
 Number of nodes in the future
 Location of nodes
(Note: Node = any device connected to a network
...
Hudson

PLCs
13 May, 2014

19

8
...
(BBC - GCSE Bitesize, 2014)

This configuration consists of a number nodes connected to a central node (switch/hub) as shown in Figure 10
...

Each node is connected to the hub/switch via a twisted-pair (Ethernet) cable
...

 A switch sends this message to the intended recipient
...
Each node on the network constantly checks for
messages
...
The appropriate node reads the whole
message, and the other nodes disregard the rest of the message
...


HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...

Each node has an independent communication line
...

In theory a Wi-Fi router can serve 255 devices
...
) This does reduce the
cable count and is easy to setup
...
At most three devices and
two links are required to pass data packets from one
node to another
...


Disadvantages
If the central node fails all communication is lost
...
As all the cables approach the
central node the density of cables increases greatly
...

Fault finding at the central node is difficult when there
are lots of cables, particularly if someone hasn’t labelled
them properly!
Wi-Fi doesn’t provide independent communication
channels as the router broadcasts to every node
...
(They disregard what isn’t
addressed to them
...


If the hub is connected to the internet then the internet
connection can be shared with all the nodes on the
network
...

As all network traffic passes through the hub, monitoring
the content is easy
...
Hudson

PLCs
13 May, 2014

21

8
...
(BBC - GCSE Bitesize, 2014)

This configuration consists of a number nodes connected to a central cable (bus) as shown in Figure 11
...
Coaxial cable is usually used in bus networks
...
k
...
‘reflection’) where the signal bounces back across the bus
...
This allows only one device to transmit at a time
...
Data frames contain source and destination addresses
...

A node checks for an empty data slot (i
...
the absence of other traffic) before transmitting its’ data on the bus
...
It also handles collisions that occur when two nodes put data on the bus
at the same time
...
All nodes on the bus check the
recipient address of the message
...
The other nodes disregard the rest
of the message
...
The nodes check for a message but they are not responsible for moving the signal along
...
Hudson

PLCs
13 May, 2014

22

Table 11: Advantage / disadvantages of a Bus Topology

Advantages
Easy to set up
...

Easy to isolate one device from the others
...

Adding nodes located close to existing t-pieces and
terminators is easy
...


Disadvantages
Have to remember to properly terminate both ends of
the cable
...
Process what
is addressed to them and discard the rest
...
After
that performance degrades
...

Adding nodes to the middle of a long cable run requires
the cable be split and connectors (BNC) added
...

10BaseT cable is thick and inflexible and as a result
breaks easily if it is man-handled
...


Not suitable for heavy traffic systems
...


Long term maintenance cost may be higher than other
networks
...


HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
They may manually (requested by a supervisor) or automatically set or
change parameters used to controlling the remote equipment
...
Traditionally an ICS would be responsible for control of small to
medium processes in a single geographical area
...
It is now common, however, for older systems to be
described an ICS and modern ones as SCADA
...
V
...
As Figure 12 shows the SCADA PC is connected to the PLCs (and other control equipment) using
Ethernet
...
The SCADA is the
MODBUS master and the PLCs are the slaves
...
It is the standard communication protocol for connecting industrial electronic devices
...
Hudson

24

PLCs
13 May, 2014

Why use Modbus?
 Developed for industrial applications
 It is now vendor independent
 Openly published and royalty-free (Maintained by The Modbus Organization, Inc
...
The Modbus Organization will also provide the infrastructure
to obtain and share information about the protocols, their application and certification to simplify implementation
by users resulting in reduced costs
...
, 2014)

HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
d
...
[Online]
Available at: http://www
...
com/rs232
...

BBC - GCSE Bitesize, 2014
...
[Online]
Available at: http://www
...
co
...
shtml
[Accessed 17 05 2014]
...
, 2013
...
[Online]
Available at: http://www
...
nl/comm/info/RS-485
...

Brainboxes Limited, 2014
...

[Online]
Available at: http://www
...
com/faq/items/what-is-the-difference-between-rs422-communication-andrs485-com
[Accessed 13 05 2014]
...
DDC Online
...
ddc-online
...
html
[Accessed 13 05 2014]
...
Guidelines for Proper Wiring of an RS-485 (TIA/EIA-485-A) Network
...
maximintegrated
...
mvp/id/763
[Accessed 14 05 2014]
...
Data Communication
...

Mitsubishi Electric Europe B
...
, 2013
...
n
...
, 2014
...
[Online]
Available at: http://www
...
org/specs
...

Ögren, J
...
RS-232 (EIA-232) serial interface pinout
...
ru/SerialPorts/RS232_pinout
...

Smith, R
...
, n
...
RS485, RS422, RS232 AND RS423 Quick Reference Guide
...
rs485
...
html
[Accessed 11 05 2014]
...
Buy or Search TIA Standards
...
tiaonline
...


HNC Electrical and Electronic Engineering

Year One: 2013/14

Keith A
...
ModBus - Wikipedia, the free encyclopedia
...
wikipedia
...

Wikipedia, the free encyclopedia, 2014
...
[Online]
Available at: http://en
...
org/wiki/RS-422
[Accessed 16 05 2014]
...
RS-485 - Wikipedia, the free encyclopedia
...
wikipedia
...

Wikipedia, the free encyclopedia, 2014
...
[Online]
Available at: http://en
...
org/wiki/Serial_port
[Accessed 14 05 2014]
Title: Programmable Logic Controllers Networks and Communications
Description: Programmable Logic Controllers - Assignment 3: Networks and Communications Input/output I/O. Binary, hexadecimal and octal to denary conversions. Data Integrity: Longitudinal Redundancy Check (LRC), Cyclical Redundancy Checking (CRC). RS232 and RS422 signal communications. Networking topologies: star and bus. Grade received: DISTINCTION Tutor: Susan Armstrong Institute: Teesside University (TU), delivered by Middlesbrough College (MC) Programme: Higher National Certificate (HNC) in Electrical and Electronic Engineering