PLC Programming Examples | Basic of Bit Logic Instructions

Programmable Logic Controller (PLC) is used to control the industrial process according to the user program or logic. This user program or logic can be prepared by the instructions that are given in the programming software and often known as PLC Program.

I hope you will get it after reading this blog What is PLC programming? How to learn about PLC programming? and PLC Programming examples.

There are many types of instructions like Bit logic instructions, Comparator instructions, Converter instructions, Timer and Counter instructions, Mathematical instructions, Call instructions and many more.


Bit Logic Instructions

In this blog, we will see the bit logic instructions and PLC programming examples using these instructions. These are very basic but very important instructions, almost all the user uses these instructions. This is the list of Bit logic instructions:

  • Normally Open
  • Normally Close
  • NOT logic
  • Coil
  • Set Coil
  • Reset Coil
  • Negative Edge
  • Positive Edge

Normally Open

This instruction works like a normally open contact, when there is no signal at the input it will not allow the power to flow further in the rung.

You can see in the animation that when the operator pressed the switch(pushbutton), it will activate this contact and power will flow through it.

PLC Programming Examples
Normally Open Contact

Normally Close

This instruction works exactly opposite to the normally open contact, when there is a signal it will not allow the power to flow through it.

As shown in the animation that when the operator pressed the switch(pushbutton), it will block the power to flow through it.

PLC Programming Examples
Normally Close Contact

Coil

The coil is an output instruction; the user program monitors the status of the input. According to the program when the output coil is energizing in the program, it will activate the physical output and the connected load is activated after that.

In the animation when the output QN0 energizes in the program it will activate the physical output QN0 which activates the 24V DC relay coil connected with it.

PLC Programming Examples
Coil Instruction

Not

This instruction works like NOT gate, when the input of this instruction is “0” then it will give the output “1” and when the input of the NOT is “1” it will give the output “0”.

Like as shown in the animation when the input switch above the NOT is not pressed then it activates the output coil and when the input switch above the NOT is pressed then it de-activated the output coil.

PLC Programming Examples
NOT Instruction

Set Coil

This instruction has an inbuilt latching function, when we activate the set coil once by giving power or by pressing the switch it will activate the output. The output coil will remain active even after releasing the switch.

Reset Coil

This instruction is used to deactivate the output coil. When we give power to this instruction it will de-activate the output coil.

PLC Programming Examples
Set and Reset Coil Instructions

Positive Edge

This is the instruction used to detect the positive edge or signal change stat of “0” to “1”. When it detects a change in the input signal from “0” to “1”, it will allow the power to flow only that much of the time that signal is changing its stat from “0” to “1”. After that, it will stop the power to flow.

Negative Edge

This instruction detects the change in the signal stat from “1” to “0”. It will allow the power to flow when it detects a negative change in the input signal like “1” to “0” and allow the power only this much of time. After that, it will stop the power to flow.


Basic PLC Programming Examples

These are some basic plc programming examples with the use of these bit logic instructions. These plc programming examples may be helpful to understand the basic bit logic instructions operation.

1. Simple Motor Starter

Inputs – Start, Stop

Output – Contactor

PLC Programming Examples
Simple Motor Starter with Start, Stop Pushbuttons and Output Coil

In this starter, we are using two pushbuttons, Start and Stop, and a contactor. By pressing the start button once will activate the output coil which will activate the contactor. By pressing the stop button it will de-activate the output coil.

2. Two-way Lamp Start

Inputs – Button1, Button2

Output – Lamp

PLC Programming Examples
Two-Way Lamp Starter

This is the two-way lamp start logic, the lamp will start from either button1 or button2. Both buttons are toggle switch or piano type switch.

3. Start/Stop lamp with single push button

Input – Push button

Output – Lamp

PLC Programming Examples
Single Pushbutton ON/OFF Control

This is the logic of one single pushbutton ON/OFF logic exactly how TV remote or any other electronics equipment remote power button works.

Pressing the button once will activate the output coil and pressing the button again will deactivate the output coil.

Here I am using positive edge detection to detect the positive signal change of the input pushbutton and set the coil/reset coil to activate or deactivate the output coil.


Final Thoughts

This is all about the basic bit logic instructions and PLC programming examples.

If you would like to know about how to learn PLC programming thoroughly, you must attempt the future blogs in which I am going to work on the complete set of example programs. If you want any further guidance then please comment down below.


Must-Read PLC Articles (Free PLC Tutorials):

What is PLC? How does it work?

Sinking and Sourcing Circuits.

Logic Gates using PLC Ladder logic.

5 different types of PLC programming languages.

Electrical motor starter with a PLC program.

20+ Arithmetic instructions in PLC Programming.

Basics of PLC Timer instructions.

Types of PLC Counter in PLC Programming.

Different Types of Siemens PLC Programming blocks.

30+ Most useful PLC Communication Protocols.

Converter instructions in PLC Programming.

Analog Scaling and Unscaling in PLC Programming.

Difference between FC and FB in Siemens PLC.

What is memory in Siemens PLC?

Top PLC Manufacturers: PLC Brands and Ranking.

Share this blog,

2 thoughts on “PLC Programming Examples | Basic of Bit Logic Instructions”

Leave a Comment