0% found this document useful (0 votes)
46 views11 pages

Lab 03 - Timers

Labs

Uploaded by

teamladhub2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views11 pages

Lab 03 - Timers

Labs

Uploaded by

teamladhub2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Lab 03 - Timers

Objectives
- To learn to set up the parameters of timer instructions.
- To sequence Timer instructions in order to create a delayed response.
- To create an oscillator using coupled Timer instructions.
Pre-lab: There is no way you can finish this lab on time unless you attend the lectures and
invest at least 2 hours in the pre-lab.
The 5 Lab Marks are assigned as follows:
A Brightspace quiz worth 1.5 of the 5 lab marks MUST be done BEFORE starting the lab.
A fully functional program and accurate electrical diagram is worth 1.5 of the 5 lab marks.
A flawless demo presentation is worth 2 of the 5 lab marks (see Demo Requirements on page 9).
A bonus version is available for 1 extra mark.
There are three parts to this document (this document is hyperlinked):
1- Review of Theory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 2
- Provides a concise explanation of all the theory that you need to complete the lab.
You will not be able to do the lab unless you understand this theory.
- This review will provide some of the information you need to write the on-line quiz.
- Note that you will probably be able to zoom through this if you have been attending classes and
if you already understand most of the material.
- Ensure that you review the Timer operations listed below.
Reading and understanding these instructions will give you the proper techniques to progress a
lot faster during the required practical lab design.
Using Timer Instructions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 2
Timer Memory Structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 2
Creating a Timer Tag - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 2
Experimenting with TON - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 3
Cascading Timers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 4
Retentive Timers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 5
Experimenting with TOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 6
Oscillators - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 7
2- The Lab Design Assignment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 8
- BEFORE going to the lab read about the practical design described on Page 8.
This will not be easy and it may take you a while before you can design a solution. However, the
things you will learn will certainly make the effort worthwhile. It is recommended that you design
before the lab and use the precious lab time to program and debug your design.
- Plan how you will test your solution ensuring that you can quickly and efficiently demonstrate all
possible situations during your demo.
Design Assignment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 8
Bonus version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 8
Demo Requirements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 9
Electrical Schematic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page 10
3- Additional Practice Questions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Page
11

Page 1 of 11
Lab 03 - Timers

Using Timer Instructions


Timer instructions are some of the most common instructions used by PLC programs. It is extremely
important that you understand the use of timers as most industrial control programs include at least one
timer when controlling a system.
Many different types of Timer instructions are available in the ladder logic language. The most popular
are TON, TOF and RTO instructions and these will be examined in detail during this lab.
Timer Memory Structure
The operation of a timer instruction requires the use of a group of memory locations. These memory
locations are organized into a structure, which may be referred to and used by the program as the timer
is performing its job. The structure for each timer (TON, TOF and RTO) consists of the three memory
locations described below:
Note: Each timer has its own unique tag (TimerName) which identifies the memory structure used by
that particular timer. The structure memory locations are identified by the following tag names:
TimerName.PRE: This memory location must be preset to define the timer delay interval. The amount
of time is ALWAYS measured in milliseconds. The data type is DINT which means that it can
store a 32-bit signed integer value (-2,147,483,648 to +2,147,483,647).
TimerName.ACC: This memory location contains the actual number of milliseconds which have been
accumulated in the timer. The accumulated time may be read from this memory location at any
moment. The data type is DINT which means that it can store a
32-bit signed integer value (-2,147,483,648 to +2,147,483,647).
Note: A reset (RES) instruction may be used to force the accumulated time to 0.
TimerName.EN: The “EN” (enable) status is a single bit located in the “status” memory location of the
timer. It is a Boolean value which adopts the True state when the timer instruction is enabled.
This bit remains True as long as the timer is enabled (even if the preset count has been reached).
This bit only becomes False when the timer is disabled.
TimerName.TT: The “TT” (timer timing) bit is a single bit located in the “status” memory location of the
timer. It is a Boolean value which adopts the True state while the counter is counting.
Note that this bit becomes False as soon as the Preset count is reached.
Also note that this bit will immediately become False when the timer is disabled.
TimerName.DN: The “DN” (done) bit is a single bit located in the “status” memory location of the
timer. It is a Boolean value which stays in the True state when the Preset delay interval
(TimerName.PRE) has been reached.
Creating a Timer Tag
The memory structure required for each timer is reserved by creating a unique timer tag. This is done
by going to the Program Tags window.
In the Program Tags window, ensure that you have clicked on the Edit tab and click in the empty white
box at the bottom left of the tag window. Enter the name Timer1 for that timer tag. Follow by clicking
on the corresponding “Data Type” box at right and scroll down through the data types to select the
“TIMER” data type.
As shown at right, memory
locations of different types
will be automatically reserved.

Once a timer tag is created you may assign it to a particular timer in your ladder logic program.

Page 2 of 11
Lab 03 - Timers

Experimenting with TON


Start
Go the MainRoutine window Tag to a Start Switch T1_Enable
TON <Local:2:O.data.0>
and follow the instructions Rung 1 Timer On Delay EN
given below to enter the timer Timer Timer1
Preset 4000
program shown. This program Accum 0
DN

will help you to understand


T1_Timing
how the TON timer instruction Timer1.TT <Local:2:O.data.1>
actually works. Rung 2
T1_Done
Timer1.DN <Local:2:O.data.2>
Timer instructions are available
under the Timer/Counter group Rung 3
of instructions.
From the Timer/Counter group, drag a TON
instruction to Rung 1.
Once this is done you need to assign
timer parameters. To do this double-click the “?” in the “Timer”
field and enter the Timer1 tag to assign the memory structure you
created in the previous step. Follow by double-clicking “Preset” to
enter the delay (4000) and finish by specifying that the
accumulated time starts at 0.
Add the XIC instructions and the OE instructions as shown.
The timer tags will be available from the list of available tags when you double-click the “?” on the
new XIC instructions. Be careful to tag them exactly as shown on the ladder logic program.
The position of the panel lights have been chosen to create a pattern which should makes it easier for
you to follow the program execution.
Download the program and run it to observe and learn how the Boolean status bits “.EN” (T1_Enable),
“.TT” (T1_Timing) and “.DN” (T1_Done) operate.
Fill Table 1 with your observations.
Start Preset Accum EN TT DN
Table 1 XIC value value state state state
Testing TON state
After Downloading and then T/F T/F T/F T/F
running the program
Immediately after pressing the T/F T/F T/F T/F
Start push-button
2 seconds after pressing and T/F T/F T/F T/F
holding the start push-button
4 seconds after pressing and T/F T/F T/F T/F
holding the start push-button
6 seconds after pressing and T/F T/F T/F T/F
holding the start push-button
After releasing the start push- T/F T/F T/F T/F
button from the previous step

Page 3 of 11
Lab 03 - Timers

Cascading Timers
Most commercial automated systems need to run processes in succession.
For example, one process may have to run for some time before a second process may be allowed to
begin.
The timer done (.DN) bit is quite useful to produce delays as will be shown in this second example.
You will need to create a new memory structure timer tag for Timer2, as was shown before when
creating a Timer tag.
Add the 3 rungs shown at T2_Enable
right below your Timer1 Timer1.DN TON <Local:2:O.data.5>
program (you will have a Rung 4 Timer On Delay EN
Timer Timer2
total of 6 rungs). Preset 4000 DN
Accum 0
Notice, on the program, that
T2_Timing
Timer2 is enabled by the Timer2.TT <Local:2:O.data.6>
done bit of Timer1. Rung 5
Press and hold the Start T2_Done
Timer2.DN
switch and observe what <Local:2:O.data.7>

happens to Timer1 and Rung 6


Timer2.
Try releasing the Start switch when Timer1 is in the middle of timing and observe the result.
Try releasing the Start switch when Timer2 is in the middle of counting and observe the result.
Timer1 TON Timer2 TON
Table 2
Accum EN TT DN Accum EN TT DN
Cascading timers value state state state value state state state
After Downloading and then T/F T/F T/F T/F T/F T/F
running the program
Immediately after pressing the T/F T/F T/F T/F T/F T/F
Start push-button
2 seconds after pressing and T/F T/F T/F T/F T/F T/F
holding the start push-button
4 seconds after pressing and T/F T/F T/F T/F T/F T/F
holding the start push-button
6 seconds after pressing and T/F T/F T/F T/F T/F T/F
holding the start push-button
After releasing the start push- T/F T/F T/F T/F T/F T/F
button from the previous step
Note that you could cascade additional timers by using the Timer2.DN to enable a third timer and so on.
Fill Table 2 with your observations.

Page 4 of 11
Lab 03 - Timers

Retentive Timers
You certainly noticed, when experimenting with TON, that opening the “Timer On Delay” input
disables the TON timers and resets the accumulated value to zero. Retentive (RTO) timers will have a
different behavior as they maintain their accumulated value when disabled.
We will now modify the Timer1 so that it becomes a retentive timer.
- Save your existing program and then Save AS... Lab3RTO
- Double-click the TON letters on Timer1 and select RTO from the pull-down menu.
- Complete the modification by specifying the new RTO Preset value to 4000 milliseconds and
Accum value to 0.
Since RTO timers retain their
accumulated values when they are
disabled we need some mechanism
to reset their accumulated value.
The "Reset" ( ) instruction is
available to do this.
It is available as a program
instruction by clicking the
icon.
Insert a rung below the existing
Timer1 rungs, as shown on the
ladder logic program. Insert XIO
and RES instructions on that new
rung.
Note that a stop switch is used to reset Timer1 (why do we choose an XIO instruction to monitor the
stop switch?)
Download the modified program to the processor and try your new features.
Fill Table 3 with your observations.
Table 3 Timer1 RTO
Reset Preset Accum EN TT DN
Retentive Timer state value value state state state
After Downloading and then T/F T/F T/F T/F
running the program
Immediately after pressing the T/F T/F T/F T/F
Start push-button
2 seconds after pressing and T/F T/F T/F T/F
holding the start push-button
After releasing the Start push- T/F T/F T/F T/F
button from the previous step
After again pressing and holding T/F T/F T/F T/F
the start push-button for 2 seconds
After releasing the start push- T/F T/F T/F T/F
button from the previous step
After pressing and releasing the T/F T/F T/F T/F
reset button.

Page 5 of 11
Lab 03 - Timers

Experimenting with TOF

All timers we have looked at detect a True rung condition to start timing. The TOF does the exact
opposite: it times as long as the rung condition is False.
Save your existing program and then Save As... Lab3TOF.

To test a TOF timer, modify


Timer1 so that it becomes a
TOF by double-clicking the
RTO letters on Timer1 and then
choosing TOF from the pull-
down menu.
Enter the Preset and Accum
values shown on the ladder
logic program.
Download the modified
program to the processor and
test the operation of your new
timer.
Timer1 TOF
Table 4
Reset Start Preset Accum EN TT DN
Timer Off Delay state state value value state state state
After Downloading and then T/F T/F T/F T/F T/F
running the program
Immediately after pressing and T/F T/F T/F T/F T/F
holding the Start push-button
3 seconds after releasing the T/F T/F T/F T/F T/F
start push-button
5 seconds after releasing the T/F T/F T/F T/F T/F
start push-button
After pressing and releasing T/F T/F T/F T/F T/F
the reset button.
Immediately after pressing and T/F T/F T/F T/F T/F
holding the Start push-button
4 seconds after releasing the T/F T/F T/F T/F T/F
start push-button

Fill Table 4 with your observations.

Page 6 of 11
Lab 03 - Timers

Oscillators
Free-running oscillators turn a memory bit ON and OFF repeatedly without outside intervention.
Oscillators may be used to blink lights that are connected to output terminals or trigger some process to
restart periodically. Two timers may be combined to create an oscillator as is explained below.

The ladder logic program, shown at right, Tim er2.TT


Light6
TO N
implements an oscillator. Tim er O n Delay EN
Tim er Tim er1
To save time, MODIFY the existing Preset 1000 DN
program as follows: Reset Accu m 0
Tim er1
- Save the existing program and then
Save As... Lab3Osc
Light1
- Modify Timer1 so that it returns to Tim er1.TT TO N
being a TON timer. You should now Tim er O n Delay EN

have two TON timers: Timer1 and Tim er Tim er2


Preset 2000 DN
Timer2. Accu m 0

- Specify a Preset value of 1000 milliseconds for Timer1 and 2000 milliseconds for Timer2.
- Replace the XIC instructions that were used to enable the timers with XIO.
You can do this by double-clicking on the instruction itself.
Tag these XIO instructions as shown on the program to cross-couple the timers using the T T bits.
- Keep the Reset rung and delete any unnecessary rungs.
Download the program to the processor and run it in order to test its behavior.
Fill Table 5 with your observations.
Timer1 TON Timer2 TON
Table 5
TT True DN EN TT True DN True EN
Oscillator duration True True duration duration True
duration duration duration
After downloading and
then running the
program
Oscillator period: Sec.
Oscillator frequency: Hz

Q1- What do you think happens to the Timer1.DN and Timer2.DN status bits?

Q2- What happens to the Timer1 and Timer2 accumulated values when the Reset switch is closed?

Page 7 of 11
Lab 03 - Timers

Lab Design Assignment (must be demonstrated in the lab)


The diagram shown below illustrates a mixing tank system which is used to make Kickapoo™ joy juice.
This colorful, delicious and almost addictive joy juice is made by mixing a special juice extracted from
13 secret organically grown plants with patented Goo which makes it stick to your palate!
Note that both liquid sensors in the tank are of the type that Close when a liquid is detected.
The system operates as follows:
Mixer
A Start/Stop/Ovl seal must be included to allow motor
you to Start and Stop the operation of the system. Motor Coil
OVL
Step 1: When Start is pressed, the Juice and Goo Juice Solenoid Goo Solenoid
valves alternate turning ON but are not
allowed to turn ON simultaneously.
a) If the tank is not at the Max level, the Juice Goo
Juice Valve turns ON for 3 seconds and Valve Valve
then turns OFF. Drain Solenoid Max sensor
b) If the tank is not at the Max level, the
Goo Valve turns ON for 1.5 seconds and
then turns OFF. Drain
Valve Min sensor
Step 1 automatically repeats until the Max
sensor detects that the tank is full.
Step 2: When the tank is full, the mixer Motor Coil will automatically be energized to mix the liquids
for 4 seconds and then the mixer Motor Coil is de-energized.
IMPORTANT: The Overload contact could trip when the mixer is operating.
Step 3: Now that the tank is mixed, the Drain valve opens
automatically and the tank drains until the Min Tag as follows:
sensor detects that the tank is empty. JuiceValve Light0
Step 4: Once the tank is empty, the drain valve closes and the GooValve Light1
process automatically repeats itself by going back to MixerMotor Light4
step 1 to mix a new batch of Kickapoo™ joy juice!
DrainValve Light6
Design the system so that it may be started and stopped OVL Switch4
respectively using momentary-contact Start and Stop buttons
located on your control panel. Min sensor Switch6
No Bonus: Stop, overload or power failure will halt filling, Max sensor Switch7
mixing or draining.
When Start is pressed to resume system operation, the drain must be energized to get rid
of the liquid in the tank. This means that the tank empties and the Kickapoo™ joy juice
batch is lost  ... Max and Min sensor states must be simulated accordingly.
Bonus version (1 extra mark): Implementing a tank system where pressing Start resumes the
operation where it was suspended by Stop, Overload or Power failure.
This ensures that the Kickapoo™ joy juice batch is saved  !

Optional extra NOT FOR BONUS: Maintain a uniform mix ratio by ensuring that the Juice to Goo mix
ratio is always exactly 3:1.5 (exactly 3 seconds for the juice and exactly 1.5 seconds for the Goo) no

Page 8 of 11
Lab 03 - Timers

matter when the tank gets full or when the system is stopped. Note that filling the tank may continue
for a short while, even when the tank is at the max level, in order to achieve the exact mix ratio.
Demo Requirements
Complete the electrical schematic on the next page showing all contacts, switches,
float switch sensors, coils and solenoids that need to be connected to the PLC.
Use proper standard electrical symbols.

Lab marks are allotted as follows:


The demo totals 3.5 of the 5 lab marks allotted as follows
(the remaining 1.5 marks are for the on-line quiz):
- A maximum of 0.5 mark for correctly drawing the electrical schematic on pages 10.
- A maximum of 1 mark for properly implementing all 4 steps of the Kickapoo™ joy juice system.
- A maximum of 2 marks for:
The verbal demo, using proper technical vocabulary,
Answering questions, in a reasonable amount of time, about predicting the behaviour of the
Kickapoo™ joy juice system as it operates.

Prepare the following check receipt by inking your name, the date and the mark you obtained
on the pre-lab quiz.

You may not demo unless your name and date are written in ink below

When you are ready for the demo, put your name on the white board demo list.
You must remind the instructor to sign your demo receipt.
Note: No report is required

Lab 03: Date: ____________ Name: ____________________________ Pre-lab quiz mark: _____
(must be in ink) (must be in ink)

Schematic mark: _____ /0.5 System Functionality mark: _____ /1.5 Verbal Demo mark: _____ /2

Possible bonus... see above _____ / 1

Instructor initials: ____________


The instructor will decide how many questions to ask and how many marks you will
receive for your answers.
Print your name and date on the next page USING INK and put your name on the board
when you are ready for a demo.
Note that no report is required.

Page 9 of 11
Lab 03 - Timers

Complete the wiring diagram for lab 3.

The I/O shown should be that of the application not the lamps and switches of the lab
I/O box.

Page 10 of 11
Lab 03 - Timers

Additional Practice Questions


Not all students progress at the same rate and not all students have the same interest in going beyond
the basic PLC labs. Because of this, the following additional non-compulsory practice examples are
available. You may choose to try to solve these example problems on paper or implement the ladder
logic solutions in the lab if you finish your labs early. Solving these example problems will provide
great practice to prepare for term tests and will certainly help improve your design skills.
Problem 3-1
a) Give two different ways to reset a TON timer.
b) How is an RTO timer reset?
c) How is a TOF timer reset?
Problem 3-2
A XIC instruction, which examines a switch input, is linked to the input of a TON and also to the
input of a TOF. Assume that both timers have a preset value of 2 seconds.
a) Assume that the switch is now open. How should you operate the switch so that the TON done
bit turns ON and stays ON in approximately 2 seconds?
b) Assume that the switch is now open. How should you operate the switch so that the TOF done
bit turns ON and stays ON in approximately 2 seconds?
c) Repeat parts a) and b) starting with the switch closed.
Problem 3-3
Design a ladder logic program to implement the following system:
The system consists of a switch and two lights used in curing chemical hardeners. When the switch
is closed, light A must turn ON for 1 minute and then turn OFF. Once light A is OFF, light B turns ON
for 30 seconds and then turns OFF. To repeat the process, the switch is opened and then closed again.
Problem 3-4
Design a ladder logic program to implement the following system:
The system consists of an oven equipped with:
- A door switch, - 3 heaters,
- A thermostat, - A warning buzzer
- A 2-speed (High/Low) blower (2 separate coils).
Draw an electrical schematic showing the devices wired to the PLC input and output terminals.
Requirements:
- Only one of the two blower coils may be energized at any time.
- The blower will go to High speed as soon as any heater turns ON.
- The blower is brought to Low speed 2 minutes after all heaters are turned OFF.
- The door is opened (door switch opens) to load the oven and then the door is closed (door
switch closes).
- Heater A turn ON 10 seconds after the door is closed. And turns OFF when heater B turns OFF.
- Heater B turns ON after heater A has been ON for 1 minute. Heater B turns OFF after 2 minutes
of heating time.
- Heater C may turn ON 3 minutes after the door has been closed. Heater C will only turn ON if
the thermostat is ON. Heater C turns ON and OFF following the thermostat.
- 10 minutes after the door has been closed the warning buzzer beeps for 1 second every second.
The buzzer beeping is reset when the door opens.

Page 11 of 11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy