Professional Documents
Culture Documents
Unit 5 - PLC Software-2
Unit 5 - PLC Software-2
Methods of Programming a PLC,PLC Software IDE, Ladder Diagrams, Ladder diagram for logic
gates AND, OR, NOT,NAND, XOR, XNOR, Comparison, Use of timers and counters of PLC,
Temperature control using PLC, PLC Ladder Programs for Washing machine, Garage Door, Bottle
filling, Temperature controller using closed loop and a mini-application using PLC
A PLC is a Programmable Logic Controller and was first used to replace relay circuits. IEC 61131 -3 is
the electrical standard for PLC programming methods, though many programmers aren’t formally
trained and don’t even know this standard exists. Each programmer develops his own style and
methods for programming, just as computer programmers do.
The five PLC programming languages defined in the IEC’s standard are:
Ladder Logic
Function Block Diagram
Sequential Function Charts
Structured Text
Instruction List
Each of these languages falls into one of two categories: graphical or textual. Graphical languages are
crafted with visual elements, whereas textual languages use strings of text.
For each language, we’ll go over its basic architecture, the benefits of using it, and some use cases that are
best suited for it. Let’s kick things off with the popular Ladder Logic.
Ladder Logic
Ladder Logic, also known as Ladder Diagram, is a graphical PLC programming language based on relay
logic’s circuit diagrams. Ladder Logic consists of two parallel bars connected by a series of rungs,
resembling a ladder in appearance (hence, the name). There are contacts and coils on these rungs, which
symbolize inputs (such as a sensor value) and outputs (like a motor run command) respectively.
The vast majority of control system programming in North America uses Ladder Logic, and for good
reason. It’s flexible, versatile, simple to troubleshoot, and easy to learn. One drawback, however, is that
once a ladder hits a certain amount of rungs, it can become unwieldy and need to be split into multiple
ladders for maintainability.
State machines, PID control, and systems with an abundance of Boolean algebra are some use cases that
are well-suited for Ladder Logic.
Function Block Diagram
Function Block Diagram (FBD) is another popular graphical PLC programming language. It consists of
various kinds of blocks that have inputs and outputs. Devices connected to the PLC can be linked to an
input, and variables can be sent to an output. Additionally, blocks connect to each other — the output of
one block can feed into another block’s input. These blocks are what define the functions of a system.
The FBD language is relatively simple, though it does require some training to use. It’s a great choice for
safety PLCs, PID loops, and when you need to do encapsulation, reuse code frequently, hide or preserve
data, or do analog input filtering.
Structured Text
Structured Text (ST) is a high-level PLC programming language. It’s a textual language, with syntax
comparable to C or C++, so those who have studied these types of computer programming languages will
have an easier time with it. In ST, statements (such as IF, for example) are used to perform functions.
ST is a concise language that executes quickly and can be read without much difficulty. Troubleshooting
it, on the other hand, can be a more involved process, since the states of variables aren’t easily discernible.
This language is best for doing things like barcode parsing, looping, manipulating data, bridging the gap to
machine code, complicated math, or searching data.
Instruction List
Instruction List (IL) is a low-level textual PLC programming language. Instruction List was deprecated in
the IEC’s standard, which means it’s doubtful that new PLCs will be programmed with it. Since some
current PLCs may still use IL, however, it’s helpful to know what it’s all about.
Siemens PLC
Probably the most famous automation company in the world; it’s the world’s number one when it comes
to automation and boasts of 30.7% of the global market share. It offers a line of controllers known
as SIMATIC, a short form of Siemens Automatic, which comes with a series of fabulous features such as
Ethernet TCP/IP connection, Profinet, and profibus. Through its SIMATIC software, Siemens offers
maximum efficiency throughout the entire process/system or automation.
At the moment, Siemens is offering PLCs to petrochemicals, offshore plants, and building management
systems. With its consistent prove of scalability, flexibility, and ability, the software offers automation
technology that best suits production, manufacturing, processing, engineering, detection, communication,
and diagnostic fields.
Most importantly, its easy-to-use property makes the software popular among different consumers. In a
nutshell, its combination of complex and simple programming mechanisms makes it a global leader in
automation.
Hitachi PLC
Hitachi has a long history in making PLCs. Ordinary features such as reliability, adaptability, compact
format, and good functionality made it one of the preferred PLC manufacturers globally. All its series
come with an extensive array of instructions, various communication capabilities, and resilience.
Ladder Diagrams
Ladder logic is a programming language that represents a program by a graphical diagram based on the
circuit diagrams of relay logic hardware. It is primarily used to develop software for PLCs used in
industrial control applications. Programs in this language resemble ladders, with two vertical rails and a
series of horizontal rungs between them, and hence the name ladder.
Ladder logic is widely used to program PLCs, which require sequential control of a process or
manufacturing operation. Ladder logic is useful for simple but critical control systems or for reworking
old hardwired relay circuits. As PLCs became more sophisticated, it has also been used in very complex
automation systems. Often the ladder logic program is used along with a human machine interface (HMI)
program operating on a computer workstation.
PLC Temperature Control Programming
We are using Three Thermostats to measure the temperature at each heater. also another thermostat for
safety shutoff in case of malfunction or emergency or to avoid over temperatures.
All these heaters have different setpoints or different temperature ranges where heaters can be turned ON
accordingly (below table shows the temperature ranges).
1. A temperature control system consists of four thermostats. The system operates three heating units.
The thermostats (TS1/TS2/TS3/TS4 are set at 55°C, 60°C, 65°C and 70°C.
2. Below 55°C temperature, three heaters (H1,H2,H3) are to be in ON state
3. Between 55°C – 60°C two heaters (H2,H3) are to be in ON state.
4. Between 60°C – 65°C one heater (H3) is to be in ON state.
5. Above 70°C all heaters are to be in OFF state, there is a safety shutoff (Relay CR1) in case any
heater is operating by mistake.
6. A master switch turns the system ON and OFF.
PLC Solution
There are four thermostats; assume them be in NC state when the set point is not reached.
Let there be a control relay (CR1) to work as a safety shutoff.
Master Switch : The Start switch is NO and Stop switch NC type.
The below table shows the temperature ranges where Thermostats (TS1,TS2,TS3,TS4) status will be
indicated as per the temperature value.
Also the Heaters (H1,H2,H3) status in which either those Heaters will be ON or OFF as per the
temperature value.
Bottle filling PLC Ladder Diagram
https://instrumentationtools.com/automatic-bottle-filling-system/
https://ied-nitk.vlabs.ac.in/exp/exp-container-filling-process-nitk/simulation.html
Garage Door
https://www.theengineeringprojects.com/2023/01/automatic-garage-door-with-plc-ladder-logic.html