CHAPTER 1 SAFETY - PowerPoint PPT Presentation

1 / 88
About This Presentation
Title:

CHAPTER 1 SAFETY

Description:

Programmable Logic Controllers Third Edition Frank D. Petruzella McGraw-Hill Use Of Comparison Instructions In Filling Operations The receiving vessel has its weight ... – PowerPoint PPT presentation

Number of Views:229
Avg rating:3.0/5.0
Slides: 89
Provided by: FrankP175
Category:

less

Transcript and Presenter's Notes

Title: CHAPTER 1 SAFETY


1
Programmable Logic Controllers Third Edition
Frank D. Petruzella McGraw-Hill
2
Chapter 10
Data Manipulation Instructions
3
Data Manipulation Instructions
Data manipulation instructions enable the
programmable controller to manipulate data stored
in memory.
This extra characteristic gives the PLC
capabilities that go far beyond the conventional
relay equivalent instructions.
Data manipulation involves transfer of data and
operation on data with math functions, data
conversion, data comparison, and logical
operations.
4
Data Files, Words, And Bits
Words of data memory in singular form may be
referred to either as registers, elements or as
words, depending on the manufacturer.
The terms table or file are generally used when a
consecutive group of related data memory words is
referenced. A group of consecutive elements or
words in SLC-500 are referred to as a file, in a
ControlLogix controller they are referred to as
an array.
The data contained in files and words will be in
the form of binary bits represented as series of
1's and 0's.
5
Data Files, Words, And Bits
6
Data Manipulation Instructions
Data manipulation instructions allow the
movement, manipulation, or storage of data in
either single- or multiple-word groups from one
data memory area of the PLC to another.
The use of data manipulation instructions in
applications that require the generation and
manipulation of large quantities of data
generally reduces the complexity and quantity of
the programming required.
7
Data Manipulation Instructions
8
Data Transfer Operations
Data manipulation can be placed in two broad
categories data transfer and data comparison.
Data transfer instructions simply involve the
transfer of the contents from one word or
register to another.
When new data replaces existing data, the process
is referred to as writing over the existing data.
Data transfer instructions can address almost any
location in the memory. That location may be the
preset register for a timer or counter or even an
output register that controls a seven-segment
display.
9
Data Transfer Concept
10
Get/Put Data Transfer Rung
The older Allen-Bradley PLC-2 controller uses
coil formatted data transfer instructions GET
and PUT. The PUT instruction is used with the GET
instruction to form a data transfer rung.
When input A is true, the GET/PUT instructions
tell the processor to get the numeric value 005
stored in word 020 and put it into word 130.
11
MOVE (MOV) Instruction
Allen-Bradley PLC-5 and SLC-500 controllers use a
block formatted MOVE instruction to accomplish
data moves. The MOVE instruction is used to copy
the value in one word to another word.
This instruction copies data from a source word
to a destination word.
12
When the rung goes false, the destination address
will retain the value, unless it is changed
elsewhere in the program.
13
Move With Mask (MVM) Instruction
The move with mask (MVM) instruction differs
slightly from the MOVE instruction because a mask
word is involved in the move. The data being
moved must pass through the mask to get to their
destination address.
The MVM instruction is used to copy the desired
part of a 16-bit word by masking the rest of the
value.
14
Move With Mask (MVM) Instruction
The mask may be entered as an address or in
hexadecimal format, and its value will be
displayed in hexadecimal.
15
Move With Mask (MVM) Instruction
16
Bit Distribute (BTD) Instruction
The bit distribute (BTD) instruction is used to
move bits within a word or between words.
Moving bits between words
To move data within a word, enter the same
address for the source and destination
17
Program To Change The Preset Value Of A Timer
Using The MOVE (MOV) Instruction
  • When the selector switch is 10-s position, rung
    2 has logic continuity and rung 3 does not. As a
    result, the value 10 stored at the source
    address, N71, is copied into the destination
    address, T41 PRE.
  • Therefore, the preset value of the timer T41
    will be 10. When PB1 is closed, there will be a
    10-s delay period before the pilot light is
    energized.
  • To change the preset value of the timer to 5 s,
    the selector switch is turned to the 5-s
    position. This makes rung 3 true and rung 2
    false. As a result, the preset value of the timer
    will change from 10 to 5. Closing PB1 will now
    result in a 5-s time-delay period before the
    pilot light is energized.

18
Changing The Preset Value Of A Timer Using
The MOVE (MOV) Instruction
19
  • Three switches are provided to select the
    desired preset counter value depending on the
    product line being manufactured.
  • A reset button is provided to reset the
    accumulated count to zero.
  • A pilot lamp is switched on when the storage
    rack is full.
  • If more than one of the preset counter switches
    is closed, the last value is selected.

20
Changing The Preset Value Of A Counter Using
The MOVE (MOV) Instruction
21
Moving Data With File Instructions
A file is a group of related consecutive words in
the data table that have a definite start and end
and are used to store information.
22
(No Transcript)
23
PLC-5 And SLC-500 Word And File Addresses
24
FAL (File, Arithmetic, and Logical) Instruction
The file, arithmetic and logic (FAL) instruction
is used to copy data from one file to another and
to do file math and file logic.
25
FAL (File, Arithmetic, and Logical) Instruction
Control is the address of the control structure
in the control area (R) of processor memory. The
processor uses this information to run the
instruction.
26
FAL (File, Arithmetic, and Logical) Instruction
Length represents the file length.
Position represents the current location in the
data block that the processor is accessing. It
points to the word being operated on.
Mode represents the number of file elements
operated on per program scan all mode, numeric
mode, or incremental mode.
Destination is the address where the processor
stores the result of the operation.
Expression contains addresses, program
constraints, and operators that specify the
source of data and the operations to be
performed. The expression entered determines the
function of the FAL instruction.
27
File-To-File Function Using The FAL Instruction
When input A goes true, data from the expression
file N720 will be copied into the destination
file N750
28
File-To-Word Copy Function Using
The FAL Instruction
With each false-to-true transition of input A,
the processor reads one element of integer file
N29, starting at element 0, and writes the image
into element 5 of integer file N29. The
instruction writes over any data in the
destination.
29
Word-To-File Copy Function Using
The FAL Instruction
If we start at position 0, the data from N7100
will be copied to N7101 on the first
false-to-true transition of input A.
On successive transitions the data will be copied
into the next position in the file.
30
Copying Recipes And Storing Values For Timer
Presets
The exceptions to the rule that file addresses
must take consecutive words in the data table are
the timer, counter, and control data files for
the FAL instruction.
In these three data files, if you designate a
file address, the FAL instruction will take every
third word in that file and make a file of
preset, accumulated, length, or position data
within the corresponding file type.
31
File Copy (COP) And File Fill (FLL) Instructions
The file copy (COP) instruction and the file fill
(FLL) instruction are high-speed instructions
that operate more quickly than the same operation
with the FAL instruction.
Unlike the FAL instruction, there is no control
element to monitor or manipulate. Data conversion
does not take place, so the source and
destination should be the same file types.
32
(No Transcript)
33
Since the instruction transfers to the end of the
file, the file will be filled with the same data
value in each word.
34
(No Transcript)
35
1. Data transfer instruction can not address
timer or counter preset values. (True/False)
2. The terms table or file are generally used
when a consecutive group of related memory
words is referenced. (True/False)
3. PLCs can not handle manipulation of
entire words. (True/False)
36
  • 4. The ______ parameter of the FAL instruction is
    used to run the instruction.
  • Mode (b) Position
  • (c) Control (d) Length

5. For the MVM instruction,where there is a _____
in the mask, data will pass from the source to
the destination. (a) 0 (b)
1 (c) 5 (d) 10
37
6. In the example of the instruction shown, when
the rung is true the value stored in N200 will
be
(a) 30 (b) 100 (c) 20 (d) 120
38
7. For the example of the instruction shown, when
the rung is true the value stored in the
destination address is
a. 1010101010101010 c. 1111111111111111 b.
1010101011001010 d. 0000000000000000
39
8. The example of the instruction shown is one of
a ______ copy function.
a. word-to-file c. file-to-file b.
file-to-word d. word-to-word
40
  • 9. For the program shown, the preset value of
    the counter would be
  • 0
  • 50
  • 175
  • 300

41
10. For the program shown, closing PB2
changes all the data in N100 to 0.
(True/False)
42
Data Compare Instructions
Data transfer operations are all output
instructions, whereas data compare instructions
are input instructions.
Data Compare Instruction
Data compare instructions compare the data stored
in two or more words (or registers) and make
decisions based on the program instructions.
43
(No Transcript)
44
Equal (EQU) Instruction
The equal (EQU) instruction is an input
instruction that compares source A to source B.
When source A is equal to source B, the
instruction is logically true otherwise it is
logically false.
45
EQUAL (EQU) Logic Rung
When the accumulated value of counter T40 stored
in source A's address equals the value in source
B's address, N740, the instruction is true and
the output is energized.
100
46
NOT EQUAL (NEQ) Instruction
The not equal (NEQ) instruction is an input
instruction that compares source A to source B.
When source A is not equal to source B, the
instruction is logically true otherwise it is
logically false.
47
NOT EQUAL (NEQ) Logic Rung
When the value stored at source A's address,
N75, is not equal to 25, the output will be
true, otherwise the output will be false.
48
GREATER THAN (GRT) Instruction
The greater than (GRT) instruction is an input
instruction that compares source A to source B.
When source A is greater than source B, the
instruction is logically true otherwise it is
logically false.
49
GREATER THAN (GRT) Logic Rung
When the accumulated value of the timer T410,
stored at the address of source A, is greater
than the constant 200 of source B, the output
will be on otherwise, it will be off.
150
50
LESS THAN (LES) Instruction
The less than (LES) instruction is an input
instruction that compares source A to source B.
When source A is less than source B, the
instruction is logically true otherwise it is
logically false.
51
LESS THAN (LES) Logic Rung
When the accumulated value of counter C510,
stored at the address of source A, is less than
the constant 350 of source B, the output will be
on otherwise, it will be off.
360
52
GREATER THAN OR EQUAL (GEQ) Instruction
The greater than or equal (GEQ) instruction is an
input instruction that compares source A to
source B. When source A is greater than or equal
to source B, the instruction is logically true
otherwise it is logically false.
53
GREATER THAN OR EQUAL (GEQ) Logic Rung
If the value stored at the address of source A,
N755, is greater than or equal to the value
stored at the address of source B, N712, the
output will be true otherwise it will be false
54
LESS THAN OR EQUAL (LEQ) Instruction
The less than or equal (LEQ) instruction is an
input instruction that compares source A to
source B. When source A is less than or equal to
source B, the instruction is logically true
otherwise it is logically false.
55
LESS THAN OR EQUAL (LEQ) Logic Rung
If the accumulated count of counter C51 is less
than or equal to 457, the pilot light will turn
on.
458
56
(No Transcript)
57
LIMIT TEST (LIM) Instruction Logic Rung
Since the high limit has a value of 50, and the
low limit 25, the instruction will be true for
test values 25 through 50.
58
LIMIT TEST (LIM) Instruction Logic Rung
Since the high limit has a value of 50, and the
low limit 100, the instruction will be true for
test values of 50 and less than 50, and for test
values of 100 and greater than 100.
59
MASKED COMPARISON FOR EQUAL (MEQ) Instruction
The masked comparison for equal instruction (MEQ)
compares a value from a source address with data
at a compare address and allows portions of the
data to be masked. If the data at the source
address match the data at the compare address
bit-by-bit (less masked bits) the instruction is
true. The instruction goes false as soon as it
detects a mismatch.
60
MASKED COMPARISON FOR EQUAL (MEQ) Logic Rung
61
Relay Time Delay Circuit
Three time-delay relays (1TD, 2TD, 3TD) are used
to control the four solenoid valves.
When the start button is pressed, solenoid A is
energized immediately, solenoid B is energized 5
s later, solenoid C is energized 10 s later, and
solenoid D is energized 15 s later.
62
(No Transcript)
63
Timer Program Using The EQUAL Instruction
64
Counter Program Using The LESS THAN Instruction
65
Numerical Data I/O Interfaces
Numerical data interfaces can be divided into two
groups those that provide interface to multibit
digital devices and those that provide interface
to analog devices.
66
If the programmer uses the EQUAL instruction to
de-energize the solenoid a problem may result.
Should the supply system leak additional material
into the vessel, the total weight could rise
above the preset value, causing the instruction
to go false and the vessel to overfill.
The simplest solution is to program the
comparison instruction as GREATER THAN OR EQUAL
67
BCD Input Interface Module
68
BCD Output Interface Module
This type of module enables a PLC to operate
devices, such as a seven-segment LED display
board, that require BCD-coded signals.
69
BCD I/O Program Using MOVE and EQUAL Instructions
70
Analog Input Interface Module
71
Analog Output Interface Module
72
Set-Point Control
Set-point control in its simplest form compares
an input value to a set-point value.
A discrete output signal is provided if the
input value is less than, equal to, or greater
than the set-point value.
73
Set-Point Temperature Control Program
The PLC is to provide simple off/on control of
the electric heating elements of an oven.
The oven is to maintain an average set-point
temperature of 600 degrees F, with a variation of
about 1 between the off and on cycles.
Therefore, the electric heaters will be turned on
when the temperature is 597 degrees F or less and
stay on until the temperature rises to 603
degrees F or more.
The electric heaters stay off until the
temperature drops to 579 degrees F, at which time
the cycle repeats itself.
74
Set-Point Temperature Control
When the GEQ instruction is true, a high
temperature exists and the program switches off
the heater.
When the LEQ instruction is true, a low
temperature exists and the program switches on
the heater.
75
Set-Point Control Schemes
Several common set-point control schemes can be
preformed by different PLC models. These include
on/off control, proportional (P) control,
proportional-integral (PI) control, and
proportional-integral-derivative (PID) control.
76
Closed-Loop Control System
If a difference (error) exists between the actual
and desired levels, the PLC control program will
take the necessary corrective action.
This measurement is then compared to a reference
point, or set-point.
A measurement is made of the variable to be
controlled.
77
ON/OFF Control
With on/off control the output is either on or
off one for the occasion when the value of the
measured variable is above the set-point, and the
other for the occasion when the value is below
the set-point.
On/off control is inexpensive but not accurate
enough for many process and machine control
applications.
On/off control almost always means overshoot and
resultant system cycling.
A deadband is usually required around the
set-point to prevent relay chatter at set-point.
78
Proportional Control Process
Proportional controls are designed to eliminate
the hunting or cycling associated with on/off
control. They allow the final control element to
take intermediate positions between on and off.
This permits analog control of the final control
element to vary the amount of energy to the
process, depending on how much the value of the
measured and variable has shifted from the
desired value.
79
Proportional Control Process
Analog output
Valve
The valve is initially opened 100
Analog input
Level sensor
The PLC analog output module controls the amount
of fluid placed in the holding tank by adjusting
the the percentage of valve opening.
80
PID Control Process
Proportional-integral derivative (PID) is the
most sophisticated and widely used type of
process control.
PID controllers produce outputs that depend on
the magnitude, duration, and rate of change of
the signal error.
81
PID Control Loop
Error
Set-point
Control output
Process variable
Sudden system disturbances are met with an
aggressive attempt to correct the condition. A
PID controller can reduce the system error to 0
faster than any other controller.
82
11. In the example of the instruction shown,
assuming the number stored at source A was 100,
the output would be
a. on c. 75 b. off d.
100
83
12. In the example of the instruction shown, the
output will be true if the number stored in N71
is
a. 5 c. 25 b. 15 d. any
of these
84
13. In the example of the instruction shown, the
output will be true if the number stored in N75
is
a. 10 c. 50 b. 20 d. any
of these
85
14. In the example of the instruction shown, the
output will be true if the number stored
in N1210 is
a. 30 c. 20 b. 25 d. both a and b
86
15. Thumbwheel switches can be programmed to
allow an operator to change set points or
presets externally without modifying the
program. True/False
16. Which of the following devices would be
classified as an analog input field device? a.
pushbutton c. thermocouple b. lamp
d. motor
87
17. Multibit interfaces allow a group of bits to
be input or output as one unit. (True/False)
88
  • 19. The LIM instruction compares a test value to
    values in the
  • Source and Destination
  • low limit and the high limit.
  • input and output
  • LEQ and GEQ

20. Which of the following types of process
control can reduce the system error to zero
fastest? a. ON/OFF c. PROPORTIONAL b.
DERIVATIVE d. PID
Write a Comment
User Comments (0)
About PowerShow.com