PLC Basicsand Ladder Programming-2
PLC Basicsand Ladder Programming-2
PLC Basicsand Ladder Programming-2
CONTROLLER (PLC)
Programmable Logic Controller
The processor is a microprocessor-based CPU and is the part of the PLC that is
capable of reading and executing the program instructions, one-by-one (such as
the rungs of a ladder logic program).
PLC HARDWARE
Program Memory:
The program memory receives and holds the downloaded program instructions
from the programming device. If this memory is standard RAM, the program
will be lost every time the power is turned off. To avoid this the program
memory may use an EEPROM (electrically erasable programmable ROM) or a
battery-backup RAM, both of which are capable of retaining data even when the
power is off.
Data Memory:
Used to enter the desired program that will determine the sequence of
operation and control of process equipment or driven machine.
PLC Bus :
The PLC bus are the wires in the backplane of a PLC modular system,
which contains the data bus, address bus, and control signals. The processor
uses the bus to communicate with the modules.
PLC HARDWARE
I/O Modules :
• Ladder programming.
• Functional block diagram.
• SFC(sequential functional chart).
• CFC(continuous functional chart).
• Instruction list.
LADDER PROGRAMMING
BIT INSTRUCTIONS
DATA FILES
PLC ADDRESSING
Syntax:
• Input – I 0.0
Data file Bit no
Byte no
• Bit no can be vary from (0-7)
• Byte no can be vary from (0-255)
ADDRESSING
•For input (I0.0 ,I0.1……….)
•For output (Q0.0, Q0.1,…..)
•For memory (M0.0, M0.1,….)
DATA TYPES
Example:-
Counter C5:3 counts the total number of packages filled per day
A pushbutton is used to restart the total part and package count from
zero daily
Ladder Diagram - Parts counting program
10
9
15
10
59
1
Draw the ladder rungs to represent the following:-
1. Normally open start and normally closed stop pushbuttons are used to start and stop
the process.
2. When the start button is pressed, solenoid A
energized to start filling the tank.
3. As the tank fills, the empty level sensor
Switch closes.
4. When the tank is full, the full level sensor switch closes.
5. Solenoid A is de-energized.
6. The agitate motor starts automatically and runs for
3 min to mix the liquid.
7. When the agitate motor stops, solenoid B is
Energized to empty the tank.
8. When the tank is completely empty, the empty
Sensor switch opens to de-energize solenoid B.
9. The start button is pressed to repeat the
sequence.
CAR PARKING GARAGE
Red – 30s on
Green – 25s on
Amber – 5s on
Red – 30s on
Green – 25s on
Amber – 5s on
Compares two values of the same data type. When the LAD
contact comparison is TRUE, then the contact is activated.
MATH / ARITHMETIC INSTRUCTIONS
When enabled (EN = 1), the math instruction performs the specified operation on
the input values (IN1 and IN2) and stores the result in the memory address
specified by the output parameter (OUT). After the successful completion of the
operation, the instruction sets ENO = 1.
MATH / ARITHMETIC INSTRUCTIONS
LOGICAL INSTRUCTIONS
INVERT INSTRUCTION
Calculates the binary one's complement of the parameter IN. The one's
complement is formed by inverting each bit value of the IN parameter (changing
each 0 to 1 and each 1 to 0). ENO is always TRUE following the execution of
this instruction.
Write a program to create variable preset timer
values using a two-position selector switch.
Ladder Diagram – Variable Timer
Write a program to create variable preset counter
values using a two-position selector switch.
Ladder Diagram – Variable Counter
Timer Program implemented using an equal (Data
Compare) instruction
Application of ADD and Data compare instruction.
IN-PROCESS MONITORING SYSTEM
When the operation begins, raw parts move through the in-feed sensor, with
each part generating an up count.
After processing, finished parts appearing at the out-feed sensor generate down
counts, so the accumulated count of the counter continuously indicates the number
of in-process parts.
IN-PROCESS MONITORING SYSTEM
58
8
5
COUNTER SPEED