Programmable Logic Controllers And Ladder Logic Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

PLC which stands for programmable logic controller is a digital computer.It is used for automation of real-world processes such as controlling machinery on assembly lines, amusement rides or lighting fixtures.PLCs are used in many industries and machines.

The difference between PLC and other computers are that PLC has a special input/output arrangements,designed for multiple inputs and output arrangements,extended temperature ranges,immune to electrical noise and resistance to vibration and impact.

Input lines of the PLC are connected to sensors to notify events such as temperature when it is above or below a certain level or when a liquid level is reached.It is able to read limit switches,dual level devices,temperature indicators and the position of complex positioning systems.

Output lines of the PLC signal any reaction to the incoming events such as starting an engine and open or closing a valve.It is able to drive any kind of electric motor,pneumatic or hydraulic cylinders or diaphrams,magnetic relays or solenoids.

The system is user programmable.The programming language used is called Ladder Logic.It is also known as "Relay Ladder" or "Relay Ladder Logic"(RLL).The program to control the machine operation are stored in battery backed or non-volatile memory which is computer memory that retain stored information even when not powered hence the program will not be lost.

A program which is written for the PLC turns on and off the output based on input conditions and internal program.PLC is only programmed once and runs repeatedly as required.PLC could be used to control garage door opener,switching lights on or off at a certain time and even monitoring a custom built security system.

PLC History.

Based on my research,I found that before the era of PLC, control,sequencing and safety interlock logic for manufacturing automobiles was done using large quantity of relays,cam timers,drum sequencers and dedicated close loop controllersThey are expensive, time consuming and not flexible.To upgrade the production system, the whole production systems also need to be changed and electricians needed to individually rewire each and every relay.

The first electronic machince control uses relays to control the machine logic.To start the machine,press START.To stop the machine,press STOP.A basic machine might need a wall covered inrelays to control all of its function.But there are a few limitations to this type of control.

Failure to the Relay.

When the relay is turned on or off,there will be a delay.

Requirement to design,wire and troubleshoot the entire wall of relays.

As a machine controlled operation, a PLC overcome these limitations.

In 1968, due to spending alot of its budjet for the relay based controlling,sequencing and safety interlocking system, a request for proposal for an replacement for the hard wired relay system was issued by GM Hydramatic which is the automatic transmission division of General Motors.The winning proposal was from Bedford Associates of Bedford,Massachusetts.

The first PLC is called 084 because it is Bedford Associates eigthy fourth project.A company called Modicon was created by Bedford Associates to develope,manufacture,sell and service the new product.Modicon stands for MOdular DIgital CONtroller.One of the personnel working for the project was Mr Richard (Dick) Morley who is also labelled as the father of PLC.

In 1977, the Modicon brand was sold to Gould Electronincs and later acquired by German Company AEG and then by its current owner, French Schneider Electric.

One of the first 084 model built is now on display at Modicon's headquarters in North Andover,Massachusetts.It was presented to Modicon by GM after nearly twenty years of uninterrupted services.The 84 moniker was used by Modicon at the end if its product range until the 984 made its apprearance.


Early PLCs were designed to replace relay logic systems.They are programmed in "Ladder Logic" which resembles a schematic diagram of relay logic.This is done to reduce training demands for existing technicians.Other early PLCs used a form of instruction list programming based on stack based logic solver.

However with advances of technology and knowledge, modern PLCs can be programmed in a variety of ways.There are Ladder Logic,traditional programming language such as BASIC and C and also State Logic which is a very high level programming language designed to program PLCs based on state transition diagrams.

As many early PLCs do have programming terminals capable of graphical representation of the logic,the logic was represented as a series of logic expression similar to Boolean algebra.As programming terminal evolved with time,it is more common to use lader logic.Newer formats such as State Logic and Function Block exists but ladder logic is still the prefered choice.This is due to the fact that PLC solve the logic in a predictable and repeatitive sequence and ladder logic allows the programmer to see any issues with the timing of the logic sequence more easier as compared to other formats.

In recent years,PLC has become more intelligent.PLCs have even been integrated into electrical network.In industrial environment,all ths PLCs have been plugged into a network which is hierarchically organized.The PLCs are then supervised by a control center.An example of such network is SCADA which stands for Supervisory Control and Datra Acquisition.

PLC Hardware

PLC Hardware consist of CPU which stands for Central Processing Unit, Memory, Input/Output which is the I/O Section, Power Supply Unit, Programming Devices and Indicator Lights.

CPU: It carries out the instruction of a computer program and is the primary element that carrys out the computer's function. Each instruction of the program is carried out in sequence to perform the arithmetical operations,logic operators,block memory moves,computer interface,local area network,functions and input/output operations of the system. CPU makes check-ups of the PLC controller to detect any errors early.

System Busses: Busses are the internal paths which the digital signals flow within the PLC. There are 4 busses: CPU uses data bus to send data between different elements. Address Bus send addresses of locations for accessing stored data. Control Bus is for signals relating to internal control actions. System Bus for communications between I/O ports and I/O units.

Memory: System(ROM) gives permanent storage for the operating system and ` fixed data used by the CPU. Random Access Memory(RAM) is for computer data storage. Information on status of input and output devices and the value of timers and counters and other internal devices are stored here. EPROM of ROM that can be programmed and the program is made permanent.

I/O sections: Input monitor field devices such as switches and sensors. Output control devices such as motors,pump and lights. A number of input and output terminal provided so that the PLC can monitor the process and initiate actions.

Power Supply: Most PLC controllers work with either a 24VDC or 220VAC supply. Power supply can be built into the PLC or as and external unit.

Programming Device: Used to enter required program into memory of processor. Program is developed in the programming device and then transfered to the memory unit of the PLC.

Indicator Lights: Indicates status of PLC such as power on,program running and a fault. Essential when diagnosing a fault.

PLC Programming

PLC Programming is usually used in multitasking activities in both the input and output section.It runs via a real time system to allow immediate response to the input conditions so as to eliminate or lessen the delay time.

Up to mid 1980s,PLCs were configured using proprietary programming panels or special purpose programming terminals.

PLC Programming Langguage

There are different types of techniques which PLC programming operates.There is a standard for Programmable Logic Controllers (PLCs).The standard is IEC 61131.For programming langguage, it is the 3rd part of the IEC 61131 standard.Hence for the programming language,it is IEC 61131-3.Below are some of such programming langguage.

Ladder Logic: Ladder logic aims to replace relay logic systems and most basic PLC programming processes rely on the Ladder Logic. Ladder Logic consists of a software which programs the direction of circuit diagrams of relay based logic hardware. Ladder logic is primary used to develop software for PLC usedin industrial control applications. It help to reduce the workload of technicians as commands can be sent to the hardware machinery for them to operate.The programs in this language resemble ladders with two vertical rails and a series of horizontal rungs between them.

Example of one rung ladder logic program: ----[ ] ---------|--[ ]--|------( ) X | Y | S | | |--[ ]--| Z

Practical example of ladder logic: A car power door locks can be triggered by the remote unlock and interior unlock. The remore receiver is always powered. The lock solenoid gets power when either the remote unlock or the interior unlock is closed. This is known as the Logical OR.

Two key swithes must be used to activate an electric motor on a bank vault door. When the normally open contacts of both ` switches are close, electricity is able to flow to the motor and open the door. This is known as Logical AND.

State Logic: A highly advanced type of PLC is State logic. It is a high performing programming language and works on state transition diagram as a model of reality and using the fundamentals of finite state machine theory as basis of a programming language. Enables users to model applications that they want to control by using a hierarchy consisting of Taskmsubdiev by States which are described by Statements. Depending on the priority,the order of activities can be changed and altered. It is normally found in computer software and hardware systems. Its helps the PLC programmer to make intuitive control programs.

Traditional Programming: This is a popular method during 1980s and 1990s and is still common nowadays. This programming applies on computer used in PLC machinery. Computer language protocols like BASIC and C are used to provide commands to the components of the assembly line machinery.

Function Block Diagram (FBD): It is a diagram which illustrate the relationship of the input variable and output variable. The input and output variables are connected to blocks by lines. An output of a block can also be connected to input of another block. Inputs and outputs of the block are wired together using connection lines or links. Single lines may be used to connect two points of the diagram: *An input variable and an input of a block. *An output of a block and an input of another block. *An output of a block and an output variable.

Structured Test(ST): A high level language that is block structured and resembles Pascal. All of the languages share IEC61131 Common Elements. Variables and function calls are defined by common elements so different languages can be used in the same program.

Sample program of structured test: (* simple state machine*) TxtState := STATES[State \Machine]; CASE StateMachine OF 1: ClosingValve( ); ELSE ;;BadCase( ); END_CASE;

Instruction List (IL): A low level language that resembles assembly. All of the languages share IEC61131 Common Elements. Similar to Structured Test,variables and function calls are defined by common elements so different languages can be used in the same program. File format has been standardized to XML.

Example: LD Speed GT 1000 JMPCN VOLTS_OK LD Volts VOLTS_OK LD 1 ST %Q75

Sequential Function Chart (SFC): A graphical programming language used for PLSc. The SFC preparation of function charts for control systems. It can be used to program processes that can be split into steps.

Mains components of SFC are: *Steps with associated actions. *Transition with associated logic conditions. *Directed links between steps and transition.