# PLC Functional Block Diagram for Logic Gates

A Functional Block Diagram or FBD is a graphical representation of process flow using simple interconnecting blocks. It is similar to the Ladder Logic diagram except the function block replaces the interconnection of contacts and the coils.

In addition to this, Functional Block Diagram has any rung or rail. A functional Block diagram circuit is an analog to an electrical circuit where links and wires represent signal paths between the components.

These Functional Block diagrams are a graphical representation of executable code. A functional block can take one or more inputs and make decisions and generate two or more outputs.

There are many different types of Functional Blocks included in the programming software to perform various common tasks.

## Functional Block Diagram for Logic Gates

Like all digital equipment, PLC also operates on the binary principle. The term binary represents that it has only two states. These states are â€˜0â€™ and â€˜1â€™, in this â€˜0â€™ represents the OFF state or False or Low condition, and â€˜1â€™ represents the ON state or True or High condition.

A Logic Gate is a circuit with several inputs but only one output is activated by particular combinations of input conditions. The two-state binary conditions were applied to the gates for making decisions for providing the output.

## Logic Gates

Here we will discuss the following logic gates design in the functional block diagram language of a PLC.

• AND GATE
• OR GATE
• NOT GATE
• NAND GATE
• NOR GATE
• X-OR GATE
• X-NOR GATE

## AND Gate

An AND GATE has two or more inputs but it has only one output. The Output assumes the logic â€˜1â€™ state, only when every one of its inputs is at the logic â€˜1â€™ state.Â  The output assumes the logic â€˜0â€™ state even if one of its inputs is at the logic â€˜0â€™ state.

The AND GATE is therefore defined as a device whose output is â€˜1â€™, if and only if all its inputs are â€˜1â€™. Hence this AND GATE is also called an all-or-nothing gate.

The logic symbol, Truth Table, and Functional Block Diagram of AND GATE are shown below. In this, we want to note that the output is â€˜1â€™ only when all the inputs were â€˜1â€™.

## OR Gate

Like an AND GATE, an OR GATE may have two or more inputs but it has only one input. The output assumes the logic â€˜1â€™ state, even if one of its inputs is in the logic â€˜1â€™ state. Its output assumes the logic â€˜0â€™ state, only when each one of its inputs is in the logic â€˜0â€™ state.

An OR GATE may therefore be defined as a device whose output is â€˜1â€™, even if one of its inputs is â€˜1â€™. Hence an OR GATE is also called any or all gate. Â

The logic symbol, Truth Table, and Functional Block Diagram of OR GATE are shown below. In this, we want to note that the output is â€˜1â€™ even if one of the inputs was â€˜1â€™.

## NOT Gate

A NOT GATE also called an inverter, has only one input and of course, it has only one output.

In NOT GATE its output always complements its input. That is, the output of a NOT GATE assumes the logic state â€˜1â€™ when its input is in logic state â€˜0â€™ and assumes the logic state â€˜0â€™ when its input is in logic state â€˜1â€™.

The logic symbol, Truth Table, and Functional Block Diagram are shown below figures respectively.

## NAND Gate

NAND means a combination of NOT GATE & AND GATE, this means the output of the AND GATE is inverted.

So, NAND GATE is a mix of NOT GATE & AND GATE. In fact, NAND is the contraction of the word NOT-AND. In this NAND, the output is a logic â€˜0â€™ level only when each of the inputs assumes a logic â€˜1â€™ level.

For any other combinations of inputs, the output is a logic â€˜1â€™ level. Below given diagrams represents the Logical Symbol, Truth Table, and Functional Block diagram of NAND GATE.

## NOR Gate

NOR GATE means a mix of NOT & OR, that is the output of the OR GATE is inverted. So, a NOR GATE is a combination of NOT and OR GATE.

The NOR is simply a contraction of the word NOT-OR. The output of NOR GATE is at logic â€˜1â€™ level only when all the inputs are at logic â€™0â€™ level and in other combinations, the output of NOR GATE is always at logic â€˜0â€™ level only.

This NOR gate has two or more inputs but it has only one output.

## XOR Gate

An X-OR GATE is a two-input and one-output logic circuit, whose output assumes a logic â€˜1â€™ state when one and only one of its two inputs assumes a logicâ€™1â€™ state.

Under the conditions when both the inputs assume the logic â€˜0â€™ state or when both the inputs assume the logic â€˜1â€™ state then the output assumes a logic â€˜0â€™ state.

As X-OR GATE produces an output â€˜1â€™ only when the inputs are not equal, it is called an anti-coincidence gate or inequality detector. The output of an X-OR GATE is a modulo sum of its two inputs.

The name Exclusive-OR (X-OR) is derived from the fact that its output is a â€˜1â€™ only when exclusively one of its inputs is a â€˜1â€™. In this X-OR GATE, three or more input variables do not exist.

## XNOR Logic Gate

An X-NOR GATE is a combination of X-NOR GATE and NOT GATE. The X-NOR gate is a two-input and one-input logic circuit. In this output assumes a â€˜1â€™ state only when both the inputs assume a â€˜0â€™ state or when both the inputs assume a â€˜1â€™ state.

The output assumes a â€˜0â€™ state when one of the inputs assumes a â€˜0â€™ state and the other input assume a â€˜1â€™ input. It is also called a coincidence gate because its output is 1 only when its input coincides.

EXNOR can be used as an equality detector because its output is â€˜1â€™ only when its inputs are equal. Three or more variables in X-NOR do not exist, it will function for two inputs only.