Documente Academic
Documente Profesional
Documente Cultură
for
Fr<JnJ.. D. Pctruvctla
Puhli ... cd hy T\kGr~1\\ Hill h Higher Education. lnc. an imprint of The McGraw-Hil! (,-, 2f)()). Comp.mic ....
J
J()()2(). Copynght
I}l)X.
II)X9
hy The T\kGraw-Hill
Nil pan vtorcd
Companicv. Illay
distributed
Of
hy any I1l1..·;I0 v. or
T\kGr;lw-HIlI
Of
or rctricval
otThc ,llIragl'
Cornpanic-, or hroudcuct
®
ISBN
Th" hook i, printed on recycled. acid-Free paper containing III'; povtconsumcr '''''Ie
www.mhhc.corn
CONTENTS
Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter Chapter
Programmable Logic Controllers (PLCs): An Overview PLC Hardware Components Number Systems and Codes Fundamentals of Logic Basics of PLC Programming Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs
2 3 4
5 6
13 31 41 57
73
7 8
9 10 11 12 13 14 15
Programming Timers Programming Counters Program Control Instructions Data Manipulation Instructions Math Instructions Sequencer and Shift Register Instructions PLC Installation Practices, Editing, and Toubleshooting Process Control and Data Acquisition Systems Computer-Controlled Machines and Processes
Name
Date
Score ---
Answer
1.
2.
3.
4. Which of the following is not an advantage that PLCs offer over the
conventional relay-type of control system? a) Smaller size c) Higher current capacity b) Less expensive d) More reliable
4.
5. The basic difference between a PLC and relay control system is that:
a) b) c) d) different types of input devices are used. different types of output devices are used. different input and output voltage levels are used. one uses relay control logic and the other uses programmed instructions.
5.
6.
7.
8.
---
9.
10. The power required to operate the logic circuits of the processor unit is:
a) low voltage ac. b) high voltage ac. c) low voltage dc. d) high voltage dc.
10.
11.
device: a) allows the programmer to enter the program into the PLC. b) is always a CRT screen device. c) is used by the programmer to bring the process signals into the output interface. d) is all of the above.
12.
device must be connected to the controller: a) at all times. c) when monitoring a program. b) when entering a program. d) both band c.
13.
14·1.
symbol in a ladder logic diagram represents a(n): a) set of normally open contacts. b) imaginary coil that, when energized, can close an output interface contact. c) contact that will seal itself in once it closes. d) field load or sensing device.
14·2.
15. ---
16. When the controller is first placed in the run mode, the status of all
process contacts connected to the input module interface: a) is recorded in memory. b) depends on the program. c) is controlled by the CPU. d) is controlled by the output logic.
16.
17.
18.
19.
20.
21.
Chapter 1
ta· _
22·1. in the PLC block diagram of Fig. 1-1, block NO.1 represents the:
a) CPU unit. b) programming device. c) input module. d) output module.
L1 1---
22·1.
L2 120ae V --_+---jll
No.1
Fig. 1·1
22·2.
22·3.
22·4.
23·1.
23·2. In the circuit of Fig. 1-2, the voltage measured between L2 and
terminal 3 (push button open) would be approximately: a) 0 volts. c) 100 volts. b) 120 volts. d) 40 volts.
23·2.
23·3. In the circuit of Fig. 1-2, the devices connected to terminals 1, 2, and
3 can be classified as: a) field sensing devices. b) internal programmed sensing devices. c) field load devices. d) internal programmed load devices. 4 Chapter 1
23·3.
24·1.
__
24·2.
__
1+-----Pressure switch
""'__-o...
-111
~~---{
'1'
~--~
_l_
Manual pushbutton
~----~
25·1.
25·2. In the diagram of Fig. 1-4, whenever there is a conducting path from
left a) b) c) d) to right 1/1, 112, 1/1, 1/2, 1/1 and 111 and across the rung: and 1/3 will all be at logic 1. and 1/3 will all be at logic O. 1/2 or 1/3 will be at logic 1. 1/2 or 1/3 will be at logic O.
25.2.
OIl 1/2
1/3
Fig. 1.4
Chapter 1 5
26. Normally, on larger PLC systems, the purpose of the PLC power
supply module is to power the: a) field devices. b) input devices. c) output devices. d) PLC modules.
26.
---
27.
28. Which module of the PLC connects to field devices such as pilot
lights, motor starters, and solenoids? a) Input c) Power supply b) Output d) Memory
28.
29.
II0s are typical of small PLCs that come in one package with no separate removable units. a) Fixed c) Digital b) Modular d) Analog
29.
30. PLC software that runs on a personal computer can be used to:
a) b) c) d) write a PLC program. document a PLC program. monitor and control the process. all of the above.
30.
31.
32. Which of the following is not a factor effecting the memory size
needed for a particular PLC installation? a) Voltage rating of field devices c) Size of control program b) Number of 1/0 points d) Supervisory functions required
32.
Name
Date
Score ----
TEST 1-2
Place the answers to the following questions in the answer column at the right. Answer
1.
2.
3a.
3b.
3c.
3d. _
3e.
4. 5.
6. A(n)
device is required to enter the control program into the memory of the processor.
6.
7a.
7b.
7c.
7d.
Chapter 1 7
/{fii;i1l
_ _
11. 12.
_ _
is the process of reading inputs, executing the program, and setting outputs on a continuous basis.
_ _ _ _
14. Categorization
17. The
feature provides the single greatest benefit of PLCs over hardwired control.
_ _ _
_ _
24.
35.
36. The PLC requires a CD drive. (True or False) 37. Software written and run on a personal
computer can be used to write a PLC program. (True or False)
36. 37.
38. A
38. 39.
39. The
for a particular PLC lists all instructions along with a short description of their operation.
Chapter 1
PROGRAMMING
14-----Pressure switch
+----0...
~o--_---{
L2 ......---lll
+----0..
.L
Fig. 1·5 2·1. On a separate sheet of paper, draw
a ladder logic diagram for the modified relay ladder schematic shown in Fig. 1-6.
Manual pushbutton
Fig. 1·6
C
TEST 2-1
HARDWARE
OMPONENTS
Choose the letter that best completes the statement. 1. One function of a PLC input interface module is to: a) accept signals from the process field devices and convert them into signals that can be used by the processor. b) convert signals from the processing unit into values that can be used to control the machine or process. c) Input signals from the programming device and convert them into signals that can be used by the CPU. d) interpret and execute the user program that controls the machine or process. Answer
1.
2.
3.
4. The following statement that does not apply to the optical isolator
circuit used in I/O modules is that it: a) separates high voltage and low voltage circuits. b) rectifies ac signals. c) prevents damage caused by line voltage transients. d) reduces the effect of electrical noise.
4.
5.
6.
13
7.
---
8.
9.
10. Volatile memory elements can be classified as those that: a) do not retain stored information when the power is removed. b) retain stored information when the power is removed. c) do not require a battery backup. d) both band c. 11. is designed to permanently store a program that cannot be altered under any circumstances. a) RAM c) EPROM b) PROM d) EEPROM
10.
11.
12.
13.
14. The most common form of memory used to store, back up, or transfer
PLC programs is: a) RAM b) PROM c) EPROM d EEPROM
14.
15. __
14
Chapter 2
16. Status indicators are provided on each output of an output module to indicate that the: a) load has been operated. b) input associated with the output is active. c) module fuse has blown. d) output is active. 17. The I/O system provides an interface between: a) input modules and output modules. b) the CPU and field equipment. c) the CPU and I/O rack. d) the I/O rack and I/O modules. 18. The PLC chassis comes in different sizes according to the: a) size of the program. c) number of slots they contain. b) type of I/O modules used. d) all of the above. 19.1. Section No.1 of the input module block diagram in Fig 2-1 is the: a) power section. c) logic section. b) high voltage section. d) both a and b. 19.2. The output from section No.2 in the input module block diagram of Fig. 2-1 is: a) high voltage ac. c) high voltage dc. b) low voltage ac. d) low voltage dc.
No.1 No.2
16. ---
17. ---
18.
19·1.
19·2.
Fig. 2-1
20-1. The simplified schematic diagram of Fig. 2-2 is that of a(n): a) discrete output module. c) discrete input module. b) analog output module. d) analog input module. 20-1. _
No.1 R1
R2
! ----{i--i
---:
20·2.
20·3.
20·4.
21.
.... -11
Fig. 2·3 22·1. The simplified schematic diagram of Fig. 2-4 is that of a(n):
a) discrete output module. b) analog output module. c) discrete input module. d) analog input module.
22·1.
22·2. The input signal in the schematic of Fig. 2-4 is obtained from:
a) b) c) d) an input field device. an output field device. internal logic circuitry of the processor. either a or b.
22·2.
-------------~
16
Chapter 2
..:
22.3. The purpose of the triac in the schematic of Fig. 2-4 is to:
a) switch current to the lamp ON and OFF. b) vary the current flow to the lamp in accordance with the input signal level. c) vary the voltage across the lamp in accordance with the input signal level. d) both band c.
22·3.
22.4. When the triac in the schematic of Fig. 2-4 is in the OFF state:
a) b) c) d) no current flows through the lamp. a small leakage current flows through the lamp. the rated surge current flows through the lamp. the rated nominal current flows through the lamp.
Lamp output
22·4.
Fig. 2·4 23. The circuit of Fig. 2-5 is an example of how a PLC output is
connected to: a) isolate the load from the controller. b) control a high voltage circuit.
r-
23.
CR
OL
Starter coil
Fig. 2·5
Chapter 2 17
24.1. The terminal connection diagram shown in Fig. 2-6 is that of a(n):
a) b) c) d) discrete output module. analog output module. discrete input module. analog input module.
24.1.
24·2. Shielded cable is used in wiring the circuit of Fig. 2-6 to:
a) b) c) d) reduce unwanted electrical noise signals. carry the higher current required. lower the resistance of the conductors. insulate the circuit from other cables.
24·2.
User de supply
Fig. 2·6
25·1. In the block diagram of the central processing unit (CPU) shown in
Fig. 2-7, blocks No.1 and No.2 represent the: a) processing and memory units. b) processing and power supply units. c) memory and programmer units. d) memory and power supply units.
25·1.
25·2.
-----------~.;;;>
18 Chapter 2
25.3. Which of the following is the main function of the CPU unit?
a) Signal conditioning b) Signal isolation c) Program and monitor system d) Execute program
25·3.
r-,
No.1
r-,
No.2
<,
<,
I'\...
NO.3
-,
<,
-,
Fig. 2·7
26.
27.
28.
29.
field devices typically requires that they be used in a specific sinking or sourcing circuit. a) input c) dc b) output d) ac
30.
31. The
of an analog I/O module specifies how accurately an analog value can be represented digitally. a) number of inputs and outputs per card b) input impedance and capacitance c) resolution d) common mode rejection ratio
31.
32.
33.
34.
35.
a) ROM b) RAM
memory is used by the PLC for the operating system. c) PROM d) EEPROM
35.
36.
TEST 2-2
Place the answers to the following questions in the answer column at the right. Answer
"~;iIJ
"11111111111111111111
_ _ _
1. 2. 3.
4.
s.
The l/O address is used by the processor to identify where the device is _
s.
6a.
_
_ ___ _ _ _
-type
11.
12.
Chapter 2
21
13. A(n)
load currents.
_ _ _
16.
cable is often used in low voltage input signal circuits to reduce unwanted electrical noise.
17.
_ _ _ _ _
_
19. The processor continually interacts with the ___ to interpret and execute the user program.
19. -----------
20.
21.
22.
23.
24.
25.
_ _ _ _ _
27. 28.
_ _
Chapter 2
23
_ _ _ _ _ _
0000 0000
0000 0000
Input
Output
INPUTS
OUTPVTS
e
~o
~1
e
~o
~1
-(d)
(b)
~2
(c)
~2 ~3 ~4
~5 ~6
~3 ~4
~5 ~6
~7
~7
e
Fig. 2·8
(b)
32.
33.
37.
Chapter 2
__ ___ __ _
40b. 40c.
41.
Fig. 2·9
_ _ _ _
_ _ _ _ _ _
_ _ _ _ _ _ _
PROGRAMMING
FOR CHAPTER
ASSIGNMENTS
For the PLC you will be working with. record each of the following specifications for the input module(s): a) Inputs per module b) Nominal input voltage c) ON-state voltage range d) Nominal current per input e) Input delay f) Electrical isolation For the PLC you will be working with. record each of the following specifications for the output module(s): a) Outputs per module b) Nominal output voltage c) Output voltage range d) Maximum output current rating per output e) Maximum output current rating per module f) Short circuit fuse protection g) Maximum surge current per output h) OFF-state leakage current per output i) Electrical isolation For the PLC you will be working with, record each of the following specifications for the processor unit: a) Nominal input voltage b) Input voltage range c) Maximum power requirements d) Memory type e) User memory size f) I/O capacity g) Typical scan time h) Overload fuse protection
to.
Program the controller with two inpul switch devices and two output lamp loads as shown in Fig. 2-17 of Chapter 2 of the text. Enter the run mode and observe the input and output status table files.
UMBER D
SYSTEMS
CODES
Choose the letter that best completes the statement. 1. The decimal system has as its base: a) 2. c) 8. b) 5. d) 10.
Answer
1.
2.
3. In any number system, the position of a digit that represents part of the number has a "weight" associated with its value. The place weights for binary: a) start with 1 and are successive powers of 2. b) increase by adding 2 for each place, starting with O. c) increase by adding 2 for each place, starting with 2. d) start with 2 and double for each successive place.
3.
4.
5.
b) 1000.
c) 4C. d) 00011001.
6. The binary number 101 has the decimal equivalent of: a) 3. c) 41. b) 101. d) 5. 7. The number 127 could a) decimal. b) hexadecimal.
6.
not
7.
8.
9. The binary number 101101 would be written in decimal as: a) 21. c) 45. b) 36. d) 62.
9.
31
10.
11.
12.
13.
14.
15.
c) No.3. d) No.4.
NO.3
1'1'1'10101,10101,1'101,100
1+----------Fig. 3·1
I.
No.1
----+1·1
16. _
No.4 -----------+1
17.
32
Chapter 3
18.
b) binary code decoder. d) base-coded decimal.
19. For a base 8 number system, the weight value associated with the
third digit would be: a) 16. b) 32. c) 64. d) 512.
19.
20. All digital computing devices operate using the binary number
system because: a) most people are familiar with it. b) large decimal numbers can be represented in a shorter form. c) digital circuits can be easily distinguished between two voltage levels. d) all of the above.
20.
21. If a given memory unit consists of 1250 16-bit words, the memory
capacity would be rated: a) 1250 bits. b) 20,000 bits. c) 3260 bits. d) 156 bits.
21.
22.
23. The 2's complement form of a binary number is the binary number
that results when: a) all the1 's are changed to O's. b) all the O's are changed to 1'so c) 1 is added to the 1's complement. d) both a and b
23.
24.
25. A(n)
bit is used to detect errors that may occur while a word is moved. a) parity c) positive b) negative d) overflow
25.
----------Chapter 3 33
TEST
3-2
1. 2. 3a. 3b. 4. 5.
.::..•...
Answer
Place the answers to the following questions in the answer column at the right.
_
__ _ _ __ _ _
1. PLCs work on
4. Each digit of a binary number is known as a(n) 5. With reference to processor memory locations,
the term register is often used interchangeably with _
6. 7.
_ _
8a.
Number Systems a) Binary b) Decimal c) Octal d) Hexadecimal
_
__
8b.
2 16 10 8
8e.
8d. 9.
_
_ _
Chapter 3
35
12. The
14. 15.
in decimal. in binary. in
36
Chapter 3
24. The radix of a number system is the same as the base. (True or False)
24. ----------
25.
26a.
26b.
27. ----------28. ----------29. -----------
__
_
",,,,/;:.,,.'
---------Chapter 3
37
ASSIGNMENTS
2·1. Complete the following chart using the change radix function of the PLC or a scientific calculator.
Binary 101
Octal 11
Decimal
Hexadecimal
5
15 16
1001011
47 73
UNDAMENTALS
OF
LOGlc_
Choose the letter that best completes the statement. 1. The binary concept makes use of the fact that certain information: a) can exist in one of two possible states. b) can be broken down into smaller units for easier analysis. c) can be divided into two or more categories. d) can be divided into two, or multiples of two, categories.
Answer
1.
2.
3.
4.
5.
6.
7. The NOT function can be thought of as: a) a FALSE-to-TRUE converter. b) a changer of states.
7.
c) an inverter. d) all of the above.
some device.
8.
9.
10.1.
10·2. The Boolean equation for the logic symbol drawn in Fig. 4-1 is:
10·2.
Fig. 4·1 11·1. The logic symbol drawn in Fig. 4-2 is that of a(n):
a) AND function. b) OR function. c) NOT function. d) NOR function.
11·1.
Fig. 4·2 11·2. The Boolean equation for the logic symbol drawn in Fig. 4-2 is: a) Y = A + B + C c) Y = (AB) + C
b) Y= ABC d) Y= (A - B)C
11·2.
12. With reference to the logic circuit of Fig. 4-3, the output Y will be at
a logic 1 when: a) inputs A and B are logic 1. b) input A or B is logic 1. c) input A is at logic 1 and input B is at logic O. d) input A is at logic 0 and input B is at logic 1.
12.
:-G=D,______Y
Fig. 4·3
------------~.-.~:.
42 Chapter 4
13·1.
Fig. 4·4 13·2. The truth table for the logic symbol drawn in Fig. 4-4 is:
Inputs Output Inputs A Output
13·2. __
AB
y 0
o o
0
1
00 0 0 0
(a) (c) Output Inputs A
0 0
Inputs
Output
AB
y 0 0 0
(d)
o o
0
1
00 0 0 0
(b)
14·1.
-{>-Fig. 4·5 14·2. The Boolean equation for the logic symbol drawn in Fig. 4-5 is: a) A = Y c) A = Y b) A = B d) A = Y 14.2. _
15. The Boolean expression for the logic circuit drawn in Fig. 4-6 is: a) Y= ABC c) Y= (A + B)C b) Y = A + B + C d) Y = AB + C
A
15.
---
c--===------{ Fig. 4·6 16. The Boolean expression for the logic circuit drawn in Fig. 4-7 is:
a) b) c) d)
A
16.
Y= Y= Y= Y=
o --==------i
Fig. 4·7 17. Which of the following algebraic laws holds true for Boolean
algebra only? a) A + B = B +A b) A· B= B· A c) A· (B + C) = (A. B) + (A. C) d) A + (B. C) = (A + B) • (A + C)
17.
18.
(a)
(b)
A 8
(d) (c)
Fig. 4·8
--------------~
44
Chapter 4
..
,;.~ :,.
..
19. Which of the following is the circuit for the Boolean expression
y= A(BC+ 0):
8 C 0
19.
Y
A (a) A 8 C 0
(b) A 8 C 0 (c)
(d)
20. Which of the following is the circuit for the Boolean expression y= (A + B)(C+ O)?
A 8 0 C
20.
(a) A 8 C
D (b)
Chapter 4
\_
,.~'
....
45
..
.:
'~..f
(c)
(d)
21. The Boolean expression for the logic circuit drawn in Fig. 4-9 is:
a) Y = AB + AB b) Y = (AB)(AB) c) Y = AB + AB d) Y = (A + B)(A + B)
21.
Fig. 4·9 22. The Boolean ex_pression for the logic circuit ~awn in Fig. 4-10 is:
a) (A + E) DCB b) AE(D + C + B)
A
22.
c) (AE + D) CB d) (A + E) DCB
0--------------7
c------------------------~
Fig. 4·10
23·1. With reference to the ladder logic program of Fig. 4-11, part No. 1
represents the: a) indicating light. b) normally closed contact.
___________________
23·1.
46
Chapter 4
23.2. With reference to the ladder logic program of Fig. 4-11, part No.2
represents the: a) rail. b) rung. c) + side of voltage source. d) - side of voltage source.
23·2.
23.3. With reference to the ladder logic program of Fig. 4-11, the number
of outputs per rung is: a) 1 b) 2
Stop 111 Start
23·3.
1:~
1/2
009
c) 3 d) unlimited.
OL ~ 0/1/
1/3
No.1
1------11
0/1
0/2
0/1
No.2
Fig. 4·11 24·1. Which of the following is the relay schematic for the ladder log
program drawn in Fig. 4-12?
A
~c
8
~YI ~SI:r1oL
'"
(a) (b)
24·1.
~SI::r1LS2 H
eg,
Ie) (d)
Fig. 4.12
Chapter 4
47
24·2. Which of the following is the equivalent logic circuit symbol for the
ladder logic program drawn in Fig. 4-12?
24·2.
(a)
(e)
(b)
(d)
24·3. Which of the following is the Boolean equation for the ladder logic
program drawn in Fig. 4-12? a) (AB) + C = Y b) A + B + C = Y c) ABC = Y d) (A + B)C = Y
24·3.
25.
26.
27.
28.
29. If you want to know when one or both matching bits in two different
words are ON, you would use the a) AND c) OR b) XOR d) NOT logic instruction.
29. ---
48
Chapter 4
TEST 4-2
Place the answers to the following questions in the answer column at the right. Answer
1.
2.
3.
___
4.
5. The
are 1.
5.
6. The
inputs are 1.
6.
__
7. The NOT output is 1 if the input is 8. The NOT function is also called a(n)
7. 8.
__ __
Chapter 4
49
SYMBOLS
(1)
(2)
(3)
(4)
Fig. 4·13
LOGIC FUNCTIONS a) AND b) OR c) NOR d) NOT e) NAND
(5)
9a. 9b.
_ _
9c.
9d. ge. 10. 11.
algebra.
__
__ __ __ __
12. The OR function, expressed as a Boolean equation, would be Y = AB. (True or False) 13. The correct Boolean expression for the logic
circuit in Fig. 4-14 is _
12. 13.
__ _
C----------------7 Fig. 4·14 14. The correct Boolean expression for the logic
circuit in Fig. 4-15 is __
14.
__
Fig. 4·15
50
Chapter 4
••••••••••••••••••••••••••••••
~~'.i,+.,:
15. The correct Boolean expression for the logic circuit in Fig. 4-16 is _
15.
8-----~
Fig. 4·16
16. The correct Boolean expression for the logic circuit in Fig. 4-17 is _ 16. _
c------Fig. 4·17
17. Hardwired logic refers to logic control functions determined by the way devices are interconnected. (True or False) 18. Hardwired logic can be implemented using relays and relay schematics. (True or False) 19. Hardwired logic is fixed and is changeable only by altering the way devices are connected. (True or False) 20. Programmable control is based on logic functions that are programmable and easily changed. (True or False) 21. symbology is a way of expressing the PLC control logic in terms of relay-equivalent contacts and coils. 17. _
18.
19.
20.
21.
22. There is no difference between a relay schematic and a ladder logic program. (True or False) 23. On some PLCs, only one output is allowed per ladder logic rung. (True or False) 24. A rung is the contact symbology required to control an output. (True or False) 25. The most common PLC programs. is ladder logic
22.
23.
24.
25.
__
Chapter 4
51
26.
A and B
A or B
not A
A xor B
27.
-------------------
Fig. 4·18 28. What will be the data stored in the destination
address B3:27 of Fig. 4-19 when the input is true?
NOT--------, NOT Source A 83:25 1100110011001100 Destination 83:27
28.
__
Fig. 4·19 29. Draw a PLC ladder diagram program for the gate
logic array shown in Fig. 4-20.
29.
__
Fig. 4·20
;==-~
30. __ IiMot_ ....
30. Draw the equivalent gate logic array for the PLC
ladder diagram shown in Fig. 4-21.
PROGRAMMING
FOR CHAPTER
ASSIGNMENTS
1. Program the relay schematic of Fig. 4-22 using a PLC and check for operation.
Relay schematic
2. Program the relay schematic of Fig. 4-23 using a PLC and check for operation.
Ladder logic program
Boolean equation: AB = Y
Fig. 4-22
p
~
Boolean equation: A + B = Y
Fig. 4-23
3. Program the relay schematic of Fig. 4-24 using a PLC and check for operation.
Relay schematic Ladder logic program
Fig. 4·24
Relay schematic
Boolean equation:
(A + BHC + D) = Y
Fig. 4·25
Relay schematic Ladder logic program
Boolean equation:
(AB) + C = Y
Fig. 4·26
Relay schematic Ladder logic program
f:1:fj
Fig. 4·27
Relay schematic
~::I---------l
=
Y
~~'1
~~'PI
_LS1_
~~
~OL
I
Boolean equation: AS
Fig. 4·28
A 8 C
o
E y
_l
Fig. 4·29
9. Develop a PLC program that will simulate the operation of the XOR function. Enter the program into the PLC and prove its operation. 10. A conveyor will run when anyone of four inputs are on. It will stop when anyone of four other inputs are on. Develop a PLC program that will simulate this operation. Enter the simulated program into the PLC and prove its operation. 11. Develop a PLC program that will simulate the gate array logic shown in Fig. 4-29. Enter the simulated program into the PLC and prove its operation. 13. Enter the logical XOR program shown in Fig. 4-31 into the PLC. Use the data monitor function to store the following data: 83:5
83:6 = 10100111 0111 0111 Run the program and verify that 83:7 contains the following bit pattern: 83:7 = 0000 1011 0000 1000
XOR----------~ Source A Source B Destination 83:5
o o o
B3:6 83:7
83:3
Fig. 4.30
Chapter 4
55
ASICS
OF
OGRAMMI
••
'
Answer
1. The
will account for most of the total memory of a given PLC system. c) user program a) input image table file d) internal operating instructions b) output image table file
1.
2.
3·1.
r------I
---~,
1
/ /
001
~,,~-'~~~-r~~~~~~~ 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2
Fig. 5·1 3·2. The status bit of the light shown in Fig. 5-1 is stored in:
a) word 001 and bit 04. b) word 04 and bit 001. c) word 001 1000. d) word 0001 001.
3·2.
3·3. The status bit of the light shown in Fig. 5-1 is controlled by the:
a) b) c) d) connection of outputs. connection of inputs. processor as it interprets the user program. EXAMINE IF CLOSED instruction.
3·3.
4. With reference to the typical program scan illustrated in Fig. 5-2, part A represents the: a) program scan. b) period during which the instructions are executed. c) I/O scan. d) both a and b.
Part A
4.
Fig. 5·2 5. Memory organization defines how certain areas of memory are
used and is commonly referred to as a: a) program. b) data sheet. c) processor. d) memory map.
5. __
~_
6·1. If a PLC has a total scan time of 10 ms and has to monitor a signal
that , then the controller may not detect this change. a) changes state once in 20 ms c) is constantly changing b) is fast d) changes state twice in 5 ms
6·1.
6·2. Which of the following is not a factor in determining the total scan
time of a PLC? a) Memory protection b) Program content c) Program length d) Total number of inputs and outputs used
6·2.
6.3.
7·1.
7·2. ---
A represents an: EXAMINE IF CLOSED instruction. EXAMINE IF OPEN instruction. OUTPUT ENERGIZE instruction. INPUT ENERGIZE instruction.
8·1. ---
8·2.
8·3.
8·4. In Fig. 5-3, which of the following input combinations will result in
an output? a) A and Band C and 0 b) A and not Band C and 0
8·4.
c) E and 0 d) E and not 0
9.
10. The programming of a normally open PLC contact is called for when the:
a) b) c) d) normal state of the input device normal state of the input device contacts must close to energize contacts must open to energize is ON. is OFF. the output. the output.
10.
Chapter 5
59
11.
---
12. The most likely five-digit address for LS1 of Fig. 5-4 would be:
a) 0:01/02. b) LS1 01.
Rack 0 L1 Group 2
12.
L2
13.
14.
is-i.
~.":t,
15·2.
15.3. The maximum number of series contacts allowed per rung is:
a) b) c) d) one. four. five. limited only by the memory size.
15·3.
15·4.
16.
E.
A B y
Fig. 5·6 17. The Boolean equation for the logic represented in the ladder logic
program in Fig. 5-7 can be expressed as: a) Y = (A) + (CD) + (BC) b) Y = A + B + (CD) c) Y = (AB) + (CD) d) Y= A(BCO)
17.
Fig. 5·7
D
D
18. The ladder logic program in Fig. 5-7 can be reprogrammed as shown
in Fig. 5-8, in , to eliminate the vertical programmed contact and maintain the same input logic conditions.
18.
(a)
8~
c3
A
Y
(b)
0
(c)
C
(d)
Fig. 5·8 19. With reference to the ladder logic program of Fig. 5-9, if it could be
programmed as shown, part of the logic would be ignored due to the fact that the processor allows for a flow: a) from right to left only. b) from left to right only. c) in the upward direction only. d) both a and c.
19.
20. The Boolean equation for the logic represented in the ladder diagram
of Fig. 5-9 can a) Y = (AB) + b) Y = (AB) + c) Y = (AB) + d) Y = (AB) + be expressed as: (ACO) + (DE) (ACO) + (DE) + (BCE) (A C) + (AD) + (ED) (CD) + E
20.
21. __
22. In Fig. 5-10, the bit status condition of the input device connected to
address 101/14 must be a) 0 b) 1 c) normally open d) normally closed to turn on output address 001/04.
22.
H~
Fig. 5·10
a) b) c) d)
101
001
f---------\04>-l
23. For most PLC systems, one word of memory is required for each:
EXAMINE IF CLOSED and EXAMINE IF OPEN instruction. OUTPUT ENERGIZE instruction. branch START/END instruction. all of the above.
23.
24. When the PLC is required to operate the user program without energizing any outputs, it is placed in the a) RUN b) CLEAR MEMORY c) PROGRAM d) TEST mode.
24.
25·1.
25·2.
26.
27.
Chapter 5
63
28.
29.
30. A(n)
a) b) c) d) horizontal immediate input output
30.
31.
64
Chapter 5
TEST 5-2
Place the answers to the following questions in the answer column at the right. Answer
1. 2.
_ _
3a.
3b. 4.
_
___ _
4. The
portion of the memory is where the programmed logic ladder program is entered and stored.
5. 6. 7. 8. 9.
_ _ _ __ __
10. The
image table file is updated during the I/O scan to reflect the current status of digital inputs.
10.
__
11.
__
12. The
is normally a continuous and sequential process of reading the status of inputs, evaluating the control logic, and updating the outputs.
12.
__
refers to the method by which the user communicates the information to the PLC.
13.
14. The greater the scan time, the faster the PLC can
react to changes in inputs. (True or False)
_ _ _
17. 18.
_ _
19. (a)
(b) are the basic symbols of the ladder logic program instruction set.
19a. 19b.
_ ___
-( }- --j/
(1) (2)
E- --j E(3)
Fig. 5·11
INSTRUCTIONS a) EXAMINE IF OPEN b) EXAMINE IF CLOSED c) OUTPUT ENERGIZE
_ ___ _ _ _ __ __
66
Chapter 5
24. 25.
25. The
will indicate what PLC input is connected to what input device and what PLC output will drive what output device.
26.
contact instructions that can be included in one rung of a ladder logic program. (True or False)
27.
parallel branches per ladder logic rung is memory size. (True or False)
31.
Chapter 5
67
34.
35.
36.
37.
38. A(n)
38.
Name
Date
Score
PROGRAMIII
••
H~
~)-i
A
B
1--1 --{(
H
Y
(1)
(2)
(3)
(4)
(5)
(6) A
~,~~ -----{( H
(7)
Fig. 5·12
Chapter 5
69
Rung 1
4·3. List what combinations of inputs will produce an output at Y. 5·1. Assume that the PLC used to
program the circuit in Fig. 5-14 can accommodate a maximum of five series contact instructions per rung. On a separate sheet of paper. redraw and program the circuit to meet this PLC requirement by making use of the internal relay instruction.
(9)
70
Chapter 5
y~
Fig. 5·13
~AHBHCHDHEHFHGHH
Fig. 5·14
Y>-1
o IH \--1
HAHBHC~ __()
Fig. 5·15
reo
C
y~
F~
Fig. 5·16
Answer
1.
In the relay illustration of Fig. 6-1, the coil would be considered: a) energized. b) de-energized. c) operated from an ac source. d) both a and c. In the relay illustration of Fig. 6-1, contact NO.1 is an: a) NO fixed contact. b) NC fixed contact. c) NO movable contact. d) NC movable contact.
2-1_
2-2.
2-2_
Fig. 6-1
3. In the relay control circuit of Fig. 6-2, when the switch is closed,
CR1 is: a) energized, and the red and green lights are both on. b) de-energized, the red light is off, and the green light is on. c) energized, the red light is on, and the green light is off. d) energized, the red light is off, and the green light is on.
l1 S CR1 CR1-1
-,
/
3.
l2
R
/
-,
G
/
CR1-2
Fig. 6·2 4·1. In the motor starter circuit of Fig. 6-3, the main contacts Mare:
a) b) c) d) part of the power circuit. part of the control circuit. designed to handle the full load current of the motor. both a and c.
4·1.
l1-----t--i
l2---~--i
l3------i
Fig. 6·3 4.2. In the motor starter circuit of Fig. 6-3, starter coil Mis:
a) b) c) d) part of the power circuit. energized to start the motor. energized only as long as the START button is pressed. all of the above.
4·2.
74
Chapter 6
4.3. In the motor starter circuit of Fig. 6-3, any overload current is sensed
by the: a) starter coil. b) control contact M. c) OL coils. d) OL contact.
4·3.
5.
6.
7.
8.
9.
10.
~
Fig. 6.6
Chapter 6
75
11.
12.
13.
14.
Fig. 6·10
76
Chapter 6
15.
~
Fig. 6·11 16. Figure 6-12 represents the symbol for a(n):
a) solenoid value. b) motor starter. c) overload relay coil. d) overload relay contact.
16.
o-----@---o
Fig. 6·12 17. The circuit of Fig. 6-13 is that of an electromagnetic:
a) control relay. b) overload relay.
L1 PB1
17.
_j_0-------{
,
18. _
c) momentarily pressing PB1. d) either a or c.
Fig. 6·13 18. In the circuit of Fig. 6-13, the pilot light is switched on by:
a) continually pressing PB1. b) continually pressing PB2.
19. The correct ladder logic program for the circuit in Fig. 6-13 is shown
in which of the following?
19.
HH 8 f--1Hu~
L
(a)
(e)
(b)
(d)
.".'.~-------------Chapter 6 77
20·1. In the 1/0 wiring diagram and ladder logic program of Fig. 6-14,
what is the three-digit address number of the instruction associated with the pressure switch? a) 1/0 c) 1110 b) 1/3 d) 1/2
Inputs L1
110 111 83120
20·1.
831~
83120
Rung 2
Fig. 6·14
'W
20·2. _
c) EXAMINE IF OPEN d) EXAMINE IF CLOSED
1/2
20·2. In Fig. 6-14, what is the type of the instruction associated with the
selector switch? a) OUTPUT ENERGIZE b) OUTPUT DE-ENERGIZE
20·3.
20·4.
20·5.
20·6.
78
Chapter 6
20.7. In Fig. 6-14, assume that an NC limit switch was substituted for the one shown. For the circuit to operate in the same manner as before: a) the wires to the limit switch would have to be reversed. b) the address number would have to be changed to 1/4. c) the instruction representing it would have to be changed to an EXAMINE IF OPEN. d) the instruction representing it would have to be changed to an OUTPUT ENERGIZE.
20·7.
21.
22.
23. In Fig. 6-15, when both LS1 and LS2 are not actuated: a) user program rung 1 is FALSE. b) user program rung 2 is TRUE. c) pilot light PL2 is ON. d) all of the above.
1/1
23.
Rung 1
Rung 1
~I
112
----j(
83116
83115
Rung 2
1---1
---I(
83116
83116
83115
Rung 3
Rung 3
Rung 4 f---i\f----I
0/6
RungS
/
Note: limn swnches lS 1 and lS2, and pilot lights Pl1, Pl2, and Pl3 are represented m the user program by addresses 111, 1/2, 0/5, 0/6, and 017, respectively.
Fig. 6.15 24. In Fig. 6-15, when both LS1 and LS2 are actuated:
a) b) c) d) user user user user program program program program rung rung rung rung 2 3 4 5 is is is is TRUE. TRUE. TRUE. TRUE.
24.
"B"f'.~~¥_;
Chapter 6
79
25·1.
25·2. In Fig. 6-16, assume that rung 2 is FALSE and rung 1 makes
a transition from TRUE to FALSE. As a result, output 0/10: a) remains ON. b) remains OFF. c) switches from ON to OFF. d) switches from OFF to ON.
25·2.
Rung 1
Rung 2
Fig. 6·16
/1 ~~L
1/2
~/10 0/10 U
13
25·3. The circuit in Fig. 6-16 is retentive on power lost. This means that if
power is lost, then output at address 0/10 will: a) switch to the ON state. b) switch to the OFF state. c) remain in its original ON or OFF state. d) flash ON and OFF.
25.3.
25·4. In Fig. 6-16, if inputs 1/1, 1/2, and 1/3 are all TRUE, the output at
address 0/10 will: a) switch to the ON state. b) switch to the OFF state. c) remain in its original ON or OFF state. d) flash ON and OFF.
25·4.
26. A contractor
a) b) c) d) is another name for a relay. is designed to handle heavy power loads. always has an overload relay physically and electrically attached. is a physically small relay.
26.
27.
28.
80
Chapter 6
29. A(n)
a) LED
29.
30. The light source used in most industrial photoelectric sensors is a(n):
a) LED.
30.
31. A(n)
operates by sending sound waves toward the target and measuring the time it takes for the pulses to bounce back. a) pressure sensor b) bar code scanner c) ultrasonic sensor d) flowmeter
31.
32. The force applied to a strain gauge causes it to bend and change its:
a) b) c) d) temperature. resistance. voltage. current.
32.
33. ---
34.
35.
36. A(n)
converts electrical pulses applied to it into discrete rotor movements. a) tachometer b) solenoid c) stepper motor d) electronic magnetic flowmeter
36.
Chapter 6
81
TEST 8-2
Place the answers to the following questions in the answer column at the right. Answer
to switch
1.
2. 3.
_ _
4. 5. 6.
_ _ _
relay is provided to protect the motor against current overloads. operated switch is controlled
7. 8.
_ _
__
9.
Chapter 6
83
~
(1)
_l_
0
(2)
()<::::::TO (3)
l
0
(4)
o.l.o
(5)
k
(6)
o..lo
0
(7)
6
(8)
__ __ __ _ _ __ _ __ __
Fig. 6·17
SWITCH DESIGNATIONS a) NO pushbutton b) NC pushbutton c) Break-make pushbutton d) Selector switch e) NC limit switch f) NO temperature switch g) NO pressure switch h) NC level switch
o-------§-----(1)
tv
(2)
~
(3)
tr
(4)
0-------()----/ -,
-,
o-------@-----o
~
CA1-l CAl-2
(7)
(5)
~o~
(6)
Fig. 6·18
84
Chapter 6
OUTPUT DEVICE a) Pilot light b) Control relay c) Motor starter d) OL relay contact e) Solenoid f) Solenoid valve g) Motor
12d. 12e.
_ __
121.
12g.
_
_
13.
__
__ __
16.
17.
17. -----------
18. 19.
_ _
20. 21.
_ __
22. 23.
_ _
Chapter 6
85
24.
25. 26.
27. Bar-code
_ _ _ _
30.
with a
_ _ _ _
32. A one-degree-per-step
___
33. A
circuit is a method of maintaining current flow after a momentary switch has been pressed and released.
34.
----------------------~
86
Chapter 6
..
"'"'.
Name
Date
Score
This section will present several common programming conversion applications designed to give you, the student, a feel for the potential of the ladder logic programming language. The instructions used are intended to be generic in nature and, as such, will require some conversion for the particular PLC model you are using. The use of a prewired PLC input/output control panel is recommended to simulate the operation of these circuits.
L1
L2
Fig. 6·20
CR1)--_" CR1-1 HORN
CR1-3
CR1-4
-,
-,
Fig. 6·21
Chapter 6
87
6. The circuit in Fig. 6-24 illustrates how a forward/reverse motor starter, with electrical interlocks, can be programmed using a PLC. Prepare an 110 connection diagram and ladder logic program for the circuit. Enter the program into the PLC and prove its operation.
L2
L1
L2
~~~~JL~r-~~--v
STOP
up
(Up)
Manual
y~
Auto
Fig. 6·25
Fig. 6·23
88 Chapter 6
repeats. The forward and reverse pushbuttons provide a means of starting the motor in either forward or reverse so that the limit switches can take over automatic control. Prepare an I/O connection diagram and ladder logic program for the circuit. Enter the program into the PLC and prove its operation.
o
@
Start
@
Stop Forward
@
Reverse
L2 OL
Fig. 6.26
Chapter 6
89
L1 PL1
L2
I
/
-,
A __ -
_ _ >~
+
A _!
-,
PL
/
-,
-_ B
_j_
Fig. 6·28
Ladder logic program
Inpu1
E-----3 / E----3
10 B3
B3
83
E-E
B3
Outpul L2
': 1
]/E 10
I ]/~[---(
11 B3 B3 12 B3
-----1(
0:0/2~
/,I
11
~11 1:0
_.,
B3
_.,
Fig. 6·29
90 Chapter 6
0:0
11 2
1 t .2. The program in Fig. 6-29 is to be used to control the light ON and OFF from four remote locations. Assuming that one NO pushbutton is used at each location, prepare an I/O connection diagram and ladder logic program for the circuit. Enter the program into the PLC and prove its operation.
Inputs
Output
~~T
I ~,
Fig. 6·32
Chapter 6
91
92
Chapter 6
ROGRAMMING
TEST 7-1
Choose the letter that best completes the statement.
TIMERS
Answer
1. Certain contacts of a mechanical timing relay are designed to operate at a preset time interval: a) after the coil is energized. b) after the coil is de-energized. c) after power is applied to the circuit. d) either a or b.
1.
2.
i\
"
(b) (e)
(d)
(a)
3.
Fig. 7·1
4. In the circuit in Fig. 7-2, the light will stay on: a) as long as 81 is closed. b) for 5 s after coil TO is energized. c) for 5 s after coil TO is de-energized. d) both a and c.
4.
~:~S1
L1
L2
Fig. 7·2
Rs /
5·1. The timer instruction used in the PLC program of Fig. 7-3 is the
___ a) b) c) d) type. block-formatted pneumatic coil-formatted motor-driven
5.1.
---
Rung 1
001
1---1-----{EON
002
901
5·2.
5·3.
5·4.
5·5.
6·1. According to the relay schematic diagram in Fig. 7-4, coil TD1
is to be energized: a) the instant the start button is pressed. b) the instant the stop button is pressed. c) 5 s after the start button is pressed. d) 5 s after the stop button is pressed.
6·1.
------------_."
94 Chapter 7
6-2. According to the relay schematic diagram in Fig. 7-4, contact TD1-2:
a) b) c) d) opens closes opens closes 5 s after 5 s after 5 s after 5 s after coil TD1 coil TD1 coil TD1 coil TD1 energizes. de-energizes. de-energizes. energizes.
6-2.
6.3. According to the ladder logic program in Fig. 7-4, the address of the
start pushbutton would be: a) 001. b) 002. c) 009. d) 033.
Relay schematic diagram Ll Stop PBl Start L2
6·3.
..... --o...Ln-_--<l
LB2
TDI-2 (5 s)
Inputs L1
Output L2
~~
033 Rung 2 033
Fig. 7·4
Chapter 7
95