PLC Programming - Basic Knowledge

PLC Programming - Basic Knowledge

1. What is PLC

A programmable Logic Controller (PLC) is a specialized digital computer employed in industrial settings for automation and control. Acting as the central brain of machinery and processes, PLCs receive input from sensors, process the data through programmed logic, and generate output signals to control devices like motors and valves. They use a programming language, often ladder logic, resembling electrical relay diagrams. PLCs are ruggedized for harsh industrial environments and play a crucial role in automating tasks and reducing manufacturing and energy. Their modular design allows scalability, making them versatile components in modern industrial control systems.

2. Where Can PLC Be Used?

 PLCs play a pivotal role in industrial automation, efficiently managing machinery and processes. They receive data from sensors, execute programmed logic, and control actuators, enhancing precision and reducing manual intervention. PLCs find application across diverse industries, from manufacturing to utilities, ensuring streamlined operations, increased productivity, and adaptability to evolving production needs. Their robust capabilities make PLCs indispensable in modern industrial settings, facilities with seamless control and automation for improved efficiency and reliability.

3. Main components of a PLC

There are mainly 6 major part of a PLC that are:

● Processor
● Memory (RAM/ ROM)
● Input device
● Output device
● Power supply
● Programming device

PLC Programming - Basic Knowledge


Description of each part of a PLC:

● Central processing unit (CPU): The brain of the PLC that carries out programmed operations.

● Power supply: Converts incoming electrical power to the voltages needed for the PLC's internal circuits and I/O module

Input Device: This is responsible for interacting with the machine and the instructor which can be external sensor, switches etc. This part helps to take input and send to the CPU to response accordingly.

Output Device: Output device is responsible for interacting with the end point external device like motor, valve or indicator. It converts control signal from the PLC that these devices can interpret.

Memory: Includes read-only memory (ROM) for storing the firmware and random-access memory (RAM) for temporary data.

Programming device: Used to write and load the PLC program.

4. Working of PLC controller

The working of a programmable logic controller can be easily understood as a cyclic scanning method known as the scan cycle.

PLC Programming - Basic Knowledge

Input
The PLC receives input signals from sensors, switches, or other devices through the input module.
 
Program
A logical program is written using a programming language like Ladder logic, Statement List, or Functional block diagram. The program is then transferred to the PLC using cables and stored in the PLC's memory.
 
Process
The PLC's CPU reads the program from memory and executes it to control the process. The PLC uses the input signals to determine the state that the outputs should be changed to.
 
Output
The PLC sends control signals to actuators or other devices through the output module.
 

5. Type of PLC

PLCs can be classified into three main types based on their capabilities:

a. Fixed PLC or Compact PLC

PLC Programming - Basic Knowledge

All the modules are within a single case. This type of PLC has a fixed number of Input/output modules. The power supply, CPU, and communication card are within a single case. From the below image you can get some ideas about the compact or fixed plc.

b. Modular PLC


PLC Programming - Basic Knowledge

 The name itself suggests that this type of PLC consists of various modules. Inputs and Outputs modules can be easily expanded just by adding the modules. All the modules are fitted in the rack, that’s why it is also called rack mounted PLC. The below image shows the modular type of PLC.

c. Rack-Mount PLC:

PLC Programming - Basic Knowledge

This is a type of High-end PLC which is specially designed for complex and demanding application. It has maximum number of I/O points also Rack-mount PLCs are modular and can easily expanded by adding additional modules to the rack.

6. PLC Programming Language

The 5 most popular types of PLC Programming Languages are:

a) Ladder Diagram (LD
b) Sequential Function Charts (SFC)
c) Function Block Diagram (FBD)
d) Structured Text (ST)
e) Instruction List (IL)


a) Ladder Diagram (LD

PLC Programming - Basic Knowledge

Ladder Diagram was originally modeled from relay-logic which used physical devices, such as switches and mechanical relays to control processes. Ladder Diagram utilizes internal logic to replace all, except the physical devices that need an electrical signal to activate them.

Ladder Diagram is built in the form of horizontal rungs with two vertical rails that represent the electrical connection on relay-logic schematics.
You can program all the necessary input conditions to affect the output conditions, whether logical or physical.

b. Sequential Function Chart (SFC)

If you have any experience with flowcharts, then this PLC Programming language will feel familiar to you. In Sequential Function Charts, you use steps and transitions to achieve your end results.

PLC Programming - Basic Knowledge

Steps act as a major function in your program. These steps house the actions that occur when you program them to happen. This decision can be based on timing, a certain phase of the process, or a physical state of an equipment.
Transitions are the instructions that you use to move from one step to another step by setting conditions of true or false.
Unlike traditional flowcharts, the Sequential Function Charts can have multiple paths. You can use branches to initiate multiple steps at one time.

c. Function Block Diagram (FBD)

The Function Block Diagram which is also a graphical type of language. The Function Block Diagram describes a function between inputs and outputs that are connected in blocks by connection lines.


PLC Programming - Basic Knowledge

Function Blocks were originally developed to create a system that you could set up many of the common, repeatable tasks, such as counters, timers, PID Loops, etc.
You program the blocks onto sheets and then the PLC constantly scans the sheets in numerical order or is determined by connections which you program between the blocks.

d. Structured Text (ST)

The 4th PLC Programming Language is the Structured Text. This language is a textual based language.

PLC Programming - Basic Knowledge


Structured Text is a high-level language that is like Basic, Pascal and “C”.
It is a very powerful tool that can execute complex tasks utilizing algorithms and mathematical functions along with repetitive tasks.
The code uses statements that are separated by semicolons and then either inputs, outputs, or variables are changed by these statements.
You must write out each line of code and it uses functions such as FOR, WHILE, IF, ELSE, ELSEIF AND CASE
If you have experience with Basic or C languages, this PLC Programming Language will come easier than some of the other types of PLC languages.

e. Instruction List (IL)

I will now show you the 5th and final PLC Programming Language which is Instruction List. The Instruction List is also a textual based language.

PLC Programming - Basic Knowledge


The Instruction List language resembles Assembly Language. When you use this PLC Programming Language, you will use mnemonic codes such as LD (Load), AND, OR, etc.
The Instruction List contains instructions with each instruction on a new line with any comments you might want to annotate at the end of each line.

 

7. Applications of PLC

Manufacturing Automation: PLCs are extremely used in manufacturing industries for automating processes such as assembly lines, packaging, and material handling.

Process Control: In industries like chemical, petrochemical, and pharmaceuticals, PLCs play a crucial role in controlling and monitoring complex process.

Water treatment and Distributions: PLCs are employed in water treatment plants to control the purification process, monitor water quality, and manage the distribution of water in a network.

Food and Beverage Industry: PLCs can be used in food processing plants for tasks like mixing, backing packaging, quality control etc.

HVAC System: PLCs play vital role in heating, ventilation, ACs to managing temperature, humidity, air quality etc.
 

8. Advantage and Disadvantages of PLC

Some of the advantages and disadvantages of PLC are:

Advantages

Flexibility and Reliability: PLCs are highly flexible. They can be easily programmed and edited. Manufacturing process of PLCs can be done virtually, without physical presentation. It makes PLC more flexible. They are made for robust condition, which makes it more reliable for industry.


Programming: PLCs are programmable device. Which means it can be edited. The code and the instructions given to it are easily changeable.

High Speed Operation: Because of being a programming device, it can create instant output instruction, which depends on the program complexity and the CPU memory, makes it more efficient.

Monitoring system: PLCs provide inbuilt monitoring tools, make them easier to identify the troubleshoot in the system.
 

Disadvantages

Cost: Initial investment for installation for a PLCs are costly. Mainly for small business it can be costly.

Programming: Ladder logics are comparatively easy but complex control system may require extensive algorithm and program.

Software update: It is quite challenging to maintain and upgrade when older PLC system become obsolete or when software hardware updates are required.

Scalability issue: Some PLC system may face scalability issues, particularly if the initial design did not account for future expansions or changes in the manufacturing process.



Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.