0% found this document useful (0 votes)
8 views13 pages

1.5 PLCs - Programming - FBDs and Boolean Expressions

The document provides an overview of programming PLCs using Function Block Diagrams (FBD) and Boolean Algebra. It explains the structure and symbols used in FBD, including logic gates and their functions, as well as examples of ladder diagrams and their equivalent FBDs. Additionally, it covers practical applications and exercises related to PLC programming, emphasizing safety considerations and control logic.

Uploaded by

Brian Omondi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views13 pages

1.5 PLCs - Programming - FBDs and Boolean Expressions

The document provides an overview of programming PLCs using Function Block Diagrams (FBD) and Boolean Algebra. It explains the structure and symbols used in FBD, including logic gates and their functions, as well as examples of ladder diagrams and their equivalent FBDs. Additionally, it covers practical applications and exercises related to PLC programming, emphasizing safety considerations and control logic.

Uploaded by

Brian Omondi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Programming PLCs

(Function Block Diagrams and Function Block Diagrams


Boolean Algebra)

Introduction Introduction…

 FBD: Function Block Diagram  The FBD is depicted as a rectangular block with inputs entering
from the left and outputs emerging from the right
 FBD is a PLC program described in terms of graphical blocks

 FBD is a program instruction unit that, when executed, yields one

or more output values  The function block type name is shown in the block, such as AND,
with the name of the function block in the system shown above it,
 A block is represented with the function name written in the box
for example Timer1

 Names of function block inputs are shown within the block at the
appropriate input and output points.
2/4/2021 PLC Programming 3 2/4/2021 PLC Programming 4

1
Introduction… Introduction…
 Cross-diagram connectors are used to indicate where graphical
lines would be difficult to draw without cluttering up or
complicating a diagram and show where an output at one point is
used as an input at another

2/4/2021 PLC Programming 5 2/4/2021 PLC Programming 6

Introduction… Logic Gates


 Function blocks can have standard functions, such as those of the  Two forms of standard circuit symbols are used for logic gates:
logic gates, counters, or timers, or have functions defined by the  United States Standard
user, such as a block to obtain an average value of inputs  An international standard form (IEEE/ANSI) - uses a
 Example: user-defined blocks to give the average of two weights to rectangle with the logic function written inside it
be used further in some other function block  FBD uses the IEEE/ANSI form

 Negated input and negated output are represented as:

2/4/2021 PLC Programming 7 2/4/2021 PLC Programming 8

2
Logic Gate Symbols Logic Gate Symbols…
 1 in a box: indicates that there is an output when the input is 1

 ≥ 𝟏 OR function: there is an output if an input is greater than or


equal to 1

 A negated input: is represented by a small circle on the input

 A negated output: is represented by a small circle on the output

2/4/2021 PLC Programming 9 2/4/2021 PLC Programming 10

Effect of Functional Blocks in PLC Programs Effect of Functional Blocks in PLC


Programs…
 AND Function:  AND Function:

2/4/2021 PLC Programming 11 2/4/2021 PLC Programming 12

3
Effect of Functional Blocks in PLC Effect of Functional Blocks in PLC
Programs… Programs…
 OR Function:  OR Function:

2/4/2021 PLC Programming 13 2/4/2021 PLC Programming 14

Effect of Functional Blocks in PLC Effect of Functional Blocks in PLC


Programs… Programs…
 NAND Function:  NOR Function:

2/4/2021 PLC Programming 15 2/4/2021 PLC Programming 16

4
Effect of Functional Blocks in PLC Effect of Functional Blocks in PLC
Programs… Programs…
 XOR Function:  XOR Function:

2/4/2021 PLC Programming 17 2/4/2021 PLC Programming 18

Examples: Ladder Diagrams and Equivalent Examples: Ladder Diagrams and Equivalent
FBDs FBDs…
 Example 1:  Example 2

2/4/2021 PLC Programming 19 2/4/2021 PLC Programming 20

5
Examples: Ladder Diagrams and Equivalent Example Application
FBDs…
 Example 3:  Consider the development of a function block diagram and ladder
diagram for an application in which a pump is required to be
activated and pump liquid into a tank when the start switch is
closed, the level of liquid in the tank is below the required level,
and there is liquid in the reservoir from which it is to be pumped

2/4/2021 PLC Programming 21 2/4/2021 PLC Programming 22

Example Application…
 What is required is an AND logic situation between the start switch
input and a sensor input that is on when the liquid in the tank is
below the required level

 We might have a switch that is on until the liquid is at the required Boolean Algebra
level

2/4/2021 PLC Programming 23

6
Introduction Example 1
 Ladder programs can be derived from Boolean expressions  The Boolean expression

 AND Operation:

represents that we have A or the term B and C giving the output Q

 OR Operation:  This can be written in Mitsubishi notation as:

 NOT Operation: and in Siemens notation as:

2/4/2021 PLC Programming 25 2/4/2021 PLC Programming 26

Example 1… Example 2
 The ladder diagram and FBD for the above:  The Boolean expression:

 Can be written in Mitsubishi notation as:

and in Siemens notation as:

2/4/2021 PLC Programming 27 2/4/2021 PLC Programming 28

7
Example 2… Example 3
 The ladder diagram and FBD for the above:  An XOR gate assembled from NOT, AND, and OR gates:

 The Boolean Expression is:

2/4/2021 PLC Programming 29 2/4/2021 PLC Programming 30

Example 4 Example 4…
 Consider the below logic diagram with many inputs  The ladder diagram for the above is:

 The Boolean expression is:

2/4/2021 PLC Programming 31 2/4/2021 PLC Programming 32

8
Application Examples Application Examples…
 Example 1: A signal lamp is required to be switched on if a pump  Example 2: consider a valve that is to be operated to lift a load
is running and the pressure is satisfactory, or if the lamp test switch when a pump is running and either the lift switch or a switch
is closed indicating that the load has not already been lifted and is at the
bottom of its lift channel is operated

2/4/2021 PLC Programming 33 2/4/2021 PLC Programming 34

Application Examples… Location of Stop Switches


 Example 3: consider a system where there has to be no output  The location of a stop switch should be carefully considered to
when any one of four sensors gives an output; otherwise there is to ensure a safe system
be an output  A stop switch is not safe if it is normally closed and has to be
opened to give the stop action. If the switch malfunctions and
remains closed, the system cannot be stopped

 It is better to program the stop switch in the ladder program as


open and use a stop switch that is normally closed and operating
opens it. Thus there is an input signal to the system that closes the
contacts in the program when it starts up
2/4/2021 PLC Programming 35 2/4/2021 PLC Programming 36

9
Location of Stop Switches… Location of Stop Switches…

2/4/2021 PLC Programming 37 2/4/2021 PLC Programming 38

Location of Emergency Stop Switch Location of Emergency Stop Switch…

2/4/2021 PLC Programming 39 2/4/2021 PLC Programming 40

10
Location of Emergency Stop Switch… Exercise 1
 If the emergency stop switch is in the input to the PLC then if the  Draw the ladder diagram equivalent of the following function
PLC malfunctions it might not be possible to stop the motor block diagram

 If the emergency stop switch is in the output, operating it will stop


the motor and cause the start switch to become unlatched

 The motor will thus not restart when the emergency stop button is
released

 We must always have the situation that if a failure of the PLC


occurs, the outputs must fall into a “fail-safe” state so that no harm
can occur to anyone working in the plant
2/4/2021 PLC Programming 41 2/4/2021 PLC Programming 42

Exercise 2 Exercise 2…
 A machine is being designed to wrap boxes of chocolate. The d) The box arrives and is detected by an optical sensor (P). After
boxes arrive at the machine on a conveyor belt. The list below this the conveyor (C) is stopped and the box is clamped in
shows the process steps in sequence. place (H).

a) The box is manually inserted on a conveyor by the e) A wrapping mechanism (W) is turned on for 2 seconds
operator f) A sticker cylinder (S) is turned on for 1 second to put
b) The push button START is pressed by the operator and the consumer labeling on the box
conveyor (C) starts moving g) The clamp (H) is turned off and the conveyor C is turned on
c) Process stops operating when the STOP button is
momentarily pressed
2/4/2021 PLC Programming 43 2/4/2021 PLC Programming 44

11
Exercise 3 Exercise 4
 Draw the function block diagrams to represent:  Write the Boolean equations to represent the following:

a) There is to be a motor startup when either switch A or switch B a) There is an output Q when either input A or input B occurs
is activated b) There is an output Q when either input A or input B occur but
b) A motor is to be started when two normally open switches are not when input C occurs
activated and remain on even if the first of the two switches c) There is an output Q when input A occurs but not when input
goes off but not if the second switch goes off B occurs
c) A pump is to be switched on if the pump start switch is on or a
test switch is operated

2/4/2021 PLC Programming 45 2/4/2021 PLC Programming 46

Exercise 5 Exercise 6
 For safety reasons, machines are often set up to ensure that a  Draw the ladder rungs represented by the Boolean equations:
machine can only be operated by the operator pressing two
switches simultaneously, one by the right hand and one by the left
hand. This is to ensure that both the operator’s hands will be on the
switches and cannot be in the machine when it is operating. Draw a
ladder rung for such a requirement

2/4/2021 PLC Programming 47 2/4/2021 PLC Programming 48

12
Exercise 7
 Write the Boolean expression, draw the FBD and typical PLC
ladder logic diagram for a control system wherein a fan is to run
only when all of the following conditions are met:

 Input A is OFF
END
 Input B is ON or input C is ON, or both B and C are ON

 Inputs D and E are both ON

 One or more of inputs F, G, or H are ON

2/4/2021 PLC Programming 49 2/4/2021 PLC Programming 50

13

You might also like