Boolean Logic to PLC Function Blocks | Fundamentals

Описание к видео Boolean Logic to PLC Function Blocks | Fundamentals

▶ C'mon over to https://realpars.com where you can learn PLC programming faster and easier than you ever thought possible!
=============================

▶ Check out the full blog post over at
https://realpars.com/boolean-logic/

=============================

⌚Timestamps:
00:00 - Intro
00:49 - Boolean logic
01:44 - Basic Function Blocks
02:07 - OR Function Block
03:12 - AND Function Block
03:51 - Boolean logic FBD optimization

=============================

Have you ever wondered how skilled PLC Programmers create, install and test programs when presented with complex system requirements?

Today’s successful PLC programmers possess knowledge and skills in electrical, mechanical, and software engineering.

In addition to having expert-level skills in vendor-specific PLC programming software, PLC programmers rely on Boolean Logic and mathematical concepts to optimize their designs.

In this video, we’re going to have a look at some basic mathematical concepts that are used to create Function Block programs.

Earlier we said that PLC programmers rely on mathematical concepts to optimize their designs. PLC programmers use Boolean Algebra, also called Boolean Logic every time they create a program.

Boolean Logic centers around the fundamental concept that all values are either True or False. Going one step further, True and False can be represented by either a 1 bit or a 0 bit.

You’ve likely noticed that most PLC programming languages use the term BOOL to represent a digital input or output. BOOL is short for Boolean. Every digital I/O can be represented by a 1 or a 0.

Function Block Diagram (FBD) as described in IEC 61131-3 is rapidly replacing Ladder Logic as the programming language of choice amongst PLC programmers.

Let’s look at the two basic Function Blocks in FBD and investigate the Boolean Algebra associated with each.

1) The OR Function Block has at least two inputs.
Earlier we said in Boolean Logic, all values are either True or False and can be represented by either a 1 or a 0 bit.

The OR Function Block has a Truth Table that does two things. First of all, it lays out all of the possible input conditions. Secondly, it indicates how the output reacts to the input conditions.

From the Truth Table, we can see that the C is True when A OR B is True

OK… Here’s where we get into the Boolean Algebra part. The mathematical expression for the OR function block is A OR B equals C. A plus sign is used to indicate the OR function.

In primary school, we were taught that the plus sign is used for addition. So… it would appear that the OR function block performs Boolean addition!

2) The AND Function Block has at least two inputs.
From the AND Truth Table, we can see that C is True when A AND B are True.

The mathematical expression for the AND function block is A AND B equals C. Notice the multiplication symbol used to indicate the AND function. So, it would appear that the AND function block performs Boolean multiplication!

Let’s look at a simple example of Boolean Logic optimization.

On the first pass of converting a system requirement into a FUNCTION BLOCK DIAGRAM, a programmer ended with three function blocks.

The programmer would ask herself… Can I optimize this FUNCTION BLOCK DIAGRAM and eliminate any of the function blocks using Boolean Algebra?
The answer is Yes. So, let’s see how.

The Boolean Logic expression for the program is: D=AB+AC
Using a little high school math, we use the Distributive Law and a transformation occurs: D=A(B+C)

After using some basic algebra, we’ve gone from three function blocks to two function blocks.

=============================

To learn more, you might want to review our other articles:

What is a Control or Function Block? https://realpars.com/function-block

What is the Difference between Ladder Logic and Function Block Diagrams? https://realpars.com/ladder-logic-vs-...

=============================

Missed our most recent videos? Watch them here:

https://realpars.com/plcnext-engineer/

https://realpars.com/sinking-and-sour...

https://realpars.com/turbine-flow-meter

=============================

To stay up to date with our last videos, make sure to subscribe to this YouTube channel:

http://bit.ly/realpars

=============================

TWEET THIS VIDEO https://ctt.ac/OoWdx

=============================

Follow us on Facebook:   / therealpars  

Follow us on Twitter:   / realpars  

Follow us on LinkedIn   / realpars  

Follow us on Instagram   / realparsdotcom  

#RealPars #PLCprogramming #automationengineer

Комментарии

Информация по комментариям в разработке