into1.pdf
-
Upload
steveberry -
Category
Documents
-
view
4 -
download
0
Transcript of into1.pdf
1/10/2015
1
Programmable Logic Controller
ETS-3543C (PLC)
Instructor: Magno R. guillen, PhD.
ETS 3543C
• PLC
• WHAT DO YOU EXPECT?
1/10/2015
2
ETS 3543C
• NUMERIC SYSTENS
• PROGRAMMABLE LOGIC
• PLC CONCEPTS
• ELECTROMECHANICAL IPUT DEVICE
• ELECTRONIC/MECHANICAL TIMERS
• ELECTRONIC/MECHANICAL COUNTERS
• SEQUENCING DEVICES
• OPERATION/FUNCTION OF ANALOG SENSORS/ACTUATORS
PLC INTRODUCTION
• PROGRAMMABLE LOGIC CONTROLLER (PLC)
is an industrial computer control system that
continuously monitors the state of input
devices and makes decisions based upon a
custom program to control the state of
output devices.
1/10/2015
3
PLC
PLC Operation
• Four Steps In The PLC Operations
1.) Input Scan Detects the state of all input
• 2.) Program Scan Executes the user created program logic
• 3.) Output Scan Energizes or de-energize all output devices.
• 4.) Housekeeping. This step includes communications with programming terminals, internal diagnostics, etc...
1/10/2015
4
PLC Operation
ACRONYMS• ASCII American Standard Code for Information Interchange
• BCD Binary Coded Decimal
• CSA Canadian Standards Association
• DIO Distributed I/O EIA Electronic Industries Association
• EMI ElectroMagnetic Interference
• HMI Human Machine Interface
• IEC International Electrotechnical Commission
• IEEE Institute of Electrical and Electronic Engineers
• I/O Input(s) and/or Output(s)
• ISO International Standards Organization
• LL Ladder Logic
• LSB Least Significant Bit
• MMI Man Machine Interface
• MODICON MOdular DIgital CONtoller
• MSB Most Significant Bit
• PID Proportional Integral Derivative (feedback control)
• RF Radio Frequency
• RIO Remote I/O
• RTU Remote Terminal Unit
• SCADA Supervisory Control And Data Acquisition
• TCP/IP Transmission Control Protocol / Internet Protocol
1/10/2015
5
I/O
PLC
1/10/2015
6
PLC
PLC
1/10/2015
7
1-13
IEC 61131 Languages
• Ladder Diagrams (LD)—Not the ladder logic languages provided by PLC vendors like Allen Bradley.
• Function Block Diagrams (FBD)
• Structured Text (ST)
• Instruction List (IL)
• Sequential Function Charts (SFC)
Note:
IEC 61131 is an IEC standard for programmable controllers. It was known as IEC 1131 before the
change in numbering system by IEC.
AB ladder logic is covered in the first 12 chapters and FBD, ST, and SFC are covered in the last 5.
Allen Bradley does not support the Instruction List language.
Ladder Logic
Traditional ladder logic is
graphical programming
language. Initially
programmed with simple
contacts that simulated
the opening and closing of
relays,
1/10/2015
8
Ladder Diagram
Ladder Logic
programming has
been expanded
to include such
functions as
counters, timers,
shift registers,
and math
operations.
Function Block Diagram
A graphical language for depicting signal and data
flows through re-usable function blocks. FBD is
very useful for expressing the interconnection of
control system algorithms and logic.
1/10/2015
9
Structured Text
ST is a high level text
language that encourages
structured programming.
It has a language structure
(syntax) that strongly
resembles PASCAL and
supports a wide range of
standard functions and
operators. For example;
Instruction List
IL is a low level
“assembler like”
language that is based
on similar instructions
list languages found in
a wide range of today’s
PLCs.
1/10/2015
10
Sequential Function Chart
SFC is s method of programming
complex control systems at a more
highly structured level. It is an
overview of the control system, in
which the basic building blocks are
entire program files.
Each program file is created using
one of the other types of
programming languages.
The SFC approach coordinates
large, complicated programming
tasks into smaller, more
manageable tasks.
Number system
1/10/2015
11
3A-21
Number SystemsDecimal-Binary-Octal-BCD-Hexadecimal
• Everyday tasks employ the decimal or base 10
number system.
• Base 10 is used in manufacturing automation to
input or display parameter values.
• Four other number systems are used: binary, octal,
binary coded decimal (BCD), and hexadecimal.
• Binary and hexadecimal are used most often in PLC
automation.
3A-22
Number System Basics 1 of 2Weight Value-Digit Value-Position Weight
• Number systems have a base or radix with position and weight values.
• In the decimal system the base is 10 (0 through 9 digit values).
1/10/2015
12
3A-23
Number System Basics 2 of 2Weight Value-Digit Value-Position Weight
• Position values increase from right to left starting
with zero to the left of the decimal point.
• The value of a decimal number is determined by
adding the product of the digits and their position
weight values.
• The following formula converts a number from any
base to base 10.
Number10 = Σ position digits x BasePosition value of the digit
3A-24
Binary Number SystemComparison with Decimal and Octal
(a) Comparison of number systems
1/10/2015
13
3A-25
Binary Number SystemBase 2 Binary System—Two Digits 0 and 1
• PLCs perform logic and calculations using binary electronic
circuits.
• The binary system uses just two digits to represent the value
of every number in a control system. For example:
1810 = 0100102
• 0100102 is pronounced “one zero zero one zero base two” and
not “ten thousand ten.” Leading zeros are dropped.
• The 1810 means 18 in the base 10 number system and the 2 in
0100102 indicates a binary or base 2 number.
3A-26
Binary to Decimal ConversionConversion Process—Binary to Decimal
1/10/2015
14
3A-27
Binary to Decimal ConversionConversion Description—Binary to Decimal
• The digit value in position 0 in Figure 3-3 is a 1, and each digit
value contributes to the final sum.
• The digit value of 1 in position 0 contributes a 1 to the sum of
products; the digit value of 1 in position 1 produces a 2 in the
sum of products; etc.
• Digit values of 0 contribute 0 to the final sum, and digit values
of 1 contribute their position weight to the sum.
• A review of the conversion process indicates that the values in
the sum of products column results from multiplying the digit
value by the digit weight.
3A-28
Decimal to Binary ConversionConversion Process—Decimal to Binary
1/10/2015
15
3A-29
Decimal to Binary ConversionConversion Description—Decimal to Binary
• Conversion from decimal to binary uses a series of divisions by
2.
• The remainder of the first division (1 in the Figure 3-4) is the
least significant bit (LSB) value of the binary equivalent
number.
• The remainder of the last division (1 in the Figure 3-4) is the
most significant bit (MSB) value.
• The result of each division (i.e., 42 in the first division) is used
for the next division.
• The processes indicates that 8510 is equal to 10101012.
3A-30
Octal Number SystemComparison with Binary and Decimal
(a) Comparison of number systems
1/10/2015
16
3A-31
Octal Number SystemBase 8 Octal System—Eight Digits 0 to 7
• Some PLC data is presented in the Octal values so a conversion is necessary.
• The octal system uses digits 0 to 7 represent the value of anumber. For example:
1510 = 178
• 178 is pronounced “seventeen octal” or “one seven base eight.”
• As a result of not using digits 8 or 9, the digits in the zero position value increases from 0 to 7, then start to repeat after 7.
3A-32
Conversion—Octal and Binary Conversion Process Between Octal and Binary
(a) Octal to binary and binary to octal conversion
1/10/2015
17
3A-33
Conversion—Octal and Binary Conversion Description—Octal and Binary
• Octal to binary—each octal digit, 0 through 7, is replaced with its three-bit binary equivalent.
• The three-bit binary groups are appended together to form the binary equivalent for the octal value.
• Binary to Octal—The binary number is partitioned into groups of three bits, starting at the least significant bit end of the binary value.
• Leading zeros are added if necessary to obtain the final group of three. Then each partition of three-bit binary numbers is converted to its equivalent 0 through 7 octal value.
3A-34
Octal to Decimal ConversionConversion Process—Octal to Decimal
(a) Octal to decimal conversion
1/10/2015
18
3A-35
Octal to Decimal ConversionConversion Description—Octal to Decimal
• Conversion from octal to decimal uses the following formula:
Number10 = Σ position digits x 8Position value of the digit
• Decimal value is the summation of all position digits times the
radix (8) raised to the power of the position value.
• The conversion of 158 to decimal is:
Number10 = 1 x 81 + 5 x 80 = 1 x 8 + 5 x 1 = 8 + 5 = 1310
• Conversion from base 10 to base 8 can be performed by first
converting from decimal to binary and then converting the
binary value into octal.
3A-36
Hexadecimal Number System • Due to the large number of digits, the binary number system
is hard to use when the number value represented is large.
• The hexadecimal system has fewer digits with large numbers and conversion to binary is easy.
• The hexadecimal system uses the base 16. These 16 digits are represented by the numbers 0 through 9 and the letters A, B, C, D, E, and F.
• Hexadecimal features:– Hex numbers are very compact.
– Easy conversion from hex to binary and binary to hex.
1/10/2015
19
3A-37
Comparison of Numbering Systems
Note that a lower case “b” is appended to the binary number, a lower case “q” is appended to the octal number and a lower case “h” is appended to the hexadecimal number.
3A-38
Binary to Hex Conversion
• Conversion from a binary number to hex number:
1. Break the binary number into 4-bit sections from the LSB to the MSB.
2. Convert each 4-bit binary number to its hex equivalent.
• Convert 10010011001011 into the hex equivalent.
10010011001011 (Binary number)
0010 0100 1100 1101 (Binary in 4-digit sections)
2 4 C D (Hex number equivalent)
• Note that there are only 2 digits in the most significant section, and leading zeros are added to make the 4-digit group.
1/10/2015
20
3A-39
Hex to Binary Conversion
• Conversion from a hex number to binary number:
1. Convert each hex number to its 4-bit binary equivalent.
2. Combine the 4-bit sections by removing the spaces.
• Convert AFB2 into the binary equivalent:
A F B 2 (Hex number)
1010 1111 1011 0010 (Binary equivalent)
101011110110010 (Binary digits combined)
3A-40
Hex to Decimal Conversion 1 of 2
• Conversion from hex to a decimal number is accomplished by the following four steps:
1. Multiply each hex digit by its weighted value.
2. Convert the hex digits to their decimal equivalent.
3. Convert the hex weighted values to decimals and complete the multiplication.
4. Add all the values.
1/10/2015
21
3A-41
Hex to Decimal Conversion 2 of 2
Example: Convert AFB2h to decimal
A x 163 + F x 162 + B x 161 + 2 x 160 (Weighted values)
10 x 163 + 15 x 162 + 11 x 161 + 2 x 160 (Decimal Equivalents)
10 x 4096 + 15 x 256 + 11 x 16 + 2 x 1 (Conversion)
40,960 + 3,840 + 176 + 2 = 44,978 (Multiplications & result)
3A-42
Decimal to Hex ConversionRepeated Division Method
• Divide the decimal number by 16, and convert the remainder to a hex number, and place it in the least significant digit of the final hex number.
• Continued by dividing the quotient by 16 and placing the remainder in the next most significant digit in the hex equivalent.
• The conversion is complete when the quotient is 0.
1/10/2015
22
3A-43
Repeated Division Method
3A-44
Bits, Bytes, and Words
• A single binary digit is a bit, and eight bits are a byte, pronounced like the word bite.
• Two bytes or 16-bits is a word, and two words or 32 bits represents a double word.
1/10/2015
23
3A-45
PLC Memory
• PLC memory is organized using either bytes, single words, or
double words.
• The memory has three binary interfaces:
– Data bus carries parameter values and PLC instructions.
– Control bus provides the logical control for movement of
instruction and data.
– Address bus carries the binary address number for all the
binary values stored in memory.
3A-46
PLC MemoryBlocks of Consecutive Bytes or Words
Memory layout
is 1k x 16-bit
words, where 1K
memory is
actually 1024
locations. Each
of the 1024 16-
bit words has a
10-bit address.
1/10/2015
24
In class work