Consolidation and Nexus Project to Improve Basic
Services for vulnerable People in Northern Iraq (ConNex)
Technical Support for Operation and Maintenance of Faida Water Network
Project period: August 1 2021 – August 30, 2022
Training: Training on Schneider PLC programming and instrumentation and
SCADA programming
Duhok | August 25, 2021 / Trainer : Eng. Waheed Ibrahim
PLC
What is the definition of "PLC"?
A Programmable Logic Controller, or PLC, is a ruggedized computer used for
industrial automation. These controllers can automate a specific process,
machine function, or even an entire production line.
Page 2
PLC
How does a PLC work?
• The PLC receives information from connected sensors or input
devices, processes the data, and triggers outputs based on pre-
programmed parameters.
• Depending on the inputs and outputs, a PLC can monitor and record
run-time data such as machine productivity or operating
temperature, automatically start and stop processes, generate
alarms if a machine malfunctions, and more. Programmable Logic
Controllers are a flexible and robust control solution, adaptable to
almost any application.
Page 3
PLC
Page 4
PLC
There are a few key features that set PLCs apart from industrial PCs ,
Microcontrollers , and other industrial control solutions :-
• I/O – The PLC’s CPU stores and processes program data, but input
and output modules connect the PLC to the rest of the machine;
these I/O modules are what provide information to the CPU and
trigger specific results. I/O can be either analog or digital; input
devices might include sensors, switches, and meters, while outputs
might include relays, lights, valves, and drives. Users can mix and
match a PLC’s I/O in order to get the right configuration for their
application.
Page 5
PLC
• Communications – In addition to input and output devices, a PLC
might also need to connect with other kinds of systems; for example,
users might want to export application data recorded by the PLC to a
supervisory control and data acquisition (SCADA) system, which
monitors multiple connected devices. PLCs offer a range of ports and
communication protocols to ensure that the PLC can communicate with
these other systems.
• HMI – In order to interact with the PLC in real time, users need an
HMI, or Human Machine Interface. These operator interfaces can be
simple displays, with a text-readout and keypad, or large touchscreen
panels more similar to consumer electronics, but either way, they enable
users to review and input information to the PLC in real time.
Page 6
PLC Components
PLC Components used in Fayda project
• Racks BMEXBP0800
Page 7
PLC Components
• Power supplies BMXCPS2000
Page 8
PLC Components
• BMXP342020
Processor module, Modicon M340 automation
platform, max 1024 discrete I/O + 256 analog I/O,
Modbus, Ethernet.
Page 9
PLC Components
Page 10
PLC Components
Page 11
PLC Components
• BMXDDI3202K discrete
input module Modicon X80
32 inputs - 24 V DC positive
Page 12
PLC Components
• BMXFCW303 : cord set - 40-way terminal - two ends
flying leads - for M340 I/O - 3 m
Page 13
PLC Components
• BMXDDI6402K
discrete input module X80
64 inputs - 24 V DC positive
Page 14
PLC Components
• BMXDDO3202K
discrete output module X80
32 outputs - solid state
24 V DC positive
Page 15
PLC Components
• BMXDDO1602
discrete output module X80
16 outputs solid state
24 V DC positive
Page 16
PLC Components
• BMXAMI0800
non-isolated analog input module
X80 - 8 inputs - fast speed
Page 17
PLC Components
• BMXAMO0802
analog output module X80
8 outputs
Page 18
PLC Components
• BMXFTB2820
28-pin removable spring
terminal blocks
1 x 0.34..1 mm2
Page 19
Unity Pro Software
Unity Pro is the common programming, debugging and operating
software for the Modicon M340, M580, M580S, Premium, Momentum
and Quantum ranges.
Capabilities of Unity Pro Software
Unity Pro supports the following hardware platforms:
• Modicon M340
• Premium
• Atrium
• Quantum
Page 20
Unity Pro Software
Page 21
Unity Pro Software
Page 22
Unity Pro Software
Unity Pro manages four types of files for storing user
applications and projects. Each type of file can be used
according to specific requirements.
File types can be identified by their extension:
*.STU: Unity Pro File
*.STA: Unity Pro Archived Application File
*.XEF: Unity Pro Application Exchange File
*.ZEF: Unity Pro Full Application Exchange File
Page 23
Unity Pro Software
• STU File
This format is used by default when opening or saving a user project.
• STA File
This file type is used for archiving projects and can be created only after the
project has been generated. This file type allows forward compatibility between
the different versions of Unity Pro.
• XEF File
This file type is used for exporting projects in an XML source format and can be
created at any stage of a project.
• ZEF File
This file type is used for exporting projects with global DTMs(Data type
manager) configuration and can be created at any stage of a project.
Page 24
Unity Pro Software
Configurator Window
The configurator window is split into two windows:
• Catalog window
A module can be selected from this window and directly inserted in the
graphical representation of the PLC configuration by dragging and
dropping.
• Graphical representation of the PLC configuration
Page 25
Unity Pro Software
Page 26
Unity Pro Software
Module Configuration
Page 27
Unity Pro Software
Module Properties
Page 28
Unity Pro Software
Network Configuration
The network configuration is called
via the communications folder.
The network configuration windows
allow among others:
• Creation of networks.
• Network analysis.
• Printout of the network
configuration.
Page 29
Unity Pro Software
A window for configuring a network:
Page 30
Unity Pro Software
Data Editor
• Variables
Page 31
Unity Pro Software
• Derived Data Types (DDT)
Page 32
Unity Pro Software
• Function Blocks
Page 33
Unity Pro Software
• DFB Types
Page 34
Unity Pro Software
Unity Pro provides the following programming languages for
creating the user program:
• Function Block Diagram FBD
• Ladder Diagram (LD) language
• Instruction List IL
• Structured Text ST
• Sequential Control SFC
• Ladder Logic 984 (LL984)
Page 35
PLC Programming Languages
1. Ladder Diagram (LD)
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.
Page 36
PLC Programming Languages
Example : PLC Ladder diagram for Forward/Reverse control
of Motor
Page 37
PLC Programming Languages
PLC Inputs List
• FWD PB : I0.0
• REV : I0.1
• STOP PB : I0.2
• Motor Trip : I0.3
PLC Outputs List
• Motor forward : Q0.0
• Motor reverse : Q0.1
Page 38
PLC Programming Languages
Page 39
PLC Programming Languages
The main advantages of the Ladder Diagram language are:
1. The rungs allow it to be organized and easy to follow.
2. It also lets you document comments that are readily visible.
3. It supports online editing very successfully.
Page 40
PLC Programming Languages
Ladder Diagram Disadvantages:
The main disadvantage is that there are some instructions that are not
available, which might make it more difficult for programming such as
motion or batching.
Page 41
PLC Programming Languages
2. Sequential Function Charts (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.
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.
Page 42
PLC Programming Languages
Page 43
PLC Programming Languages
Page 44
PLC Programming Languages
Unlike traditional flowcharts, the Sequential Function Charts can have
multiple paths. You can use branches to initiate multiple steps at one
time.
Page 45
PLC Programming Languages
2-1. Sequential Function Charts Advantages :
1. Processes can be broken into major steps that can make
troubleshooting faster and easier.
2. You have direct access in the logic to see where a piece of
equipment faulted.
3. It can be faster to design and write the logic due to the ability to use
repeated executions of individual pieces of logic.
Page 46
PLC Programming Languages
2-2. Sequential Function Charts Disadvantages :
Even when you consider the advantages of the Sequential
Function Charts, this PLC Programming Language does not
always fit every application.
Page 47
PLC Programming Languages
3. 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.
Page 48
PLC Programming Languages
Page 49
PLC Programming Languages
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.
Page 50
PLC Programming Languages
3-1. Function Block Diagram Advantages
1. The Function Block Diagram does work well with motion controls.
2. The visual method is easier for some users.
3. The biggest advantage of Function Block Diagram is that you can take
many lines of programming and put it into one or several function
blocks.
3-2. Function Block Diagram Disadvantages
The code can get disorganized using this PLC Programming Language
because you can place the function blocks anywhere on the sheet. This
can also make it more difficult to troubleshoot.
Page 51
PLC Programming Languages
Page 52
PLC Programming Languages
4. Structured Text (ST)
The 4th PLC Programming Language is the Structured Text. This
language is a textual based language. 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.
Page 53
PLC Programming Languages
Page 54
PLC Programming Languages
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.
Page 55
PLC Programming Languages
4-1. Structured Text Advantages
1. It is very organized and good at computing large mathematical
calculations.
2. It will enable you to cover some instructions that are not available in
some other languages like the Ladder Diagram.
4-2. Structured Text Disadvantages
1. The syntax can be difficult.
2. It is hard to debug.
3. It is difficult to edit online.
Page 56
PLC Programming Languages
5. 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.
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.
Page 57
PLC Programming Languages
5-1. Instruction List Advantages
The Instruction List language is valuable for applications that need code
that is compact and time critical.
Page 58
PLC Programming Languages
5-2. Instruction List Disadvantages
1. There are few structuring possibilities with the “Goto” command
being one of them.
2. There can also be many errors that are more difficult to deal with in
comparison to many of the other languages that I have previously
reviewed.
Page 59