SlideShare a Scribd company logo
1 of 45
Allen Bradley Timers 
Timers 
Chapter 04 
Sections: 4-4 through 4-13 
Covered in class 
Northampton Community College 1
Programmed Timer Instructions 
Northampton Community College 2 
 
PLC timers are output instructions. They provide the same function as 
electromechanical and solid state timers. Output instructions in the 
SLC500 series and the LogixPro simulator are always placed against 
the right power rail. In the ControlLogix platform output device can be 
placed against the right power rail or in series on the rung. 
 
Some advantages to PLC timers: 
 Their settings can be easily altered and can 
also be altered on-the-fly. 
 The number of PLC timers used can be 
increased or decreased by programming 
changes without making any wiring changes. 
 The accuracy of PLC timers is extremely high 
and repeatable. 
Nola PLC Programming http://nolaplcprogramming.com/
SLC-500/LogixPro Default File Types 
FILE TYPE IDENTIFIER FILE 
NUMBER 
Output O 0 
Input I 1 
Status S 2 
Bit B 3 
Timer T 4 
Counter C 5 
Control R 6 
Integer N 7 
Float Point * F 8 
* Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 & 
SLC-5/05 processors 
*Not available in LogixPro 
Northampton Community College 3
SLC-500 User Defined File Types 
FILE TYPE IDENTIFIER FILE NUMBER 
Bit B 9 - 255 
Timer T 9 - 255 
Counter C 9 - 255 
Control R 9 - 255 
Integer N 9 - 255 
Float Point * F 9 - 255 
String* St 9 - 255 
ASCII * A 9 - 255 
File #9 has a special purpose. It is called the “Computer Interface File” (CIF) and 
is used when communications is required between early AB PLCs 
* Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 & SLC- 
5/05 processors 
Note: User defined files are not available in LogixPro 
Northampton Community College 4
Allen Bradley Timer Instructions 
Northampton Community College 5 
 
Allen Bradley SLC-500’s, ControlLogix and LogixPro have 
three timers available: 
 TON – Timer On-Delay 
 TOF – Timer Off-Delay 
 RTO – Retentive TON
Timer On-Delay Timer (TON) – SLC500s & LogixPro 
 
AB timers have four instruction parameters: 
Timer number or 
Address of the 
timer 
Time Base: in the 
SLC-500 the choice 
is: 1.0S or 0.01S 
LogixPro Time Base 
is fixed at 0.1S 
Preset – How long the 
timer should time. 
TotalTime = Preset * TB 
Accumulator – 
The current time 
value of the timer 
Northampton Community College 6
Timer Parameters – SLC500s & LogixPro 
Northampton Community College 7 
 
Timer 
 The address of the timer. Timers are stored in data file #4 and use a 
file designator of ‘T’. Valid range of timers is: 0 to 255. Therefore, for 
this example we’ll use: T4:0, the first timer in the file. 
 
Time Base 
 The number of “ticks” on the clock. The SLC-500 series can be set to 
1.0-second or 0.01-seconds, meaning that each “tick” is either 1- 
second in duration or 0.01-second in duration. LogixPro timers are 
fixed at 0.1 seconds. 
 
Preset Value (PRE) 
 The preset value is the length of time the timer should time before its 
contacts change state. The valid range is: 0 to 32,767. The total time 
of the timer is determined by: 
Total_Time = Preset_Value * Time_Base 
 
Accumulator Value (ACC) 
 Stores the current time of the timer.
Timer Memory – SLC500s & LogixPro 
Northampton Community College 8 
 
Each timer, of any type, requires three, 16-bit words in timer 
memory. 
 Word 0 – Stores the status bits of the timer 
 Word 1 – Stores the preset value 
 Word 2 – Stores the accumulator value 
 
Timers have three status bits that are stored in word 0: 
 Bit 13 or Bit (DN) – Done Bit 
 Bit 14 or Bit (TT) – Timer Timing Bit 
 Bit 15 or Bit (EN) – Timer Enable Bit
Timer On-Delay, TON, Timer Memory Map – SLC500s & 
LogixPro 
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 
Word 0 EN TT DN NA NA NA NA NA Reserved 
Word 1 Preset Value 
Word 2 Accumulator Value 
Northampton Community College 9 
 
Enable Bit (EN) 
 Sets to a logic ‘1’ when the rung containing the timer is true, otherwise it is a 
logic ‘0’. 
 
Timer Timing Bit (TT) 
 Sets to a logic ‘1’ when the rung containing the timer is true and the timer is 
timing; ACC < PRE. Sets to a logic ‘0’ when the timer is not timing; ACC = 
PRE or the rung containing the timer is false. 
 
Done Bit (DN) 
 Sets to a logic ‘1’ when the rung containing the timer is true and the ACC = 
PRE. Sets to a logic ‘0’ when the rung containing the timer is false or when 
the rung is true and the ACC ≠ PRE.
Timer On-Delay, (TON), Functionality – SLC500s & LogixPro 
Northampton Community College 10 
 
When the rung containing the timer 
becomes true, the timer starts timing. 
The EN and TT bits will set to a ‘1’ and 
the ACC will start counting up at the rate 
of the time base. 
 
When the ACC = PRE the timer is done. 
The TT bit resets to a ‘0’ and the DN bit 
sets to a ‘1’. 
 
When the ACC = PRE the timer is done. 
When the rung containing the timer 
becomes false, the timer ACC will reset 
to zero even if has not reached the PRE 
value and the EN, TT and DN bits will 
reset to ‘0’. 
Rung EN TT DN ACC 
0 0 0 0 0 
1 1 1 0 2 
1 1 1 0 5 
1 1 0 1 10 
0 0 0 0 0 
1 1 1 0 3 
0 0 0 0 0
Timer Addressing 
Northampton Community College 11 
 
Timers, by default, are stored in data file #4 and has a file 
designator of ‘T’. Therefore, timer number zero is addressed 
as T4:0 
 
There are two main forms of addressing in AB; Bit level and 
Word level. To address the status bits of a timer use bit level 
addressing as follows: 
 T4:0/13 or T4:0/DN = Done Bit 
 T4:0/14 or T4:0/TT = Timer Timing Bit 
 T4:0/15 or T4:0/EN = Enable Bit
Timer Adressing 
Northampton Community College 12 
 
Word level addresses are used to address the value of a 
16-bit word. Therefore, to read the value of the timer 
accumulator or preset use a word level address as follows: 
 T4:0.1 or T4:0.PRE = Value of timer zero’s preset 
 T4:0.2 or T4:0.ACC = Value of timer zero’s accumulator 
 
Almost any word in the AB memory structure can be 
addressed to bit level, here is an example: 
 T4:0.ACC/8 
This is a bit level address that is referencing bit-8 in the accumulator 
word of timer zero.
Example of Programming TON Status Bits – 
SLC500s & LogixPro 
Northampton Community College 13
Timer Status Bits and Timing Diagram – SLC500s 
& LogixPro 
Northampton Community College 14
Timer On-Delay Timer (TON) – ControlLogix 
Timer tag name: 
Ex. Pump_Timer 
Time Base: The TB 
is fixed at 0.001 
sec. (1mS) 
Therefore there is 
no parameter field 
Preset – How long the 
timer should time. 
TotalTime = Preset * TB 
Accumulator – 
The current time 
value of the timer 
ControlLogix timers function exactly like timers in the SLC500 series 
and LogixPro 
Northampton Community College 15
Timer Parameters – ControlLogix 
Northampton Community College 16 
 
Timer 
 The tag name of the timer. Example: Pump_Timer. The tag is 
created as a Timer Data Type. The Timer data type is a Structure 
because each timer uses more than one word. 
 
Time Base 
 The number of “ticks” on the clock. The ControlLogix timers are fixed 
at 0.001 sec. or 1mS therefore there is no parameter field for the 
time base. 
 
Preset Value (PRE) 
 The preset value is the length of time the timer should time before its 
contacts change state. The valid range is: 231 - 1 (0 to 
2,147,483,647). The total time of the timer is determined by: 
Total_Time = Preset_Value * Time_Base 
 
Accumulator Value (ACC) 
 Stores the current time of the timer.
Timer Memory – ControlLogix 
The plus (+) sign is 
used to expand a 
structure. The minus 
(-) is used to 
collapse a structure 
Northampton Community College 17 
 
Timers use a timer data type called a Timer Structure. The 
timer structure consists of three, 32-bit words. 
 
The ControlLogix timers have three status bits. These bits 
function exactly like the SLC500 and LogixPro timer status 
bits. The only difference is how they are referenced. 
 Done Bit – Timer_Tag.DN 
 Timer Timing Bit – Timer_Tag.TT 
 Timer Enable Bit – Timer_Tag.EN 
Structure 
members 
Data types of 
the members of 
the structure.
ControlLogix Timer 
What is the length of time for the DN bit to turn on? 
0.001 Seconds * 30,000 = 30 Seconds 
Northampton Community College 18
Timer Off-Delay Timer (TOF) – SLC500s & LogixPro 
 
AB timers have four instruction parameters: 
Timer number or 
Address of the 
timer 
Time Base: in the 
SLC-500 the choice 
is: 1.0S or 0.01S 
LogixPro Time Base 
is fixed at 0.1S 
Preset – How long the 
timer should time. 
TotalTime = Preset * TB 
Accumulator – 
The current time 
value of the timer 
Northampton Community College 19
Timer Parameters – SLC500s & LogixPro 
Northampton Community College 20 
 
Timer 
 The address of the timer. Timers are stored in data file #4 and use a 
file designator of ‘T’. Valid range of timers is: 0 to 255. Therefore, for 
this example we’ll use: T4:1, the second timer in the file. 
 
Time Base 
 The number of “ticks” on the clock. The SLC-500 series can be set to 
1.0-seconds or 0.01-seconds, meaning that each “tick” is either 1- 
second in duration or 0.01-second in duration. LogixPro is fixed at 
0.1 seconds. 
 
Preset Value (PRE) 
 The preset value is the length of time the timer should time before its 
contacts change state. The valid range is: 0 to 32,767. The total time 
of the timer is determined by: 
Total_Time = Preset_Value * Time_Base 
 
Accumulator Value (ACC) 
 Stores the current time of the timer.
Timer Memory – SLC500s & LogixPro 
Northampton Community College 21 
 
Each timer, of any type, requires three, 16-bit words in timer 
memory. 
 Word 0 – Stores the status bits of the timer 
 Word 1 – Stores the preset value 
 Word 2 – Stores the accumulator value 
 
Timers have three status bits that are stored in word 0: 
 Bit 13 or Bit (DN) – Done Bit 
 Bit 14 or Bit (TT) – Timer Timing Bit 
 Bit 15 or Bit (EN) – Timer Enable Bit
Timer Off-Delay, TOF, Timer Memory Map – SLC500s & 
LogixPro 
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 
Word 0 EN TT DN NA NA NA NA NA Reserved 
Word 1 Preset Value 
Word 2 Accumulator Value 
Northampton Community College 22 
 
Enable Bit (EN) 
 Sets to a logic ‘1’ when the rung containing the timer is true, otherwise it is a 
logic ‘0’. 
 
Timer Timing Bit (TT) 
 Sets to a logic ‘1’ when the rung containing the timer is false and the timer is 
timing; ACC < PRE. Sets to a logic ‘0’ when the timer is not timing; ACC = 
PRE, or the rung containing the timer is true. 
 
Done Bit (DN) 
 Sets to a logic ‘1’ when the rung containing the timer is true and not timing. 
When the rung becomes false the timer starts timing. When the ACC = PRE 
the DN bit resets to a logic ‘0’ until the rung becomes true again.
Timer Off-Delay, (TOF), Functionality – SLC500s & LogixPro 
Northampton Community College 23 
 
When the rung containing the timer 
becomes false, the timer starts timing. 
The EN bit will reset to a ‘0’ and the TT 
and DN bits will be set to a ‘1’. The ACC 
starts timing at the rate of the TB. 
 
When the ACC = PRE the timer is done. 
The TT bit and the DN bit reset to a ‘0’. 
 
When the rung containing the timer 
becomes true, the timer ACC will reset to 
zero, even if it has not reached the PRE 
value. The EN and DN bit will set to a ‘1’ 
and the TT bit will reset to a ‘0’. 
Rung EN TT DN ACC 
1 1 0 1 0 
0 0 1 1 150 
0 0 1 1 375 
0 0 0 0 500 
1 1 0 1 0 
0 0 1 1 356 
1 1 0 1 0
Example of Programming a TOF Status Bits – 
SLC500s & LogixPro 
Northampton Community College 24
TOF Status Bits and Timing Diagram 
Northampton Community College 25
ControlLogix TOF Timer 
Northampton Community College 26 
 
The ControlLogix TOF timer functions exactly like the 
SLC500 series and LogixPro TOF timer. 
 
It uses a Timer Structure. 
 
The Time Base is fixed at 0.001 sec. (1mS).
RTO Functionality – SLC500s, LogixPro and ControlLogix 
SLC500 Timer shown 
Northampton Community College 27 
 
An RTO timer works exactly like a TON timer 
with one exception. When the rung containing 
the RTO timer becomes false, the ACC will 
retain the timed value. When the rung returns 
to true, the timer will start timing from where it 
left off. 
 
To reset the ACC of an RTO timer a reset 
(RES) instruction with the same address as 
the RTO timer is required. When the RES 
rung is true, the timer ACC resets to zero. If 
the RES rung remains true and the timer rung 
is also true, the timer will time, but will 
immediately be reset to zero. 
Rung RES EN TT DN ACC 
1 0 1 1 0 1 
1 0 1 1 0 3 
0 0 0 0 0 3 
1 0 1 0 1 5 
X 1 0 0 0 0 
1 1 0 0 0 0 
0 1 0 0 0 0
Example of Programming an RTO with Status Bits – SLC500s and 
LogixPro 
SLC500 Timer shown 
Northampton Community College 28
Example of Programming an RTO with Status Bits – ControlLogix 
What is the length of time for the DN bit to turn on? 
0.001 Seconds * 47,000 = 47 Seconds 
Northampton Community College 29
RTO Status Bits and Timing Diagram 
Northampton Community College 30
Maximum Amount of Time a Timer can Time To 
Northampton Community College 31 
 
What is the maximum amount of time that a SLC500 and 
LogixPro timer can time to? 
 SLC500 Timers 
1.0 Second * [(215 – 1) or 32,767] = 32,767 Seconds 
Which is: 9-hours 6-minutes 7-seconds 
 LogixPro Timers 
LogixPro instructions can be a-bit tricky because LogixPro is actually 32- 
bits, in some instructions. Timers are one of these. 
0.1 Seconds * [(231 – 1) or 2,147,583,647] = 214,748,364.7 Seconds 
Which is: 
6-years 295-days 12-hours 19-minutes 24.7-seconds OR 
6-years 9-(30 day months) 25-days 12-hours 19-minutes 24.7-seconds 
 
What is the maximum amount of time that a ControlLogix 
timer can time to? 
 0.001 Seconds * [(231 – 1) or 2,147,583,647] = 2,147,483.647 Seconds 
 Which is: 24-Days 20-Hours 31-Minutes 23.647 Seconds
Cascading Timers 
Northampton Community College 32 
 
If longer timing periods are required that are beyond the 
maximum time of a single timer, timers can be cascaded as 
shown here. 
What is the total time 
when T4:11 is done? 
32,767 Seconds + 23,000 Seconds = 55,757 Seconds 
or 15 hours 12 minutes 47 seconds
Self Resetting Timer 
Northampton Community College 33 
 
If a timer needs to reset and start over at the end of a timing 
event, its own DN bit can be used to accomplish an 
automatic reset as shown here.
Oscillator Circuit 
Northampton Community College 34 
 
Two timers can be used to create an oscillator that 
oscillates at almost any frequency and duty cycle within the 
range of the timers. An oscillator circuit is shown here. 
Coil O:2/8 
will be: 
ON for ½ 
second 
and OFF 
for a ½ 
second
Oscillator Circuit Timing Diagram 
Northampton Community College 35 
 
This is the timing diagram for the oscillator circuit shown on 
the previous slide.
Startup Warning Signal Circuit 
Northampton Community College 36 
 
When the startup PB is pressed, the horn will sound for 10- 
seconds alerting bystanders that the machine or process is 
about to start.
Sequential Startup Circuit 
Northampton Community College 37
Oneshot or Transitional Instructions 
Northampton Community College 38 
 
The transitional or oneshot instruction is a retentive input 
instruction that triggers an event to occur one time. It is 
triggered on a false to true rung transition. 
 
Some PLC manufacturers also provide a oneshot that 
triggers on a true to false rung transition. 
 
PLC manufacturers use different methods to produce a 
oneshot event. The following slides show some examples.
Oneshot or Transitional Contact Program 
I:1/11 
I:1.0 
11 
I:1.0 
11 
Onshot 
Contact 
Onshot 
Output 
Onshot 
Coil 
Northampton Community College 39 
 
This transitional or oneshot 
contact program uses standard 
contacts and coils to produce a 
oneshot. The program is 
designed to generate an output 
pulse that, when triggered, turns 
ON for the duration of one 
program scan and then turns 
OFF. The order of the rungs in 
this program is important. Try 
reversing the rung order and 
running the program. 
 
The oneshot can be triggered 
from a momentary signal or from 
a signal that comes on and stays 
on for a length of time. 
Click anywhere to start the animation
Types of Transitional Contacts 
Off 
On 
Northampton Community College 40 
 
Off-to-On Transitional Contact 
 Programmed to provide a 
oneshot pulse when the 
referenced trigger signal makes 
a positive (false-to-true) 
transition. 
Symbol 
Off 
On 
One 
scan 
Symbol 
One 
scan 
Off 
Off 
On 
On 
 
On-to-Off Transitional Contact 
 Programmed to provide a 
oneshot pulse when the 
referenced trigger signal makes 
a (true-to-false) transition.
Types of Transitional Contacts – SLC500s, 
LogixPro and ControlLogix 
Northampton Community College 41 
 
Allen Bradley uses a “Oneshot Rising” (OSR) instruction. The SLC500 
and LogixPro instruction requires a bit level address from either the Bit 
file, file #3 or the Integer file, file #7. (We did not talk about the Integer 
file, file #7 yet.) 
 
ControlLogix uses an instruction named (ONS) that can be assigned a 
tag of data type BOOL or a bit from a tag of type DINT, INT or SINT.
Types of Transitional Contacts – SLC500s, 
LogixPro and ControlLogix 
Northampton Community College 42 
 
When the rung conditions preceding the OSR or ONS instruction 
transition from false-to-true, the OSR or ONS instruction will be true for 
one scan. After one scan is complete, the OSR or ONS instruction 
becomes false, even if the rung conditions preceding it remain true. The 
OSR or ONS instruction will only become true again if the rung 
conditions preceding it transition from false-to-true. 
ONS using a tag of type BOOL 
ONS using bit 3 of a tag of type DINT
OSR Instruction – SLC500s & LogixPro 
Northampton Community College 43 
 
The controller allows the use of one OSR instruction per 
output on a rung. 
 
The address used for the OSR instruction must be unique. 
Do not use it anywhere else in the program. Do not use an 
input or output address on an OSR instruction.
OSR Instructions with the SLC-5/01 and SLC-5/02 
 
In the top rung, the OSR instruction is not permitted inside a 
branch. An error will occur when the OSR is in this position. 
Northampton Community College 44 
 
In the bottom rung, the OSR is not in the branch, so the 
rung is legal. These two processors allow only one OSR 
instruction per rung. 
Important note: 
When using these 
two processors, do 
not place input 
conditions after the 
OSR instruction on 
a rung. Unexpected 
operation may 
occur.
OSR Instruction, SLC-5/03 or Higher 
Northampton Community College 45 
 
When using the SLC-5/03 processor and higher, including 
the MicroLogix controllers, more than one OSR instruction 
can be used on a rung, but only one per output instruction 
as shown this ladder rung.

More Related Content

What's hot

8051 Assembly Language Programming
8051 Assembly Language Programming8051 Assembly Language Programming
8051 Assembly Language ProgrammingRavikumar Tiwari
 
Input - Output Devices for PLC
Input - Output Devices for PLCInput - Output Devices for PLC
Input - Output Devices for PLCArko Saha
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
555 Timer (detailed presentation)
555 Timer (detailed presentation)555 Timer (detailed presentation)
555 Timer (detailed presentation)Tanish Gupta
 
Programmable Peripheral Interface 8255
 Programmable Peripheral Interface   8255 Programmable Peripheral Interface   8255
Programmable Peripheral Interface 8255Dr.P.Parandaman
 
Power amplifiers
Power amplifiersPower amplifiers
Power amplifiersHarsha Nair
 
FM demodulation using PLL
FM demodulation using PLLFM demodulation using PLL
FM demodulation using PLLmpsrekha83
 
8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripheralsamrutachintawar239
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logicsurat murthy
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypadPRADEEP
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuitBrenda Debra
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterKanchanPatil34
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)babak danyal
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller Gaurav Verma
 

What's hot (20)

8051 Assembly Language Programming
8051 Assembly Language Programming8051 Assembly Language Programming
8051 Assembly Language Programming
 
Input - Output Devices for PLC
Input - Output Devices for PLCInput - Output Devices for PLC
Input - Output Devices for PLC
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
555 Timer (detailed presentation)
555 Timer (detailed presentation)555 Timer (detailed presentation)
555 Timer (detailed presentation)
 
Vlsi(140083112008,15,16)
Vlsi(140083112008,15,16)Vlsi(140083112008,15,16)
Vlsi(140083112008,15,16)
 
Programmable Peripheral Interface 8255
 Programmable Peripheral Interface   8255 Programmable Peripheral Interface   8255
Programmable Peripheral Interface 8255
 
D and T Flip Flop
D and T Flip FlopD and T Flip Flop
D and T Flip Flop
 
Power amplifiers
Power amplifiersPower amplifiers
Power amplifiers
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
FM demodulation using PLL
FM demodulation using PLLFM demodulation using PLL
FM demodulation using PLL
 
8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logic
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypad
 
Sequential circuit
Sequential circuitSequential circuit
Sequential circuit
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 

Viewers also liked

10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14John Todora
 
Digital Clock Timer
Digital Clock TimerDigital Clock Timer
Digital Clock TimerToni Chant
 
scanners and plotters
scanners and plottersscanners and plotters
scanners and plottersHeenM
 
Chapter 11: Printers and Scanners
Chapter 11: Printers and ScannersChapter 11: Printers and Scanners
Chapter 11: Printers and Scannersaskme
 
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segment
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segmentDigitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segment
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segmentIbrahim R
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Sri Prasanna
 
Scanning powerpoint
Scanning powerpointScanning powerpoint
Scanning powerpointslotoa
 
Types of scanner........
Types of scanner........Types of scanner........
Types of scanner........Zunaira Arshad
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counterankit3991
 
Scanner presentation
Scanner presentationScanner presentation
Scanner presentationAniket Menon
 
Telling the time power point
Telling the time power pointTelling the time power point
Telling the time power pointAna Alba Ortiz
 
Scanner
ScannerScanner
Scannerat1211
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / CountersPatricio Lima
 

Viewers also liked (20)

10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Scanner
ScannerScanner
Scanner
 
Digital Clock Timer
Digital Clock TimerDigital Clock Timer
Digital Clock Timer
 
Timers
TimersTimers
Timers
 
Digital Clock
Digital ClockDigital Clock
Digital Clock
 
Scanner
ScannerScanner
Scanner
 
Clocks
ClocksClocks
Clocks
 
scanners and plotters
scanners and plottersscanners and plotters
scanners and plotters
 
Chapter 11: Printers and Scanners
Chapter 11: Printers and ScannersChapter 11: Printers and Scanners
Chapter 11: Printers and Scanners
 
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segment
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segmentDigitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segment
Digitalclock project 2016 with timer 555 & IC 7490 & IC 7474 & 7 segment
 
Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)Logical Clocks (Distributed computing)
Logical Clocks (Distributed computing)
 
Digital clock
Digital clockDigital clock
Digital clock
 
Scanning powerpoint
Scanning powerpointScanning powerpoint
Scanning powerpoint
 
Types of scanner........
Types of scanner........Types of scanner........
Types of scanner........
 
Scanner
ScannerScanner
Scanner
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Scanner presentation
Scanner presentationScanner presentation
Scanner presentation
 
Telling the time power point
Telling the time power pointTelling the time power point
Telling the time power point
 
Scanner
ScannerScanner
Scanner
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
 

Similar to 09 chapter04 timers_fa14

ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16John Todora
 
PLC: Controladores Lógicos Programables
PLC: Controladores Lógicos ProgramablesPLC: Controladores Lógicos Programables
PLC: Controladores Lógicos ProgramablesSANTIAGO PABLO ALBERTO
 
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Waqas Afzal
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
MICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptMICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptreemasajin1
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptxSujalKumar73
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2KanchanPatil34
 
Micro c lab7(timers)
Micro c lab7(timers)Micro c lab7(timers)
Micro c lab7(timers)Mashood
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptHebaEng
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 prsamurti
 
LPC 1768 A study on Real Time clock features
LPC 1768 A study on Real Time clock featuresLPC 1768 A study on Real Time clock features
LPC 1768 A study on Real Time clock featuresOmkar Rane
 
6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptxRahultater4
 

Similar to 09 chapter04 timers_fa14 (20)

ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16
 
PLC: Controladores Lógicos Programables
PLC: Controladores Lógicos ProgramablesPLC: Controladores Lógicos Programables
PLC: Controladores Lógicos Programables
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
Timing & Control.pptx
Timing & Control.pptxTiming & Control.pptx
Timing & Control.pptx
 
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
 
8051 timers--2
   8051 timers--2   8051 timers--2
8051 timers--2
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
MICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptMICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.ppt
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
8051 ch9
8051 ch98051 ch9
8051 ch9
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
9 timer programming
9 timer programming9 timer programming
9 timer programming
 
plc & scaad
plc & scaadplc & scaad
plc & scaad
 
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
SE PAI Unit 5_Timer Programming in 8051 microcontroller_Part 2
 
Timers
TimersTimers
Timers
 
Micro c lab7(timers)
Micro c lab7(timers)Micro c lab7(timers)
Micro c lab7(timers)
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.ppt
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
LPC 1768 A study on Real Time clock features
LPC 1768 A study on Real Time clock featuresLPC 1768 A study on Real Time clock features
LPC 1768 A study on Real Time clock features
 
6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx
 

More from John Todora

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17John Todora
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17John Todora
 
01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17John Todora
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWJohn Todora
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16John Todora
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16John Todora
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16John Todora
 
ControlLogix Counters FA16
ControlLogix Counters FA16ControlLogix Counters FA16
ControlLogix Counters FA16John Todora
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16John Todora
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16John Todora
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagramsJohn Todora
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02John Todora
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_formsJohn Todora
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databasesJohn Todora
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animationsJohn Todora
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagramJohn Todora
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerJohn Todora
 

More from John Todora (20)

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCW
 
Lab02 review
Lab02 reviewLab02 review
Lab02 review
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16
 
ControlLogix Counters FA16
ControlLogix Counters FA16ControlLogix Counters FA16
ControlLogix Counters FA16
 
Lab02 lead in
Lab02 lead inLab02 lead in
Lab02 lead in
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagrams
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_forms
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram
 
00 introduction
00 introduction00 introduction
00 introduction
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol Primer
 

09 chapter04 timers_fa14

  • 1. Allen Bradley Timers Timers Chapter 04 Sections: 4-4 through 4-13 Covered in class Northampton Community College 1
  • 2. Programmed Timer Instructions Northampton Community College 2  PLC timers are output instructions. They provide the same function as electromechanical and solid state timers. Output instructions in the SLC500 series and the LogixPro simulator are always placed against the right power rail. In the ControlLogix platform output device can be placed against the right power rail or in series on the rung.  Some advantages to PLC timers:  Their settings can be easily altered and can also be altered on-the-fly.  The number of PLC timers used can be increased or decreased by programming changes without making any wiring changes.  The accuracy of PLC timers is extremely high and repeatable. Nola PLC Programming http://nolaplcprogramming.com/
  • 3. SLC-500/LogixPro Default File Types FILE TYPE IDENTIFIER FILE NUMBER Output O 0 Input I 1 Status S 2 Bit B 3 Timer T 4 Counter C 5 Control R 6 Integer N 7 Float Point * F 8 * Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 & SLC-5/05 processors *Not available in LogixPro Northampton Community College 3
  • 4. SLC-500 User Defined File Types FILE TYPE IDENTIFIER FILE NUMBER Bit B 9 - 255 Timer T 9 - 255 Counter C 9 - 255 Control R 9 - 255 Integer N 9 - 255 Float Point * F 9 - 255 String* St 9 - 255 ASCII * A 9 - 255 File #9 has a special purpose. It is called the “Computer Interface File” (CIF) and is used when communications is required between early AB PLCs * Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 & SLC- 5/05 processors Note: User defined files are not available in LogixPro Northampton Community College 4
  • 5. Allen Bradley Timer Instructions Northampton Community College 5  Allen Bradley SLC-500’s, ControlLogix and LogixPro have three timers available:  TON – Timer On-Delay  TOF – Timer Off-Delay  RTO – Retentive TON
  • 6. Timer On-Delay Timer (TON) – SLC500s & LogixPro  AB timers have four instruction parameters: Timer number or Address of the timer Time Base: in the SLC-500 the choice is: 1.0S or 0.01S LogixPro Time Base is fixed at 0.1S Preset – How long the timer should time. TotalTime = Preset * TB Accumulator – The current time value of the timer Northampton Community College 6
  • 7. Timer Parameters – SLC500s & LogixPro Northampton Community College 7  Timer  The address of the timer. Timers are stored in data file #4 and use a file designator of ‘T’. Valid range of timers is: 0 to 255. Therefore, for this example we’ll use: T4:0, the first timer in the file.  Time Base  The number of “ticks” on the clock. The SLC-500 series can be set to 1.0-second or 0.01-seconds, meaning that each “tick” is either 1- second in duration or 0.01-second in duration. LogixPro timers are fixed at 0.1 seconds.  Preset Value (PRE)  The preset value is the length of time the timer should time before its contacts change state. The valid range is: 0 to 32,767. The total time of the timer is determined by: Total_Time = Preset_Value * Time_Base  Accumulator Value (ACC)  Stores the current time of the timer.
  • 8. Timer Memory – SLC500s & LogixPro Northampton Community College 8  Each timer, of any type, requires three, 16-bit words in timer memory.  Word 0 – Stores the status bits of the timer  Word 1 – Stores the preset value  Word 2 – Stores the accumulator value  Timers have three status bits that are stored in word 0:  Bit 13 or Bit (DN) – Done Bit  Bit 14 or Bit (TT) – Timer Timing Bit  Bit 15 or Bit (EN) – Timer Enable Bit
  • 9. Timer On-Delay, TON, Timer Memory Map – SLC500s & LogixPro 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Word 0 EN TT DN NA NA NA NA NA Reserved Word 1 Preset Value Word 2 Accumulator Value Northampton Community College 9  Enable Bit (EN)  Sets to a logic ‘1’ when the rung containing the timer is true, otherwise it is a logic ‘0’.  Timer Timing Bit (TT)  Sets to a logic ‘1’ when the rung containing the timer is true and the timer is timing; ACC < PRE. Sets to a logic ‘0’ when the timer is not timing; ACC = PRE or the rung containing the timer is false.  Done Bit (DN)  Sets to a logic ‘1’ when the rung containing the timer is true and the ACC = PRE. Sets to a logic ‘0’ when the rung containing the timer is false or when the rung is true and the ACC ≠ PRE.
  • 10. Timer On-Delay, (TON), Functionality – SLC500s & LogixPro Northampton Community College 10  When the rung containing the timer becomes true, the timer starts timing. The EN and TT bits will set to a ‘1’ and the ACC will start counting up at the rate of the time base.  When the ACC = PRE the timer is done. The TT bit resets to a ‘0’ and the DN bit sets to a ‘1’.  When the ACC = PRE the timer is done. When the rung containing the timer becomes false, the timer ACC will reset to zero even if has not reached the PRE value and the EN, TT and DN bits will reset to ‘0’. Rung EN TT DN ACC 0 0 0 0 0 1 1 1 0 2 1 1 1 0 5 1 1 0 1 10 0 0 0 0 0 1 1 1 0 3 0 0 0 0 0
  • 11. Timer Addressing Northampton Community College 11  Timers, by default, are stored in data file #4 and has a file designator of ‘T’. Therefore, timer number zero is addressed as T4:0  There are two main forms of addressing in AB; Bit level and Word level. To address the status bits of a timer use bit level addressing as follows:  T4:0/13 or T4:0/DN = Done Bit  T4:0/14 or T4:0/TT = Timer Timing Bit  T4:0/15 or T4:0/EN = Enable Bit
  • 12. Timer Adressing Northampton Community College 12  Word level addresses are used to address the value of a 16-bit word. Therefore, to read the value of the timer accumulator or preset use a word level address as follows:  T4:0.1 or T4:0.PRE = Value of timer zero’s preset  T4:0.2 or T4:0.ACC = Value of timer zero’s accumulator  Almost any word in the AB memory structure can be addressed to bit level, here is an example:  T4:0.ACC/8 This is a bit level address that is referencing bit-8 in the accumulator word of timer zero.
  • 13. Example of Programming TON Status Bits – SLC500s & LogixPro Northampton Community College 13
  • 14. Timer Status Bits and Timing Diagram – SLC500s & LogixPro Northampton Community College 14
  • 15. Timer On-Delay Timer (TON) – ControlLogix Timer tag name: Ex. Pump_Timer Time Base: The TB is fixed at 0.001 sec. (1mS) Therefore there is no parameter field Preset – How long the timer should time. TotalTime = Preset * TB Accumulator – The current time value of the timer ControlLogix timers function exactly like timers in the SLC500 series and LogixPro Northampton Community College 15
  • 16. Timer Parameters – ControlLogix Northampton Community College 16  Timer  The tag name of the timer. Example: Pump_Timer. The tag is created as a Timer Data Type. The Timer data type is a Structure because each timer uses more than one word.  Time Base  The number of “ticks” on the clock. The ControlLogix timers are fixed at 0.001 sec. or 1mS therefore there is no parameter field for the time base.  Preset Value (PRE)  The preset value is the length of time the timer should time before its contacts change state. The valid range is: 231 - 1 (0 to 2,147,483,647). The total time of the timer is determined by: Total_Time = Preset_Value * Time_Base  Accumulator Value (ACC)  Stores the current time of the timer.
  • 17. Timer Memory – ControlLogix The plus (+) sign is used to expand a structure. The minus (-) is used to collapse a structure Northampton Community College 17  Timers use a timer data type called a Timer Structure. The timer structure consists of three, 32-bit words.  The ControlLogix timers have three status bits. These bits function exactly like the SLC500 and LogixPro timer status bits. The only difference is how they are referenced.  Done Bit – Timer_Tag.DN  Timer Timing Bit – Timer_Tag.TT  Timer Enable Bit – Timer_Tag.EN Structure members Data types of the members of the structure.
  • 18. ControlLogix Timer What is the length of time for the DN bit to turn on? 0.001 Seconds * 30,000 = 30 Seconds Northampton Community College 18
  • 19. Timer Off-Delay Timer (TOF) – SLC500s & LogixPro  AB timers have four instruction parameters: Timer number or Address of the timer Time Base: in the SLC-500 the choice is: 1.0S or 0.01S LogixPro Time Base is fixed at 0.1S Preset – How long the timer should time. TotalTime = Preset * TB Accumulator – The current time value of the timer Northampton Community College 19
  • 20. Timer Parameters – SLC500s & LogixPro Northampton Community College 20  Timer  The address of the timer. Timers are stored in data file #4 and use a file designator of ‘T’. Valid range of timers is: 0 to 255. Therefore, for this example we’ll use: T4:1, the second timer in the file.  Time Base  The number of “ticks” on the clock. The SLC-500 series can be set to 1.0-seconds or 0.01-seconds, meaning that each “tick” is either 1- second in duration or 0.01-second in duration. LogixPro is fixed at 0.1 seconds.  Preset Value (PRE)  The preset value is the length of time the timer should time before its contacts change state. The valid range is: 0 to 32,767. The total time of the timer is determined by: Total_Time = Preset_Value * Time_Base  Accumulator Value (ACC)  Stores the current time of the timer.
  • 21. Timer Memory – SLC500s & LogixPro Northampton Community College 21  Each timer, of any type, requires three, 16-bit words in timer memory.  Word 0 – Stores the status bits of the timer  Word 1 – Stores the preset value  Word 2 – Stores the accumulator value  Timers have three status bits that are stored in word 0:  Bit 13 or Bit (DN) – Done Bit  Bit 14 or Bit (TT) – Timer Timing Bit  Bit 15 or Bit (EN) – Timer Enable Bit
  • 22. Timer Off-Delay, TOF, Timer Memory Map – SLC500s & LogixPro 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Word 0 EN TT DN NA NA NA NA NA Reserved Word 1 Preset Value Word 2 Accumulator Value Northampton Community College 22  Enable Bit (EN)  Sets to a logic ‘1’ when the rung containing the timer is true, otherwise it is a logic ‘0’.  Timer Timing Bit (TT)  Sets to a logic ‘1’ when the rung containing the timer is false and the timer is timing; ACC < PRE. Sets to a logic ‘0’ when the timer is not timing; ACC = PRE, or the rung containing the timer is true.  Done Bit (DN)  Sets to a logic ‘1’ when the rung containing the timer is true and not timing. When the rung becomes false the timer starts timing. When the ACC = PRE the DN bit resets to a logic ‘0’ until the rung becomes true again.
  • 23. Timer Off-Delay, (TOF), Functionality – SLC500s & LogixPro Northampton Community College 23  When the rung containing the timer becomes false, the timer starts timing. The EN bit will reset to a ‘0’ and the TT and DN bits will be set to a ‘1’. The ACC starts timing at the rate of the TB.  When the ACC = PRE the timer is done. The TT bit and the DN bit reset to a ‘0’.  When the rung containing the timer becomes true, the timer ACC will reset to zero, even if it has not reached the PRE value. The EN and DN bit will set to a ‘1’ and the TT bit will reset to a ‘0’. Rung EN TT DN ACC 1 1 0 1 0 0 0 1 1 150 0 0 1 1 375 0 0 0 0 500 1 1 0 1 0 0 0 1 1 356 1 1 0 1 0
  • 24. Example of Programming a TOF Status Bits – SLC500s & LogixPro Northampton Community College 24
  • 25. TOF Status Bits and Timing Diagram Northampton Community College 25
  • 26. ControlLogix TOF Timer Northampton Community College 26  The ControlLogix TOF timer functions exactly like the SLC500 series and LogixPro TOF timer.  It uses a Timer Structure.  The Time Base is fixed at 0.001 sec. (1mS).
  • 27. RTO Functionality – SLC500s, LogixPro and ControlLogix SLC500 Timer shown Northampton Community College 27  An RTO timer works exactly like a TON timer with one exception. When the rung containing the RTO timer becomes false, the ACC will retain the timed value. When the rung returns to true, the timer will start timing from where it left off.  To reset the ACC of an RTO timer a reset (RES) instruction with the same address as the RTO timer is required. When the RES rung is true, the timer ACC resets to zero. If the RES rung remains true and the timer rung is also true, the timer will time, but will immediately be reset to zero. Rung RES EN TT DN ACC 1 0 1 1 0 1 1 0 1 1 0 3 0 0 0 0 0 3 1 0 1 0 1 5 X 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0
  • 28. Example of Programming an RTO with Status Bits – SLC500s and LogixPro SLC500 Timer shown Northampton Community College 28
  • 29. Example of Programming an RTO with Status Bits – ControlLogix What is the length of time for the DN bit to turn on? 0.001 Seconds * 47,000 = 47 Seconds Northampton Community College 29
  • 30. RTO Status Bits and Timing Diagram Northampton Community College 30
  • 31. Maximum Amount of Time a Timer can Time To Northampton Community College 31  What is the maximum amount of time that a SLC500 and LogixPro timer can time to?  SLC500 Timers 1.0 Second * [(215 – 1) or 32,767] = 32,767 Seconds Which is: 9-hours 6-minutes 7-seconds  LogixPro Timers LogixPro instructions can be a-bit tricky because LogixPro is actually 32- bits, in some instructions. Timers are one of these. 0.1 Seconds * [(231 – 1) or 2,147,583,647] = 214,748,364.7 Seconds Which is: 6-years 295-days 12-hours 19-minutes 24.7-seconds OR 6-years 9-(30 day months) 25-days 12-hours 19-minutes 24.7-seconds  What is the maximum amount of time that a ControlLogix timer can time to?  0.001 Seconds * [(231 – 1) or 2,147,583,647] = 2,147,483.647 Seconds  Which is: 24-Days 20-Hours 31-Minutes 23.647 Seconds
  • 32. Cascading Timers Northampton Community College 32  If longer timing periods are required that are beyond the maximum time of a single timer, timers can be cascaded as shown here. What is the total time when T4:11 is done? 32,767 Seconds + 23,000 Seconds = 55,757 Seconds or 15 hours 12 minutes 47 seconds
  • 33. Self Resetting Timer Northampton Community College 33  If a timer needs to reset and start over at the end of a timing event, its own DN bit can be used to accomplish an automatic reset as shown here.
  • 34. Oscillator Circuit Northampton Community College 34  Two timers can be used to create an oscillator that oscillates at almost any frequency and duty cycle within the range of the timers. An oscillator circuit is shown here. Coil O:2/8 will be: ON for ½ second and OFF for a ½ second
  • 35. Oscillator Circuit Timing Diagram Northampton Community College 35  This is the timing diagram for the oscillator circuit shown on the previous slide.
  • 36. Startup Warning Signal Circuit Northampton Community College 36  When the startup PB is pressed, the horn will sound for 10- seconds alerting bystanders that the machine or process is about to start.
  • 37. Sequential Startup Circuit Northampton Community College 37
  • 38. Oneshot or Transitional Instructions Northampton Community College 38  The transitional or oneshot instruction is a retentive input instruction that triggers an event to occur one time. It is triggered on a false to true rung transition.  Some PLC manufacturers also provide a oneshot that triggers on a true to false rung transition.  PLC manufacturers use different methods to produce a oneshot event. The following slides show some examples.
  • 39. Oneshot or Transitional Contact Program I:1/11 I:1.0 11 I:1.0 11 Onshot Contact Onshot Output Onshot Coil Northampton Community College 39  This transitional or oneshot contact program uses standard contacts and coils to produce a oneshot. The program is designed to generate an output pulse that, when triggered, turns ON for the duration of one program scan and then turns OFF. The order of the rungs in this program is important. Try reversing the rung order and running the program.  The oneshot can be triggered from a momentary signal or from a signal that comes on and stays on for a length of time. Click anywhere to start the animation
  • 40. Types of Transitional Contacts Off On Northampton Community College 40  Off-to-On Transitional Contact  Programmed to provide a oneshot pulse when the referenced trigger signal makes a positive (false-to-true) transition. Symbol Off On One scan Symbol One scan Off Off On On  On-to-Off Transitional Contact  Programmed to provide a oneshot pulse when the referenced trigger signal makes a (true-to-false) transition.
  • 41. Types of Transitional Contacts – SLC500s, LogixPro and ControlLogix Northampton Community College 41  Allen Bradley uses a “Oneshot Rising” (OSR) instruction. The SLC500 and LogixPro instruction requires a bit level address from either the Bit file, file #3 or the Integer file, file #7. (We did not talk about the Integer file, file #7 yet.)  ControlLogix uses an instruction named (ONS) that can be assigned a tag of data type BOOL or a bit from a tag of type DINT, INT or SINT.
  • 42. Types of Transitional Contacts – SLC500s, LogixPro and ControlLogix Northampton Community College 42  When the rung conditions preceding the OSR or ONS instruction transition from false-to-true, the OSR or ONS instruction will be true for one scan. After one scan is complete, the OSR or ONS instruction becomes false, even if the rung conditions preceding it remain true. The OSR or ONS instruction will only become true again if the rung conditions preceding it transition from false-to-true. ONS using a tag of type BOOL ONS using bit 3 of a tag of type DINT
  • 43. OSR Instruction – SLC500s & LogixPro Northampton Community College 43  The controller allows the use of one OSR instruction per output on a rung.  The address used for the OSR instruction must be unique. Do not use it anywhere else in the program. Do not use an input or output address on an OSR instruction.
  • 44. OSR Instructions with the SLC-5/01 and SLC-5/02  In the top rung, the OSR instruction is not permitted inside a branch. An error will occur when the OSR is in this position. Northampton Community College 44  In the bottom rung, the OSR is not in the branch, so the rung is legal. These two processors allow only one OSR instruction per rung. Important note: When using these two processors, do not place input conditions after the OSR instruction on a rung. Unexpected operation may occur.
  • 45. OSR Instruction, SLC-5/03 or Higher Northampton Community College 45  When using the SLC-5/03 processor and higher, including the MicroLogix controllers, more than one OSR instruction can be used on a rung, but only one per output instruction as shown this ladder rung.