Lec#05 PLC Applications

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

28/10/1445

Control Applications
M1452
PLC Applications
Lec.#10
Omar Salim; Ph.D.
Department of Electrical Engineering
Benha Faculty of Engineering
Benha University

May 2024
1

Ladder Logic Programming Language


Logical Continuity
Logical continuity: condition where ladder logic rung has path of true
instructions to output.
Every instruction assigned a tag/address.
Each input instruction looks at value of corresponding tag determine if
input instruction true or false:
If the condition for which an input Then the input instruction is . . .
instruction is examining . . .
Is detected True

Is NOT detected False

1
28/10/1445

Example: No Logical Continuity


Rung does not show logical continuity because second input instruction
does not detect correct value for bit:

False
True False (inactive)

True Instruction
Highlighted

If you want a bit input instruction that . Then select . . .


.. Name Mnemonic Symbol
Is true when the bit it is examining has a Examine if XIC
value of 1 (on) Closed

Is true when the bit it is examining has a Examine If XIO


value of 0 (off) Open

If you want a bit output instruction that . . . Then select . . .

Enables the remainder of a ladder logic rung for only One Shot ONS
one program scan when its status changes from false to
true (enabled)

2
28/10/1445

If you want a bit output instruction that . . . Then select . . .


Name Mnemonic Symbol
Sets the bit it operates on to 1 when the Output OTE
instruction is true/enabled Energize

If you want a bit input instruction that . Then select . . .


.. Name Mnemonic Symbol
Sets or latches a data bit when the Output Latch OTL
instruction goes true/is enabled, and
keeps it set even if the instruction goes
false/disabled or a power cycle occurs
Clears or unlatches the bit it operates on Output Unlatch OTU
when the instruction goes true/is enabled,
and keeps it cleared even if the
instruction goes false/disabled or a power
cycle occurs

Timer Instructions
Timer instructions count in time units. Operations then can be
controlled based on status or value of timer.
Timer Types:
1. Non-Retentive ON-Delay Timer
2. Non-Retentive OFF-Delay Timer
3. Retentive ON-Delay Timer

All timer instructions act on tags of the timer data type.

3
28/10/1445

TON (Timer On Delay)


When activated, TON instruction counts up to preset value.

Timer: The structure data type where information from the timer is stored.
Preset: The value (in milliseconds) that the timer times up to. The timer
displayed above counts up to 5 seconds.
Accum: The amount of time that the timer has accumulated.

TON (Timer On Delay)

If the TON timer is deactivated while timing, the


Accum value automatically goes back to zero.

4
28/10/1445

Timer Status Bits: .EN, .DN, and .TT are timer status bits. Their
function is to tell the controller the status of the timer instruction, as
outlined in the following table:

Timer Instruction Description


Status Bit
.EN (enable) Specifies whether or not a timer instruction is enabled. When .EN is
1 (set), the instruction is enabled. When .EN is 0 (cleared), the
instruction is disabled.
.TT (timer timing) Specifies whether or not the timer instruction is timing. When .TT is
1 (set), the instruction is timing. When .TT is 0 (cleared), the
instruction is not timing.
.DN (done) Specifies whether or not the accumulated value of the timer equals
the preset value of the timer. When Accum = Preset, .DN is 1 (set).
When Accum < Preset, .DN is 0 (cleared).

TON (Timer On Delay)


Timer status bits are referenced by entering timer name followed by
status bit: Conveyor_Timer.TT

Following rungs control activation of an output for set amount of time:

Preset
Time

Accumulated
Time
Output
Activated

10

5
28/10/1445

11

11

12

TOF (Timer Off Delay)

12

6
28/10/1445

13

13

14

Counter Instruction and Internal Memory

• Count Up

• Count Down

14

7
28/10/1445

15

15

16

1- 2 Pumps Toggle
2- A motor and Lubrication Pump

16

8
28/10/1445

17

Example: Tank Used to Mix Two Liquids


A tank is used to mix two liquids. The control
circuit operates as follows:
1. When the start button is pressed, solenoids A MOTOR
FLOAT SW
and B energize. This permits the two liquids to A
SOLENOIDS FS
begin filling the tank.
2. When the tank is filled, the float switch trips. B
This de-energizes solenoids A and B and starts
the motor used to mix the liquids together.
3. The motor is permitted to run for one
minute. After one minute has elapsed, the C
TIMER
motor turns off and solenoid C energizes to
drain the tank. 1 -MINUTE SOLENOID

17

18

Tank Used to Mix Two Liquids


4. When the tank is empty, the float switch de-
energizes solenoid C.
5. A stop button can be used to stop the MOTOR
FLOAT SW
process at any point. A
SOLENOIDS FS
6. If the motor becomes overloaded, the B
action of the entire circuit will stop.
7. Once the circuit has been energized it will
continue to operate until it is manually
stopped.
C
TIMER

1 -MINUTE SOLENOID

18

9
28/10/1445

19

References
Text Books:
• Devdas Shetty and Richard A. Kolk, ‘Mechatronics System Design,’ 2nd Edition,
2011, Cengage Learning
• Frank D. Petruzella, “Programmable Logic Controllers”, 4th Edition, McGraw-Hill
2011

Lecture Notes:
• Omar Salim, Ph.D. Lecture notes for Industrial Control Systems and Fundamentals
of Instrumentations and Process control.

Software Packages:
• MATLAB Simulink, for Mathworks.

19

10

You might also like