PLC Tutorials

Allen Bradley Bitwise Logical Operations

To study the working of Allen Bradley Bitwise logical operations like AND, OR, NOT, XOR in Programmable logic Controllers (PLC).

Bitwise Logical Operations

Block Name: Bitwise AND

In the above picture, there are totally three parameters,

SOURCE A – Address of First Binary Value

SOURCE B – Address of Second Binary Value

DESTINATION –AND operation result of Source A & B stored in this address

Block Name: Bitwise OR

In the above picture, there are totally three parameters,

SOURCE A –Address of First Binary Value

SOURCE B –Address of Second Binary Value

DESTINATION –OR operation result of Source A & B stored in this address

Block Name: Bitwise XOR

In the above picture, there are totally three parameters,

SOURCE A –Address of First Binary Value

SOURCE B –Address of Second Binary Value

DESTINATION –XOR operation result of Source A & B stored in this address

Block Name: Bitwise NOT

In the above picture, there are totally two  parameters,

SOURCE -Address of Binary Value

DESTINATION –NOT operation result of Source stored in this address

PLC LADDER EXAMPLE

CASE 1:

When,

Source A : 0000 0000 0000 0000 (AND,OR & XOR)

Source B : 0000 0000 0000 0000 (AND,OR & XOR)

Source  : 0000 0000 0000 0000 (NOT)

Rung 0000:

All Bitwise operator block are connected in parallel with input condition I: 0/0. When it goes ON, each block performs its operation. Since Source addresses are having zeros except NOT block remaining blocks are resulting 0s.

BITWISE Operation of AND, OR, XOR, NOT:

AND Logic:

Source A : 0000 0000 0000 0000   (B3:0)

Source B : 0000 0000 0000 0000   (B3:1)

Destination : 0000 0000 0000 0000   (B3:2)

OR Logic :

Source A : 0000 0000 0000 0000   (B3:0)

Source B : 0000 0000 0000 0000   (B3:1)

Destination : 0000 0000 0000 0000   (B3:3)

XOR Logic :

Source A : 0000 0000 0000 0000   (B3:0)

Source B : 0000 0000 0000 0000   (B3:1)

Destination : 0000 0000 0000 0000   (B3:4)

NOT Logic :

Source: 0000 0000 0000 0000   (B3:0)

Destination : 1111 1111 1111 1111  (B3:5)

DATA FILE FOR CASE 1:

CASE 2:

When,

Source A : 0010  0101 0100 0001   (AND,OR & XOR)

Source B : 0001 0001 0001  0001  (AND,OR & XOR)

Source  :0101 0100 1000 0111 (NOT)

Rung 0000:

I:0/0 giving input condition to all Bitwise Blocks. When it goes ON, value placed in Source A and Source B performs respective operation depends on blocks.

BITWISE Operation of AND, OR, XOR, NOT:

AND logic:

Source A : 0010  0101 0100 0001   (B3:0)

Source B : 0001 0001 0001  0001  (B3:1)

Destination : 0000 0001 0000 0001  (B3:2)

OR Logic:

Source A : 0010  0101 0100 0001   (B3:0)

Source B : 0001 0001 0001  0001  (B3:1)

Destination : 0011 0101 0101 0001  (B3:3)

XOR Logic:

Source A : 0010  0101 0100 0001   (B3:0)

Source B : 0001 0001 0001  0001  (B3:1)

Destination : 0011 0100 0101 0000  (B3:4)

NOT Logic:

Source: 0101 0100 1000 0111 (B3:0)

Destination : 1010 1011 0111 1000  (B3:5)

DATA FILE FOR CASE 2:

Conclusion:

We can use this explanation to understand the working of Bitwise logical operation like AND, OR, NOT, XOR in Allen Bradley Programmable logic Controllers (PLC).

Author : Hema Sundaresan

If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

How to use Converters in PLC

Ladder Logic using Toggle Switch

Basics of Interlocking in PLC

PLC Configuration Systems

Boolean Algebra using PLC

You've successfully subscribed !
Share

Recent Articles

  • PLC Tutorials

Example of Flip-Flop PLC Program for Lamps Application

Learn the example of flip-flop PLC program for lamps application using the ladder logic to…

4 days ago
  • PLC Tutorials

STAR DELTA Programming using PLC Controller

In this article, you will learn the STAR DELTA programming using PLC controller to start…

4 days ago
  • Instrumentation Design

Single and Three Phase Immersion Electrical Heaters Wiring Circuits

Lube oil consoles of rotary equipment packages in industrial process plants are usually equipped with…

2 days ago
  • Instrumentation Design

Immersion Heaters in Lube Oil Consoles

Rotating equipment packages such as pumps, compressors, turbines need the lube oil consoles for their…

4 days ago
  • PLC Tutorials

How to Blink Lights in Ladder Logic?

This article explains how to blink lights in ladder logic with a detailed explanation video…

4 weeks ago
  • PLC Tutorials

From Boolean Algebra to PLC Logic

In this article, a simple example will teach you the conversion from Boolean algebra to…

1 month ago