You are on page 1of 6

LAB # 2 IMPLEMENTATION OF TIMERS AND COUNTERS IN

TRILOGY

PRE-LAB
For the given task we assume the following method
If we press the start button the motor will be start and the package would start moving and a
green light would be ON and when the package reaches the limit switch the motor would turn
OFF and a red light would be ON and this process can stop at any time using an emergency stop
button.
The notations used in these tasks are START, LS for limit switch, TM for table motor, R for red
light, G for green light and ES for emergency stop button.

START ES LS TM R G
1 0 0 1 0 1
1 1 0 0 1 0
1 0 1 0 1 0

FIGURE 1: LADDER DIAGRAM AND SIMULATION

INTRODUCTION:

TIMER
A timer is a specialized type of clock which is used to measure time intervals. A timer that
counts from zero upwards for measuring time elapsed is often called a stopwatch. It is a device
that counts down from a specified time interval and used to generate a time delay, for example,
an hourglass is a timer.
COUNTERS
A counter is a device that stores (and sometimes displays) the number of times a particular event
or process occurred, with respect to a clock signal. It is used to count the events happening
outside the microcontroller. In electronics, counters can be implemented quite easily using
register-type circuits such as a flip-flop

IN-LAB

Lab Task No 1a: Design the solution for home water tank filling system using TD-100MD
PLC.

In this task s1 and s2 are sensor in upper tank and s3 is a sensor in lower tank. r1, r2, r3 are relays
attached to s1, s2, s3 respectively. Motor is the output.
If sensors are in 0 state or in OFF state that means it is not filled with water. If sensors are in 1
state or in ON state that means it is filled with water. When s3 is 0 the motor will not start.

FIGURE 2: LADDER DIAGRAM AND SIMULATION

Lab Task No 1b: Suppose the tank-1 is in vibrant environments that cause false signal
generation even the tank-1 isn’t empty. To ensure the signal is not false the Controller
should wait till 5 secs if the signal is true and then turn the motor ON.

Same conditions as in task 1a but in this task we are using a timer of 5 sec that if s1 is off for 5
secs the motor will turn on automatically.
FIGURE 3: LADDER DIAGRAM AND SIMULATION

Lab Task No 2 (Length measurement)


Sw1 is the start switch, PS is photoelectric sensor, M_switch is magnetic switch, tooth is of
sprocket and t_counter is tooth counter. When Sw1 is ON the conveyer belt starts moving the
and when a piece of bar is under PS it is ON then magnetic switch is also ON and it will start
counting the number of tooth on sprocket. 10 tooth is equal to 1 foot and so on. We used feet as
an up counter in order to measure length

FIGURE 4: LADDER DIAGRAM AND SIMULATION


POST LAB
Task 1: Water level sensor
In this design problem, Sensors are named as s1, s2, s3 & s4 in the ladder diagram for four levels
low half full and extremely full respectively. These sensors will ON whenever they are filled with
water. Corresponding outputs are shown.
s1 s2 s3 s4 level
1 0 0 0 Low
1 1 0 0 Half
1 1 1 0 full
1 1 1 1 Extremely full

FIGURE 5: LADDER DIAGRAM AND SIMULATION

FIGURE 6: SIMULATION

Task 2: Design ladder logic program that will correctly execute the industrial control
process in. The sequence of operation is as follows:
In this task when the start button is on the product starts moving toward position A and when it
reaches to position A, motor stops and a delay timer of 10 secs is on and then starts moving toward
LS2 and meanwhile the No. of products are counted by up counter at position A after ever time
delay

FIGURE 7: LADDER DIAGRAM AND SIMULATIONS

CRITICAL ANALYSIS/CONCLUSION
The objectives of this lab were:
• The implementation of fundamentals building blocks (timers and counters ) through
ladder logic.
• Timers are used for generating delays while counters are used to count the number of
times an event has occurred.
• In the next step we learned different types of timers i.e. ON, OFF and Retentive timer.
Counters are of two types i.e. UP and DOWN counter. Other terms like latch, sensors,
actuators and their brief description were introduced as well.
• Latch circuits use when you need to ON an output from one input and off from the other.
• Latch circuit is used frequently in the above ladder diagrams. Basically, latch circuit is
used where we have to operate the same output using two separate inputs e.g. if we are
supposed to turn the motor on or off then, we should have separate start and stop buttons
to operate the same motor.
• We were given different logical scenarios to be solved using ladder diagram.
• Differential-up (DIFU) is one of the belt in special function in PLC. When the execution
condition for [DIFU] goes from OFF to ON, the designated output or relay will be turned
ON for one scan time only. After that it will be turned OFF.
• At the last we conclude that with the working of different factory processes that use
counters and timers for the implementation of each step i.e. when to start, where to stop
and when to resume again along with counting of finished product.

You might also like