Lab Report 2
Lab Report 2
EXPERIMENT NO 2
Objective: To understand the operation of latching and un-latching (OTL and OTU)
LAB ASSESSMENT:
Data presentation
Experimental results
Conclusion
LATCH/UNLATCH
Introduction:
Usually we latch a signal with a condition and then unlatch it when a different condition becomes true.
Most of time the Latch / Unlatch go together.
Discussion:
OTL: Output Latch OTU: Output Un-Latch
Definition: Definition:
Turns a bit Turns a bit
on when the off when
rung is the rung is
executed, executed,
and this bit and this bit
retains its retains its
state when the rung is not executed or a state when the rung is not executed or
power cycle power occurs. when power cycle occurs.
OTL is a retentive output instruction. OTU is a retentive output instruction.
OTL can only turn on a bit. This OTU can only turn off a bit. This
instruction is usually used with OTU instruction is usually used with OTL
with both OTL and OTU addressing the with both OTL and OTU addressing the
same bit. same bit.
Ladder logic can examine a bit Ladder logic can examine a bit
controlled by OTL as often as controlled by OTU as often as necessary.
necessary. When you assign an address to the OTU
When you assign an address to the OTL instruction that corresponds to the
instruction that corresponds to the address of a physical output, the output
address of a physical output, the output device wired to the screw terminal is de-
device wired to the screw terminal is energized when the bit is cleared.
energized when the bit is set. When The unlatch instruction tells the
rung conditions become false, the bit controller to turn off the addressed bit.
remains set and the corresponding Thereafter, the bit remains off, regardless
output device remains energized. of the rung condition, until it is turned
Actuating the latch input turns the on.
function on or causes it to change state.
The function then stays on even if the
latch input is turned off. To turn the
function off, another input must unlatch
which turns the function off.
Power Cycle:
Power cycling is the process of turning hardware off and then turning it on again.
LAB#2 Electrical Measurements and Instrumentation Lab
Thermodynamic cycle
Gas power cycles
Vapor power cycle
Lab Tasks:
Exercise 1:
Implement the given logic equation using latch and unlatch.
Y = AB + DC′ + B′C
0 0 0 1 0 1 0 1
0 0 1 0 0 0 1 1
LAB#2 Electrical Measurements and Instrumentation Lab
0 0 1 1 0 0 1 1
0 1 0 0 0 0 0 0
0 1 0 1 0 1 0 1
0 1 1 0 0 0 0 0
0 1 1 1 0 0 0 0
LAB#2 Electrical Measurements and Instrumentation Lab
1 0 0 0 0 0 0 0
1 0 0 1 0 1 0 1
1 0 1 0 0 0 1 1
1 0 1 1 0 0 1 1
1 1 0 0 1 0 0 1
LAB#2 Electrical Measurements and Instrumentation Lab
1 1 0 1 1 1 0 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 1
Exercise 2:
We need to start/stop the motor. When the start button is pushed we want to start the motor, and when the
stop button is pushed we want to stop the motor.
START
STOP
LAB#2 Electrical Measurements and Instrumentation Lab
START
STOP
Exercise 3:
Design a ladder logic for bi-directional motor (Forward/ Reverse). Each direction has its own button and
only one button to stop the motor. We also need to stop the motor before we change its direction.
FORWARD
STOP
REVERSE
LAB#2 Electrical Measurements and Instrumentation Lab
FORWARD
STOP
REVERSE
Exercise 4:
Design a ladder logic program for simple level detector both are active low logic. Motor is active high
logic.
UP
HIGHES
T LEVEL
LAB#2 Electrical Measurements and Instrumentation Lab
DOWN
LOWEST
LEVEL
Exercise 5:
In this exercise the Open and Close pushbuttons will be used to control the movement of the door.
Movement will not be maintained when either switch is released, and therefore the Stop switch is
neither required nor used in this exercise. However, all other available Inputs and Outputs are
employed in this exercise.
Pressing the Open Switch will cause the door to move upwards (open) if not already fully open.
The opening operation will continue as long as the switch is held down. If the switch is released,
or if limit switch LS1 opens, the door movement will halt immediately.
Pressing the Close Switch will cause the door to move down (close) if not already fully closed.
The closing operation will continue as long as the switch is held down. If the switch is released,
or if limit switch LS2 closes, the door movement will halt immediately.
LAB#2 Electrical Measurements and Instrumentation Lab
If the Door is already fully opened, pressing the Open Switch will Not energize the motor.
If the Door is already fully closed, pressing the Close Switch will Not energize the motor.
Under no circumstance will both motor windings be energized at the same time.
LAB#2 Electrical Measurements and Instrumentation Lab
The Open Lamp will be illuminated if the door is in the Fully Open position.
The Shut Lamp will be illuminated if the door is in the Fully Closed position.
Door movement will halt immediately when the Stop Switch is initially pressed, and will remain
halted if the switch is released.
LAB#2 Electrical Measurements and Instrumentation Lab
Pressing the Open Switch will cause the door to Open if not already fully open. The opening
operation will continue to completion even if the switch is released.
Pressing the Close Switch will cause the door to Close if not already fully shut. The closing
operation will continue to completion even if the Switch is released.
If the Door is already fully opened, pressing the Open Switch will Not energize the motor.
LAB#2 Electrical Measurements and Instrumentation Lab
If the Door is already fully closed, pressing the Close Switch will Not energize the motor.
Under no circumstance will both motor windings be energized at the same time.
The Ajar Lamp will be illuminated if the door is NOT in either the fully closed or fully opened
position.
LAB#2 Electrical Measurements and Instrumentation Lab
The Open Lamp will be illuminated if the door is in the Fully Open position.
The Shut Lamp will be illuminated if the door is in the Fully Closed position.
It is your responsibility to fully design, document, debug, and test your Program. Avoid the use of OTL or
OTU latching instructions and make a concerted effort to minimize the number of rungs employed. As
before, ensure that you have made effective use of both instruction and rung comments to clearly
document your program.
Conclusion:
This lab introduced us to the concept of latch (turns the bit on and the bit retain its state) and unlatch
(turns the bit off and the bit retain its state). The phenomenon of latch/unlatch highlights an important
concept of power cycle.
The concept of latch and unlatch can simply be used to implement logic expressions and are very
important when it comes to the use of latch/unlatch and feedback systems in daily life.