programmable logic controller (plc) - lecture-notes.tiu.edu.iq
TRANSCRIPT
PLC’s
• What is PLC?
• PLC is a special purpose computer that can accept inputs and provide outputs in the form of electrical signals.
• PLC are Microprocessor based devices
25/10/2020 2
Schematic Diagram of a PLC
25/10/2020 3
ProgrammingDevice
Program & Data Memory
CommunicationInterface
Processor
Power Supply
InputInterface
OutputInterface
Advantages of PLC’s• PLCs have been gaining popularity on the factory floor
and will probably remain predominant for some time to come. Most of this is because the advantages they offer, such as:
• Cost effective for controlling complex systems
• Flexible and can be reapplied to control other systems quickly and easily
• Computational abilities allow more sophisticated control
• Troubleshooting aids make programming more easier and reduce downtime
• Reliable components are likely to operate for years before failure
25/10/2020 4
Requirements
✓No Pre-requirements for this course
So far your study have been encountering two main features
• 1 Analysis
• 2 Computation
• 3 Analysis and Computation
25/10/2020 5
Number Systems (Radix or Base):
103 102 101 100
7 9 8 5
3 2 2 0
6 0 4 1
7 x 103 + 9 x 102 + 8 x 101 + 5 x 100
3 x 103 + 2 x 102 + 2 x 101 + 0 x 100
6 x 103 + 0 x 102 + 4 x 101 + 1 x 100
1. Decimal system Base 10
25/10/2020 6
2. Binary Base 2• Advantages Logic operations are the backbone of any digital computer,
although solving a problem on computer could involve an arithmetic operation too. The introduction of the mathematics of logic by George Boole laid the foundation for the modern digital computer. He reduced the mathematics of logic to a binary notation of ‘0’ and ‘1’. As the mathematics of logic was well established and had proved itself to be quite useful in solving all kinds of logical problem, and also as the mathematics of logic (also known as Boolean algebra) had been reduced to a binary notation, the binary number system had a clear edge over other number systems for use in computer systems.
• Yet another significant advantage of this number system was that all kinds of data could be conveniently represented in terms of 0s and 1s. Also, basic electronic devices used for hardware implementation could be conveniently and efficiently operated in two distinctly different modes. For example, a bipolar transistor could be operated either in cut-off or in saturation very efficiently. Lastly, the circuits required for performing arithmetic operations such as addition, subtraction, multiplication, division, etc., become a simple affair when the data involved are represented in the form of 0s and 1s.
25/10/2020 7
Floating Point Numbers
25/10/2020 8
The Four Parts of a Number
Sign Mantissa Radix exponent
-1 80 10 -1
-1 8 10 0
-1 0.8 10 1
-1 0.08 10 2
Decimal point
Binary 23 22 21 20
0 0 0 00 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 1
25/10/2020 9
25/10/2020
23
8
22
4
21
2
20
1
1 1 0 1
1 0 1 0
0 1 1 0
0 0 1 1
15
5
9
1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
1 x 23 + 0 x 22 + 1 x 21 + 0 x 20
0 x 23 + 1 x 22 + 1 x 21 + 0 x 20
0 x 23 + 0 x 22 + 1 x 21 + 1 x 20
25/10/2020 10
Decimal →Binary Conversion
• 1101 → 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 =13
10 ÷ 2 = 5 → 05 ÷ 2 = 2 → 12 ÷ 2 = 1 → 01 ÷ 2 = 0 → 1
Hence the result is 1010
25/10/2020 11
Examples• Convert the following binary numbers to
decimal
11001 100101 11111111 1010
• Convert the following decimal numbers to binary
55 220 1024 528 300 11
25/10/2020 12
Biggest number is: bn – 1
128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1
24 -1= 15
28 -1= 255
104 -1= 9999
25/10/2020 13
Complements and Arithmetic
• 9’s and 10’s Complements
• 1’s and 2’s Complements
• 7’s, 8’s, 15’s and 16’s Complements
• Arithmetic
25/10/2020 15
Logic Systems
• Logic systems are the base for Automation
• Our minds works on reasoning (Cause and Effect)
• We get on with our daily life by making logical decisions
• Issue → Logical Analysis→Decision
25/10/2020 16