Beruflich Dokumente
Kultur Dokumente
Objectives
Memory & File Organization and Addressing
Examples of Boolean and Karnaugh Maps to Ladder Logic
Operation of Latches
Operation of Timers
Rockwell Automation
MODICON
GE Fanuc
Operation of Counters
Rockwell Automation
MODICON
GE Fanuc
Program Memory:
Memory Addressing
Memory addressing is the processing of reading or writing data to
the files
I1:0/1
Channel 1
Memory Addressing
File Type
Output
Input
Identifier
O
I
File Number
0
1
Status
Bit
Timer
Counter
Control
Integer
Float
S
B
T
C
R
N
F
2
3
4
5
6
7
8
Memory Addressing
Power CPU
Supply
SLOT NO.
How
Input
Output
Input
Output Output
Memory Addressing
Similarly Timer and Counter Files can also be addressed however they
contain additional parameters that can be addressed
Timers & Counters and additional parameters that can be addressed in
them will be discussed in upcoming lectures
Example
Make Boolean Function & Simplify!!!
Example
Exercise
Convert to Boolean Logic Simplify and then write the ladder logic
Karnaugh Maps
Given a Truth table it can be used to get a (Simple) Boolean Function
Rslogix 500
Latches
Latch & Unlatch:
It can be considered as a sticky switch when it is turned on it remains ON
It must be pulled (unlatched) to turn it off
Different instructions are used to Latch & Unlatch the variables
Example
These scan times are just an example to clarify things and dont depict the actual
scan times of a PLC
Another Example
SR Flip Flop:
S
0
R
0
1
0
1
0
1
1
Action
No
Change
Q=1
Q=0
Not
Specified
Siemens
Timers
Non Retentive
Examples of Usage:
Examples:
A garage light which should remain ON for 2 minutes before turning off.
Consider a car whose ignition key has been turned off but the car
engine remain ON for some time
Cooling fans remain ON for some time after the oven has been turned
off
ON Delay Timers
Starts incrementing when the input has becomes true and turns
ON when a certain time has been achieved
Examples:
Consider a car whose ignition key has been turned ON but the car
engine turns ON after some delay
An On delay timer would allow an oven to reach a specific temperature
before starting production
Retentive Timers
Retentive timers:
They dont lose their accumulated values once the enable input lines go
low
They retain the accumulated value until the enable input lines goes high
again
They function like stop watches. They can start and stop and retain their
current values until a reset button is pressed
Preset Value:
The preset value is the number of increments the timer has to count before it
changes it output. 50 is the preset value in the previous case
Accumulated Value:
It refers to the current increment the timer has reached during its operation
Rockwell Timers
On Delay Timer:
It starts accumulating when the rung
becomes true and continues until the
preset value becomes equal to the accumulated value or the rung
goes false
Basic Symbol used is T and the file number is 4 (T4).
RsLogix 500
RsLogix 5000
Rockwell Timers
Off Delay Timer:
It starts accumulating when the rung
becomes False and continues until the
preset value becomes equal to the accumulated value or the rung
goes True
Retentive ON timer
Similar to ON timer except that it retains its value.
The preset value is 4000ms, so delay of 4 seconds
How can we use the timer after the cycle has completed?
Example
Example
Consider
Cascaded Timers
The
Enable Input
ONDTR
TB
Output
R
PV
Time
Base
%R0001
Enable
Reset
Preset Value
Output
Time Base
Output
Storage Register
output
1 at the start represents inputs 1002 represents the 2nd real input
Solve
Solve
Counters
Counters are used in many important industrial applications
Mainly used in Production lines where the items have to be counted
When we are counting the number of products we might use a count up
timer
When we are counting the number of parts left we might use a count down
timer
The choice of counter to be used depends on the application
Operation of Counter
There are different types of counters:
Count up
Count down
CU (Count Up bit)
CD (Count Down bit)
DN (Done bit)
OV (Overflow bit)
UN (Underflow bit)
PRE (Preset value)
ACC (Accumulated value)
Count Up Timers
Count Up Timers (Retentive):
The accumulator (ACC) value increases
with every low to high transition
The done bit (DN) is set when the accumulated value equals the
preset value
The over flow bit (OV) turns on when the counter value increases
by 32,767. It then wraps around and starts counting from -32,768
(this is how 16 bit signed numbers are stored)
The count up (CU) shows that the Counter has been enabled (it
turns on when ever the rung condition goes true)
Example
A count up (CU) Counter is used to remove the 6th Part of
Example of Counters
Count Up & Count Down Counters can have the same
registers
Cascading Counters
What is happening here?
FANUC TIMERS:
Enable Input
ONDTR
UPCTR
TB
PV
UPCTR:
Output
%R0001
Every time the input turns High it increments the Counter value
by 1 and if it is equal to the preset value, the counter turn ON
The R input is used to reset the counter
DNCTR:
Every time the input turns High it decrements the Counter value
by 1 and if it is equal to the preset value, the counter turn ON
The R input is used to reset the counter
Enable
Reset
Preset Value
Output
CTR
Output
Storage Register
The output value goes high when the input value equals the preset value
The counter also provides an inverted output
Solve