0% found this document useful (0 votes)
27 views30 pages

ACFrOgDukzUr27P8sdt2Jvigr-AFlTd T7ipo Epb pCgOPq9aaUmJqyR2DIiWEZo1PD-OI5qO3VeBUWmt hF3ibI6jC3WDCZakj5xi2Nje6p8kgMfUE9fRUSSYTOf3UaF8XbgLKQ8N-sBXRarVV

Uploaded by

lollipop722018
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views30 pages

ACFrOgDukzUr27P8sdt2Jvigr-AFlTd T7ipo Epb pCgOPq9aaUmJqyR2DIiWEZo1PD-OI5qO3VeBUWmt hF3ibI6jC3WDCZakj5xi2Nje6p8kgMfUE9fRUSSYTOf3UaF8XbgLKQ8N-sBXRarVV

Uploaded by

lollipop722018
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Mandalay Technological University

Department of Electronic Engineering


2019-2020 Academic Year (1st Semester)

Programmable Logic Controller (EcE-51015)

Chapter 4
I/O PROCESSING

Lectures by

Dr. Myo Maung Maung


Input Units
Input Units
Multiplexer
• Involves more than one analog input being connected to the card and then
electronic switches used to select each input in turn.
• Cards are typically available containing 4, 8, or 16 analog inputs
Analog-to-Digital converter (ADC)
• A single analog input signal gives rise to on/off
output signals along eight separate wires.

• The eight signals then constitute the so-termed


digital word to the analog input signal level.

• With such an 8-bit converter there are 28 = 256


different digital values possible from 0000 0000
to 1111 1111, that is, 0 to 255.

• The digital output goes up in steps and the


analog voltages produce each digital output are
termed quantization levels.
The Resolution for ADC converter
• 8-bit ADC, the full-scale analog input signal varies between 0 and 10 V, a step of
one digital bit involves an analog input change of 10/255 V or about 0.04 V. e.g a
change of 0.03 V in the input will produce no change in the digital output.

• 10-bit ADC is used, then 210 = 1024 different digital values are possible and, for the
full-scale analog input of 0 to 10 V, it has change of 10/1023 V, or about 0.01 V.

• 12-bit ADC is used, then 212 = 4096 different digital values are possible and, for the
full-scale analog input of 0 to 10 V, it has change of 10/4095 V, or about 2.4 mV.

• The resolution of an n-bit ADC is 1/(2n – 1); this is sometimes approximated to 2-n .
ADC conversion for an 8-bit converter

Example:

• Thermocouple used as a sensor with a PLC and


giving an output of 0.5 mV /°C (accuracy).

• 10 bit ADC converter for 0 to 10V is used, one bit


change corresponds to 1/1023= 0.01V=10mV

• The accuracy which the PLC recognizes the input


from the thermocouple is ±5 mV or ± 10 °C.
Output Units
Digital-to-Analog Converter

DAC conversion for an 8-bit converter

• A bit in the 0 line gives rise to a certain size output


pulse.
• A bit in the 1 line gives rise to an output pulse of
twice the size of the 0 line pulse and so on.
• All the outputs add together to give the analog
version of the digital input.
Signal Conditioning
Changing Voltage Levels
Signal conditioning with a strain gauge sensor.

Example:
• a strain gauge—is connected in a Wheatstone bridge and the output is the difference between
two voltages or
• a thermocouple where the voltage difference between the hot and cold junctions is required
Remote Connections
Serial and Parallel Communications
• In serial communication, data is transmitted one bit at a time. Serial communication is used for
transmitting data over long distances.
• In parallel communication, all the constituent bits of a word are simultaneously transmitted along parallel
cables . This allows data to be transmitted over short distances at high speeds.
• With a PLC system, serial communication might be used for the connection between a computer
• Internally , PLCs work with parallel communications for speed. Thus, circuits called universal asynchronous
receivers/ transmitters (UARTs) have to be used at input/output ports to convert serial communications
signals to parallel.
Serial Standards
➢The most common standard serial communications interface is the RS232. Connections are
made via 25-pin D-type connectors
➢Configurations that are widely used with interfaces involving computers are as follows:
▪ Pin 1: Ground connection to the frame of the chassis
▪ Pin 2: Serial transmitted data (output data pin)
▪ Pin 3: Serial received data (input data pin)
▪ Pin 4: Request to send
▪ Pin 5: Clear to send
▪ Pin 6: Data set ready
▪ Pin 7: Signal ground, which acts as a common signal return path
▪ Pin 20: Data terminal ready
The signals pins 4, 5, 6, and 20 are used to check that the receiving end is ready to receive a signal, the
transmitting end is ready to send and the data is ready to be sent.
RS232 signal levels

• With RS232, a 1 bit is represented by a voltage between -5 and -25 V, normally -12 V, and
a 0 bit by a voltage between +5 and +25 V, normally +12 V.
• The parity bit is added to check whether corruption has occurred, with, in even parity, a 1 being
added to make the number of 1s an even number. To send seven bits of data, 11 bits may be
required.
• Other standards such as RS422 and RS423 are similar to RS232.
20 mA loop
An alternative to RS422 or RS423 is the 20 mA loop, which was an earlier standard
and is still widely used for long distance serial communication

Other buses that are used often in particular situations are


• Inter-IC Communication, or I2C, bus,
• Controller Area Network, or CAN, bus
• Universal Serial Bus, or USB, bus
• Firewire,
Parallel Standards
➢ The standard interface most commonly used for
parallel communications is IEEE-488.
➢ Listeners are devices that accept data from a
bus;
➢ Talkers place data, on request, on the bus; and
➢ Controllers manage the flow of data on the bus
and provide processing facilities
A bus has a total of 24 lines,
• 8 bidirectional lines are used to carry data and
commands between the various devices connected to
the bus,
• 5 lines are used for control and status signals,
• 3 are used for handshaking between devices, and
D-type connector is shown in Table 4.1
• 8 are ground return lines
Protocols
Definition:
It is necessary to exercise control of the flow of data between two devices so that
what constitutes the message, and how the communication is to be initiated and
terminated, is defined. This is termed the protocol.

ASCII Codes

American Standard Code for Information Interchange (ASCII).


Examples of ASCII codes are shown in Table 4.2.
Networks
➢ Local area network (LAN) is used to describe a communications network designed to link
computers and their peripherals within the same building or site.

Networks can take three basic forms


• Star form : the terminals are each directly linked to a central computer, termed the host
or master and terminals being called slaves
• Bus or single highway : For this network, each of the terminals is linked into a single cable
and so each transmitter/ receiver has a direct path to each other transmitter/receiver in
the network
• Ring network : a continuous cable, in the form of a ring, links all the terminals. Often
called peer to peer in that each terminal has equal status.
Three Basic Types of Network
Network Systems
➢ PLC manufacturers adopt different forms of network systems and methods of
communication for use with their PLCs.
For example:
• Mitsubishi uses a network termed MelsecNET
• AllenBradley has Data Highway Plus
• General Electric uses GENET
• Texas Instruments uses TIWAY and
• Siemens has PROFIBUS DP
Most, like Allen-Bradley, employ peer-to-peer forms. With Siemens, PROFIBUS DP is a
star, that is, a master/slave form.
Distributed Systems
• PLCs figure in an hierarchy of communications
• The lowest level we have input and output devices such as sensors and motors
interfaced through I/O interfaces with the next level.
• The next level involves controllers such as small PLCs or small computers, linked
through a network, with the next level of larger PLCs and computers exercising local
area control. These in turn may be part of a network, with a large mainframe
company computer controlling all.
• The term SCADA, which stands for supervisory control and data acquisition system,
is widely used for such a system.
SCADA System
Network Standards
➢ International Standards Organization (ISO) in 1979 devised a model to be used for standardization for
open systems interconnection (OSI)
➢ The model is termed the ISO OSI model. A communication link between items of digital equipment is
defined in terms of physical, electrical, protocol, and user standards, the ISO OSI model breaking this
down into seven layers (Definition 4.4.2)
1. Physical medium
2. Data link
3. Network
4. Transport
5. Session
6. Presentation
7. Application
Ethernet
• Ethernet does not have a master station, each connected station being of equal
status, and so we have peer-to-peer communication.
Processing Inputs
• A PLC is continuously running through its program and updating it as a result of
the input signals. Each such loop is termed a cycle

The time taken to complete a cycle of scanning inputs and updating outputs according to
the program instructions, that is, the cycle time

Mitsubishi compact PLC, MELSEC


FX3U has a quoted program cycle
time of 0.065 ms per logical
instruction
I/O Addresses
Mitsubishi PLC we might have
• inputs with addresses X400, X401, X402, and so on and
• outputs with addresses Y430, Y431, Y432, and so on, the X indicating an input and the Y an
output.
Allen-Bradley PLC-5 have an
• input with address I:012/03. This would indicate an input, rack 01, module 2, and terminal
03.
Siemens SIMATIC S7
• I0.1 is an input at bit 1 in byte 0, and Q2.0 is an output at bit 0 in byte 2.
GEM-80 PLC
• A3.02 is an input at terminal 02 in module 3, and B5.12 is an output at terminal 12 in
module 5.
ASCII
References:
Programmable Logic Controllers
Fourth Edition and Six Edition(W. Bolton)
Thank You!

You might also like