Reader small image

You're reading from  Industrial Automation from Scratch

Product typeBook
Published inJun 2023
PublisherPackt
ISBN-139781800569386
Edition1st Edition
Right arrow
Author (1)
Olushola Akande
Olushola Akande
author image
Olushola Akande

Olushola Akande is an industrial automation and robotics expert with over 10 years of experience in the design and development of automation and robotics-related projects. He is an industrial automation trainer and consultant with a passion for driving industries to achieve greater results by doing work more accurately with less effort of human control. He is the chief executive officer (CEO) of Showlight Technologies Limited, an industrial automation, robotics, artificial intelligence (AI), and machine learning (ML) training and servicing company in Lagos, Nigeria. He is a member of the Schneider Electric team involved in the installation of Integrated Control and Safety Systems (ICSSs), which includes high-integrity PLCs, supervisory control and data acquisition (SCADA) systems, and distributed control systems (DCSs) at the largest oil refinery in Africa (Dangote Oil Refinery) at Lekki Free Zone, Lagos, Nigeria.
Read more about Olushola Akande

Right arrow

Understanding PLC Software and Programming with TIA Portal

In the previous chapter, we learned about the hardware part of the Programmable Logic Controller (PLC), which includes wiring the PLC to sensors and actuators. A PLC wired to switches, sensors, and actuators will do nothing unless there is a program written into it. A program (a set of instructions written using a programming language) is required for the CPU of the PLC to make decisions based on the inputs and carry out the required control function. It is important for an industrial automation engineer to have knowledge of both the hardware part of the PLC, including the wiring, and the software part, which includes programming.

This chapter focuses on the software aspect of the PLC. You will learn the basic things you need to start programming PLCs with the most common PLC programming language, Ladder Diagram (LD). You will learn how to download, install, and use Totally Integrated Automation Portal (TIA Portal), powerful...

Technical requirements

While every part of this book is valuable, Chapter 2, Switches and Sensors – Working Principles, Applications, and Wiring, Chapter 3, Actuators and Their Applications in Industrial Automation, and Chapter 7, Understanding PLC Hardware and Wiring, are very important to have a better understanding of this chapter.

Understanding software/program in PLCs

Before looking into PLC programming languages, let's get some knowledge of the software/program in PLCs.

In computing, generally, software is a set of instructions written in a language the computer understands to perform a task. Software can also be referred to as a program.

A PLC requires two types of software that must be executed by the CPU for the PLC to function. They are as follows:

  • The operating system (firmware)
  • User program

The operating system is the program written by the PLC manufacturers and designed to run automatically in the PLC once powered. It is responsible for executing the user program, establishing communication between devices, memory management, and updating the output.

A PLC user program is a set of instructions in either textual or graphical form that represents the control function that will be carried out for a specific industrial task or application. It is the program that the user...

Introducing PLC programming languages

According to International Electrotechnical Commission (IEC) standards, there are five programming languages, stated in part 3 of IEC 61131, for writing a program for PLCs to control and automate a task. These programming languages are the following:

  • Ladder Diagram (LD)
  • Function Block Diagram (FBD)
  • Sequential Function Chart (SFC)
  • Instruction List (IL)
  • Structured Text (ST)

IEC 61131-3 can be purchased at their web store at the following link. However, there is an abstract you can read and also a preview that can be downloaded for free:

https://webstore.iec.ch/publication/4552

Note

IEC is an international standards organization responsible for preparing and publishing international standards for all electrical, electronics, and other related technologies.

Let's discuss each of these programming languages in detail.

Ladder Diagram (LD)

This is most common among several PLC programming languages...

Introducing PLC programming devices

These are devices or tools used to write, edit, and transfer programs to the PLC. They can also be used to read programs from the PLC. Hence, a programming device can be used to download (write) or upload (read) a program. The term download or write means to transfer a program from a programming device to a PLC while the term upload or read means to transfer a program from the PLC to a programming device. Programming devices can also help in troubleshooting PLCs. There are two common programming devices:

  • Handheld devices
  • Personal Computers (PCs)

Handheld devices are usually connected to the PLC via a cable. They consist of keys for entering a program, editing a program, downloading a program to the PLC or uploading a program from the PLC. They also consist of a small display for viewing instructions. They are small in size and have limited capability.

A PC is the most popular programming device. A programming software from the...

Understanding the basics of LD

LD is an easy-to-learn programing language for creating control programs in PLCs to automate or control machines in industries.

In Chapter 1, Introduction to Industrial Automation, it was mentioned that prior to the introduction of PLCs, there was automation but through the use of relays, timers, contactors, and so on. These were hardwired together to perform the required control or automation task. Relay logic circuits were used when designing such control and were also used for troubleshooting the system.

A relay logic circuit is an electrical circuit or drawing showing symbols of components, such as relays, switches, timers, and contactors, and their connections for the desired control or automation task. The circuit usually consists of two vertical lines (rails), one on the extreme left (supply voltage potential, live or positive) and the other on the right (zero potential, neutral or negative). One or several horizontal lines in a relay logic...

Downloading and installing TIA Portal V13 Professional and PLCSIM

Siemens offers a 21-day free trial of their programming software (TIA Portal). There is also a simulator that allows you to simulate your program. Hence, you can write a program and see how it runs even when you don't have a real PLC by using the simulator (PLCSIM). You can download both TIA Portal V13 Professional and PLCSIM free online and use it to learn PLC programming or purchase a license for TIA Portal to avoid any restrictions.

Downloading TIA Portal V13 and PLCSIM

The following steps should be followed to download TIA Portal V13 and PLCSIM:

  1. The first step is to visit the download page. The following link should take you to the download page:

https://support.industry.siemens.com/cs/document/109745155/simatic-step-7-including-plcsim-v13-sp2-trial-download?dti=0&lc=en-WW

The following screenshot shows the page of the preceding link:

Figure 8.18 – Download page of Siemens TIA Portal V13 Professional and PLCSIM (1)

Figure 8.18 –...

Creating a project and writing a program with Siemens programming software (TIA Portal)

We will now start TIA Portal, create a project, and write a simple program using the following steps:

  1. Start TIA Portal V13 from the Start menu or double click on the TIA Portal V13 icon on your desktop.
Figure 8.23 – Creating a project in TIA Portal V13

Figure 8.23 – Creating a project in TIA Portal V13

Click Create new project.

  1. Type the project name and click Create.
Figure 8.24 – Configuring a device in TIA Portal V13 (1)

Figure 8.24 – Configuring a device in TIA Portal V13 (1)

  1. Click on Devices & networks.
Figure 8.25 – Configuring a device in TIA Portal V13 (2)

Figure 8.25 – Configuring a device in TIA Portal V13 (2)

  1. Click Add new device and select Controllers.
Figure 8.26 – Configuring a device in TIA Portal V13 (3)

Figure 8.26 – Configuring a device in TIA Portal V13 (3)

  1. Expand SIMATIC S7 1200 | CPU | CPU1211C AC/DC/Rly and click STEP 7 Professional in the Automation License Management - STEP 7 Basic dialog box,...

Summary

Congratulations! You have successfully completed Chapter 8 of this book. The chapter explained the software part of PLC. You should now be able to differentiate between various programming languages. You should also be able to explain programming devices, programming software, the basics of LD, and so on. An industrial automation engineer needs to be aware of the elements of LD and the rules for LD programming, which was well explained in this chapter. You should now be familiar with Siemens programming software (TIA Portal) and be able to use it to write some basic PLC programs using the most common PLC programming language (LD).

The next chapter will further discuss PLC programming. You will learn how to simulate your program, how to download program to a live PLC and also how to write programs that are more advanced than the ones learned in this chapter.

Questions

The following are questions to test your understanding of this chapter. Ensure you have read and understood the topics in this chapter before attempting the questions:

  1. ___________________ is a set of instructions written in a language the computer understands to perform a task.
  2. __________________ is a set of instructions in either textual or graphical form that represents the control function that will be carried out for a specific industrial task or application.
  3. According to IEC standards, the five programming languages stated in part 3 of IEC 61131 for writing a program for PLCs to control and automate tasks are ____________, _____________, _______________, ___________________, and _____________________.
  4. ___________________ is the most common among the several PLC programming languages. It is a graphical programming language that's easy to understand for most plant technicians because it's similar to the relay diagrams that they are familiar...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Industrial Automation from Scratch
Published in: Jun 2023Publisher: PacktISBN-13: 9781800569386
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Olushola Akande

Olushola Akande is an industrial automation and robotics expert with over 10 years of experience in the design and development of automation and robotics-related projects. He is an industrial automation trainer and consultant with a passion for driving industries to achieve greater results by doing work more accurately with less effort of human control. He is the chief executive officer (CEO) of Showlight Technologies Limited, an industrial automation, robotics, artificial intelligence (AI), and machine learning (ML) training and servicing company in Lagos, Nigeria. He is a member of the Schneider Electric team involved in the installation of Integrated Control and Safety Systems (ICSSs), which includes high-integrity PLCs, supervisory control and data acquisition (SCADA) systems, and distributed control systems (DCSs) at the largest oil refinery in Africa (Dangote Oil Refinery) at Lekki Free Zone, Lagos, Nigeria.
Read more about Olushola Akande