Operation And Application Of Plc Computer Science Essay

Published: Last Edited:



PLC's were developed in the 1969 and are widely used in industry all over the world. They come in many different forms such as self contained units which are used for smaller input/outputs to modular systems which can be used for larger inputs/outputs.

A basic PLC system is made up of numerous components such as Central processing unit(CPU), memory, power supply unit, input/output interface section, communication interface and the programming device.

PLC Design and Operation Characteristics

There are 3 processes within the operation of the plc:-

Scans or reads from the input devices

Executes or solves the program logic

Updates or writes to the output devices

There are three types of PLC mechanical design systems which are:-



Rack mounted

Design Characteristics


A simple type of controller which has basic components within a single housing such as processer, which runs the software program, connecting ports for the input/output connections. These PLCs are typically attached to the device being controlled.

Pro: Small, lightweight, cheap, tough, simple, easy to replace.

Con: limited function, poor interfaces, limited communication and data types, limited memory and program size, fixed inputs and outputs, not expandable.


This PLC contains core functions such as, a base unit, power regulations, the computer processor and input connections. It contains many modules which can be joined together and can form a customized controller. This modular can be customized and changed easily.

Pro: Small, fixed I/O which is expandable

Con: Dependant on CPU capabilities

Rack Mounting

Similar to the modular PLC but is implemented differently. The difference is that the rack mounting PLC keeps each module separate where the modular PLC has a base unit directly. The modules are stored in racks and are connected through a network. This allows for large systems to be built which and can be easily removed and inserted.

Pro: Expandable, powerful, full function, full communication, good interface, essentially unlimited input/output, all functions customizable.

Con: Large, expensive, fragile

Input and Output Devices

Input/output devices allows connections between systems made through channels to devices such as sensors which are input devices and motors and solenoids which are output devices. Programs can be entered through the programme panel for the input/output devices.

Input Devices

Mechanical switches

A switch with on/off signals causing a switch to open or close which can be used to indicate the presence of a piece of work on something like a machining table. The piece of work against the switch on the table meaning for it to close and vice versa.

limit switch

A switch that can be actuated by a roller or lever and detects the presence of a moving part.

Liquid-level switches

This switch is used in something like a tank with a liquid and often a float is used to determine the level of the liquid and the movement can trigger switches.

Proximity switches

Normally more suited for metallic objects and switch is triggered without making contact.

Reed Switches

These are magnetized switches and when the coil is close to the switch they become magnetized and are attract each other.

Output Devices


Relays are used to control large current or voltage and to isolate the power used to initiate the switching action from that of the controlled power. The switch works by a magnetic field pulling the contacts to close which is produced by a current passing through a solenoid.


The rotation of a motor is generated through coils of wire with a magnetic core and the armature is mounted on bearings and a magnetic field is produced causing monitor to turn.

Directional Control Valves

The directional control valve which is solenoid operated directs flow to desired destination.


A device that converts physical quantity into its corresponding electrical signal.

Passive Type Transducers

Resistance Variation Type

Resistance strain gauge

Resistance Thermometer

Capacitance Variation Type

Variable capacitance pressure gauge

Dielectric gauge

Inductance Variation Type

Eddy current transducer

Variable reluctant type

Proximity inductance type

Voltage and Current Type

Photo-emissive cell

Hall effect

Active Type Transducers

Photo-voltaic cell


Piezoelectric type

Moving coil type

Communication Links

There are many communication ports built into a PLC and the 9-pin RS-232 is normally the one used but the EIA-485 or Ethernet is an option. Most PLCs in this day in age uses the network to communicate to other systems such as SCADA (Supervisory Control and Data Acquisition) system or web browser

Profibus System

This is deemed to be the fastest fieldbus operation in the market today and its messaging format is designed for high speed serial I/O in factory and building automation applications.

AS-Interface System

This is a safety/emergency stop function in machinery and all communicating safety devices follow all normal data rules. The dynamic data changes is verified by the required level of data and this technology is called safety at work act and can all be connected to the same network.

There are four basic components that make up the AS-Interface:

Scanners and Gateways (also called masters)

Power supplies and repeaters

Modules (also called slaves)

Network cable, installation hardware and useful tool (infrastructure)


This is a form of communication and controls one or more devices or processes in a computer network. The direction of control is always from the master to the slave.

Screened Twisted Pair Cable

This is a cable mainly used for ethernet and the structure of the cable and has four twisted pair which is protected by a shield to reduce magnetic interference (EMI) radiation and susceptibibilty to outside noise.

Coaxial Cable

This cable is used as a transmission line for radio frequency signals and can be used for many applications such as computer networking and antennas. It has an inner conductor surrounded by a flexible, tubular insulating layer protected by a shield.

Ribbon Cable

These are normally used mainly in computers and usually link up hard drives and CD drives. It a flat cable with many conducting wires running parallel to each other.

Internal Architecture

Central Processing Unit - CPU

This is the brain of a PLC and is normally one of the microcontrollers and they come in 16-bit and 32-bit. The CPU takes control of many applications including communication, program execution, memory operation, overseeing input and setting output and many more. The CPU also does numerous checkups such as a memory checkup to ensure there is no damage and this is done for safety reasons. The PLC is also checked for errors by the CPU to ensure that faults are picked up early and normally the PLC controller has warning light to give the user an indication of these faults.


PLC memories can be divided in 5 different categories which are stated below. All PLCs contain both RAM and ROM and the size can vary and is determined by the size of the unit.

Executive Memory

This is always in the ROM and once programmed it rarely needs changing. This does all the scanning in a PLC and it tells the microprocessor to read each user instructions. The I/O status is also checked by this and also it monitors the current health and safety of a system and all components.

System memory

A section of RAM is installed for this and is used to ensure the operating system function runs as it should. It is used to store results and information when the programmer performs its duties.

I/O Status Memory - I/O Image Table

A portion of the RAM is used for this to determine the current I/O status.

Data Memory

Timers, counters, mathematics and process parameter are required so memory is need for this.

User Program Memory

This is storage allocated for the user programmes and when the programme is opened it instructs the microprocessor to scan and find the instructions.

Opto Isolator

This is a light emitted diode and a photo transistor which is seperated by a distance of a very thin piece of glass on a chip. The LED is normally connected to the output devices and the photo transistor is normally connected to the input. It is used to isolate a device from one another in high electromagnetic noise areas or vibration and it does this by sending a signal and the purpose of this is to save the computer.

Input and Output Units

Connections can be made through input/output cannels to input devices such as sensors and output devices such as motors. These units provide a communication between the system and the outside world. Sensors and actuators can normally be connected to the units without the need for extra circuitary because the input/output channels provides an isolation and signal conditioning function.

Shift registers

Provides information concerning an item which is determined at one point in a process to another point later in the process. The information which is concerned could be something like size, weight, color or any other relevant parameters in the process.

Operational Characteristics


Step 1

CHECK INPUT STATUS - First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third... It records this data into its memory to be used during the next step.

Step 2

EXECUTE PROGRAM - Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since it already knows which inputs are on/off from the previous step it will be able to decide whether the first output should be turned on based on the state of the first input. It will store the execution results for use later during the next step.

Step 3

UPDATE OUTPUT STATUS - Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step. Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true.

PLC Information and Communication Techniques

Forms of Signal


Discrete (digital) means on or off so when the input is switched on the output of the system will start, something like a motor.

Analogue are signals that have a number of different values between two limits such as temperature or pressure

Digital is a sequence of pulses

Number Systems


Everyday we use decimal numbers to count things like in mathematics in a school or counting the cost on receipts from purchases. The word 'deci' means 10 so that means there are 10 digits in the decimal number system. So with a base number of 10 the number system would be:


Digit Weighting

In a number system there is a weight value assigned to each digit so if the decimal is base 10 numbers the weight of each digit would be power of 10.

There is also a position number for each digit so the first digit on the right is the position zero then the next would be position one, then the next position two and so on.

The following figure represents a decimal number with the position and weight of each digit shown and how the value of the number is derived.


PLC's, computers and digital devices all use a number system call binary and this works on a base-2 system so there will be two valid digits 0 and 1. Each bit has a position and weight value assigned to it and binary is a base-2 number system so therefore the weight of each bit is 2 raised to the power of the bit position.

One digit of binary is called a bit. Bits are used in groups to represent all other numbers. Bit grouping nomenclature is as follows:

1 binary digit is a bit

4-bits is a nibble (term is not used often)

8-bits is a byte

16-bits is a word

32-bits is a double word or DWORD

64-bits is a quad word or QWOR

Below are two formats that binary numbers can be written:

10110012 or 1011001b

Below is a figure of a 16-bit binary which shows the terminology and the weight values of each bit, zero being far right and 16 far left.


Hexadecimal is a base-16 number system and most modern day PLC's use this. This system can be written in two formats as shown below:

2416 or 24h

Below is a table showing 4-bits of binary corresponding to hex digits:

Hex Number

4-bit Binary





















A (10)


B (11)


C (12)


D (13)


E (14)


F (15)


Each digit in a hexadecimal number has a weight Value. The weight of a hex digit is the base raised to the power of the digit position. The figure below depicts an example.

Hexadecimal Weighting


This is used in various PLC's but it is not as common as the hexdecimal. This uses a eight numbering system from zero to seven and the column weight are 1, 8, 64, 512, etc. Below is a chart on how to convert an octal number to decimal:

BCD (Binary Coded Decimal)

This uses a four binary bit for each digit and does not use a base number system only represent decimal digits. This method is very popular when numbers are to be output or input to the computer. Below is an example of a BCD number system which show there are four digits s0 116-bits are required:





Universal Serial Bus (USB)

PLC Programming Techniques

Method of Programming

Ladder and Logic Diagrams

Ladder Diagram

Function Block Diagram

Sequential Function Chart

Structured Text

Instruction List

Associated Elements



Flip Flop

Shift Register

Self Holding Circuit

Drilling Rig

Start Sequence of Circuit

Cylinder 1 clamp in closed position

Cylinder 2 drill in closed position

Cylinder 3 eject in open position

Cylinder 1 clamp in open position

Cylinder 2 drill in closed position

Cylinder 3 eject in open position

When the start switch is operated the circuit is energised and S1, S5, S3 is made and COIL 1 which then energises SOL 1 which moves cylinder 1 to the clamp position.

Cylinder 1 clamp in open position

Cylinder 2 drill in open position

Cylinder 3 eject in open position

S2, S3 and Lockout 1 is made and Sol 6 is energised which operates cylinder 2 drill to the down position.

Cylinder 1 clamp in open position

Cylinder 2 drill in closed position

Cylinder 3 eject in open position

S2, S6, S3 is made and energises Sol 5 which then operates Cylinder 2 drill to the UP position.

Cylinder 1 clamp in open position

Cylinder 2 drill in closed position

Cylinder 3 eject in closed position

Cylinder 1 clamp in closed position

Cylinder 2 drill in closed position

Cylinder 3 eject in closed position

Drill back to normal position at end of cycle

Cylinder 1 clamp in closed position

Cylinder 2 drill in closed position

Cylinder 3 eject in open position

Circuit when Reset button is Operated