[go: up one dir, main page]

0% found this document useful (0 votes)
48 views26 pages

Lecture 006

The document explains basic ladder logic symbols and their functions, including contacts, coils, and various logic gates such as AND, OR, and NOT. It provides examples of ladder programs for controlling a DC motor and a lubricating oil tank using sensors and relays. Additionally, it discusses the use of internal relays in PLC programming to simulate relay functions.

Uploaded by

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

Lecture 006

The document explains basic ladder logic symbols and their functions, including contacts, coils, and various logic gates such as AND, OR, and NOT. It provides examples of ladder programs for controlling a DC motor and a lubricating oil tank using sensors and relays. Additionally, it discusses the use of internal relays in PLC programming to simulate relay functions.

Uploaded by

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

Rung 1

Ladder Diagram
Rung 2

Rung 3

Horizontal line (Rung)

L1 (Input)
L2 (Output) Vertical rail
Basic Ladder Logic Symbols
Contacts
Normally Open (NO) contact
Passes power (on) when coil driving the contact is on.

Normally Closed (NC) contact


Passes power (on) when coil driving the contact is off.
Basic Ladder Logic Symbols

Output or Coil
When power flows through the Coils via contacts they are
energized.

 More than one Contact can exists in the Rung.


 Usually 1 Coil exists in the Rung.
The AND Gate
The OR Gate
Input 1
Output
OR

Input 2
The NOT Gate, or Inverter

Input Output
The Exclusive-OR, or XOR Gate
Input 1

Output

XOR

Input 2
NAND gate
NOR gate
Example
Design a ladder program to control the operation of a DC motor such that:

 Motor can run in CW direction.

 Motor can run in CCW direction.

 Motor continue running until Stop switch is pressed.

The motor direction is controlled by two relays: M1 for CW direction and M2 for CCW direction.

The main objective of the ladder program is to "latch" only one of the two relays at the same time, or maybe not at all

to leave the motor off.

The system use two push buttons: “forward” and “reverse”, both are from NO type.

Third push button is used to stop the motor; this one is of the type NC.

The program required to monitor both direction buttons to direct the motor, note that the user will press then release

the button but the motor must continue work even after the button released and until another one is pressed.
Example
Step 1
Step 2
Step 3
Step 4
Level Application example
Required to control lubricating oil tank using two sensors.

How it should work:


1) Filling motor, pump oil into tank  Until high level sensor is triggered.
2) Motor OFF  Until level falls below the low level sensor.
3) Then repeat the process.

Use 3 I/O ports:


 2 for inputs (sensors).
 1 for output (motor).
We use 2 inputs of NC (normally closed) fiber-optic level sensors.
When they are NOT immersed in liquid they become ON. When they
are immersed in liquid they become OFF.

In PLC: Each input and output device must have its own address.
(To allow PLC to know where they are physically connected.)

Addresses for our example are shown in the following table:


Device Name Address
Low level sensor 0000
High level sensor 0001
Motor 0500
Internal relay 1000
Internal relay (internal variable/dummy relay)

These relays DO NOT physically exist in the PLC unit but rather they are bits in a register
that you can use to SIMULATE a relay.

You can use the contacts of these relays as many times as required (limited with RAM).
Device Name Address
The program to solve this problem is as follow:
Low level sensor 0000
High level sensor 0001
Motor 0500
Internal relay 1000
Program Scan Scan 1

Initially the tank is empty.


 Therefore, input [0000] is TRUE and input [0001] is also TRUE (NC switch).
 The dummy (utility relay) [1000] at the start of the program is OFF (False)

This will switch the motor ON.


Program Scan Scan 2
After first scan and because of booth sensors are ON (True), the dummy relay [1000] will become ON (True).

Gradually the tank fills because 500 (fill motor) is ON.


Program Scan Scan 100
After, say 100 scans, the oil level rises above the low level sensor and it becomes open ( FALSE):

Notice: Even if the low level sensor is false  Still a path of true logic from left to right (through the [1000] dummy relay.
Program Scan Scan 2000

After maybe 2000 scans, the oil level rises above the high-level sensor, so it becomes open (False):

Immediately the motor will switched OFF.


Program Scan Scan 2001
Next scan will lead to the dummy relay to switch OFF (False).
Program Scan Scan 2050

After maybe 2050 scans the oil level falls below the high level sensor and it will become true again.

Even though the high level sensor became true there still is NO continuous true logic path and therefore coil 1000
remains False!

You might also like