Jun 18, 2018

PLC Programming for Tank Level Measurement using Ultrasonic Sensor

In our earlier post we saw the PLC Logic for Auto filling of Tank using digital inputs for LOW and HIGH Level signals. Today in this post, we will see how we can measure the level of a tank using the Ultrasonic/Capacitive level sensor and accordingly ON/OFF the PUMP at low and high levels.

PLC Programming for Tank Level Measurement using Ultrasonic Sensor

PLC Programming for Tank Level Measurement using Ultrasonic Sensor

First of all, we need to choose the Ultrasonic/Capacitive level sensor according to our tank level height. The sensor will give a 4-20mA signal to PLC and accordingly we will calculate the level in the tank.

PLC Logic Development:-

Now, we need to connect the analog input from the ultrasonic sensor to PLC, we have already told that in our earlier post. You can see here.

After that, we have to write SCL (scaling instruction) in the PLC to covert the value received by PLC to the scale we want. For example, if the height of our tank is 5000cm, PLC will receive the 4-20ma signal and internally will convert it into a range of o to 0FA0 (hexa) and with the help of SCL instruction we will scale this value between 0 to 5000.

So that when the Ultrasonic sensor will give 4mA signal then level in the tank will be zero and when a signal of 20mA will be received then level in the tank will be 5000cm.

In SCL instruction, we have to define the scaling parameters in some D:-

D200 - 0
D201 - 0
D202 -5000 (hexa)
D203- 0FA0 (hexa)

Here the value 0 to 0FA0 received by PLC will be scaled to 0 to 5000 (our tank height).

Now in this PLC Program we have kept the low level at 2500cm and high level at 4600cm. You can download the PLC program from below, we have built the PLC Program using the Omron CX-supervisor software. Both the .cxp and .pdf file are included in.

Download PLC program for Tank Level Measurement.

Hope you like this PLC program on controlling your Tank according to the measurement using an Ultrasonic sensor. If you face any problem with this PLC Program or want any modification then write us in the comment section. Also you can subscribe to receive latest updates about PLC Programming, SCADA tutorials, HMI programming, MODBUS programming, VFD Installation. Subscribe to Automation-Talk by Email.

May 1, 2018

How to Choose your PLC or PLC Choosing Criteria

Choosing a PLC or Controller for your Process is very important as it helps in cost optimization. If you choose a wrong PLC it may happen that you are out of I/O's while programming or maybe you have the excess of I/O's left which are of no use. So it becomes very important that you choose a right PLC for your Automation Process.There are several criteria that help in choosing a PLC. Before knowing the Criteria of choosing a PLC you should know basics of PLC. Subscribe to Automation-Talk by Email.

Below are some points which will help in choosing a PLC but keep in mind that you should know exactly the need of the Customers and should know how many Input and output he wants for present and for future.

PLC are chosen generally on the basis of some requirement of the company or individual person. We should keep in mind the following below point while choosing a PLC.

How to Choose your PLC or PLC Choosing Criteria

Some of the PLC choosing criteria are

1. Number of I/O's:

It is very important that you know the exact number of input and output that are going to be used in the process for best and economical use.

2. Type of I/O's:

The Automation Engineer should also know the type of I/O's whether he needs a digital input like Sensor, Push Buttons etc. or an analog input like RTD, thermocouple etc. The requirement for Output should be also known as what type of Output is required whether you required a digital Output like Relay, Contactor, Lamp etc. or you need an Analog output like Drive and Control Valves.

3. Memory size of PLC:

Choosing PLC memory size is also important as you may be out of space in PLC while writing a PLC program if you choose less memory size PLC.

4. Compact or Modular PLC:

Compact Type PLC are those which has Power supply and controller in the same housing while Modular type PLC has power supply and controller in a different housing. So it is good to choose compact or Modular type PLC according to your requirement.

5. AC or DC PLC:

AC PLC's are those which are operated on 220 V i.e. they require 220 V for running. Whereas DC PLC requires only 24V for Running. So you should know which type of PLC will be good for you according to the Power Supply available in your Control Panel.

6. Sinking and Sourcing PLC:

Making a PLC source at Input or making a PLC sink at input depends upon the requirement of the user so PLC should be chosen in that way. Some PLC may support both Sink and Source at Input and Output Both.

Recommended Article: Understanding Difference Between Source & Sink in PLC's

7. PLC Scan Time:

PLC scan time is a time needed for PLC to completely Scan one cycle of PLC. It may consist of reading PLC input status, clearing PLC memory, Executing the PLC program and updating the Output. The PLC with less Scan time are found to be more Costly.

8. Number and type of Communication ports in PLC:

The number of communication Port or type of communication port is also very important in choosing a PLC. Suppose you want to communicate your PLC in MODBUS but you don't have a MODBUS port so your PLC is of no use. Also, take an example where you want to communicate an HMI with RS232 port but you don't have one. So communication Port should also be in mind while choosing a PLC.

So these were some of the Criteria for Choosing a PLC which should be kept in mind while you buy a PLC. PLC choosing criteria of Allen Bradley, ABB, Siemens, Omron, Mitsubishi, GE Fanuc, Delta, Fuji, GE or any other PLC are same in all cases. Subscribe to Automation-Talk by Email for more Tips and Tutorials.

Apr 3, 2018

Difference Between Absolute and Incremental Encoder

Many new Automation Engineers are in confusion that what is the difference between Absolute and Incremental Encoder while they work on Encoder. And every Automation Engineer has its own View in defining absolute encoder and incremental encoder. First of all, we should know what is an Encoder, What are types of Encoder, what does Encoder do, How to program an absolute encoder or incremental rncoder in a PLC. Now lets, start with knowing what is an Encoder. Subscribe to Automation-Talk by Email.

Omron Encoder

In simple form, Encoder is a device which converts motion into a sequence of digital pulses. The encoder has mainly two configurations i.e. Linear and Rotary. Now Rotary encoder can also be divided into Absolute and Incremental (relative) Encoders.

Absolute Encoder are encoder where a digital word resembles to each rotational position of Shaft.

Incremental Encoder are encoder which produces digital pulses as the shaft rotates, and allow the measurement of relative position of the shaft.

Recommended Article: PLC Programming For Counting Encoder Pulses

What is the Difference Between Absolute and Incremental Encoder

Every people has its own view on Encoders. So here are some differences between Absolute Encoder and Incremental Encoder from the different view of people. Some Engineers simply distinguish Absolute encoder as Parallel and Incremental Encoder as a series Encoder.

Absolute Encoder is a holding encoder i.e. it knows its position even after power failure whereas Incremental encoder cannot retain its position after the power failure and we always need a home position for Incremental Encoder.

Incremental Encoder gives a pulse train indicating units of movement and direction whereas An absolute gives a binary bit signal scaled in bits of resolution for one encoder shaft turn.

Also, Incremental encoder tells how fast it is reaching the position whereas Absolute tell the position where it is.

You can also Subscribe to Automation-Talk by Email. for more tutorials or can request one through your comments.

Mar 23, 2018

Best PLC Ladder Programming Books

If you are new to PLC programming or want to enhance your programming skills, then you really have to work hard. For this you will need good mentor and good books for your help. Today here we will discuss about some of the good PLC Ladder Logic learning book which will help you in your Industrial Automation carrier. Subscribe to Automation-Talk by Email.

Best PLC Ladder Programming Books

1. Programmable Logic Controllers with ControlLogix by Jon Stenerson :

Programming Controllogix Programmable Automation Controllers strength is its breadth and depth of coverage, taking the reader from an overview of the Programmable Logic Controllers through ladder logic, structured text, sequential function chart, and function block programming. Students learn more and more easily because of the practical coverage, numerous examples, and extensive exercises.

According to one of its reader this book is must read for beginner with no ladder logic experience. See more Info

2. Introduction to PLCs, Second Edition by Jay F. Hooper :

This book is oriented to the people that work on and troubleshoot PLCs on the factory floor. It is directed at the actual problems and conditions that will be encountered within a realistic setting. The text is designed to present a clear, concise picture of how PLCs operate to the person that wishes to learn more about them.

This book takes you from the beginning of understanding to the most complex problems helping you understand every step of the way. See more Info

3.Programmable Logic Controllers Textbook with PLC Stimulation Software by Max Rabiee:

Programmable Logic Controllers emphasizes practical use of the PLC in the process and industrial control systems. The textbook begins with the basics of what a PLC is and does, then guides students through the fundamentals of programming the device. Applications, testing procedures, and operational aspects of PLC equipment and systems are discussed. This text covers the most common programmable logic controller functions, providing practical examples based on the widely used Allen-Bradley Small Logic Controller (SLC 500) series of PLCs.

Wiring and programming of a PLC are covered thoroughly, using numerous examples. A supplemental laboratory manual provides a wealth of hands-on activities that will help students practice and hone their PLC programming skills.

It also include a CD-ROM containing LogixPro simulation software with textbook. LogixPro is the ideal tool to facilitate student learning of the fundamentals of RSLogix ladder logic programming. See more Info

Hope you will like these books and if you have any other good suggestions, please comment below.

Mar 6, 2018

Convert Your USB Port in to Many Serial Ports

Nowadays almost all the laptops are not having any serial ports on them. This, in fact, creates a lot of problems for all Automation and electronics engineers as daily we guys have to communicate with external devices over serial communication. Many options are available in the market through which we can convert USB Port on our PC/Laptop to Serial/RS485 port. But we should take utmost care while buying as these converters are not so reliable and can let failure at the site.

Convert Your USB Port in to Many Serial Ports

Convert Your USB Port in to Many Serial RS232/RS422/RS485 Ports

Today in this post we will discuss about the different type of options available to convert existing USB port in to Serial / RS485 port. Many companies have started manufacturing these converters as these are easy to made and are in much demand due to lack of serial port on new laptops. There are devices available in the market for RS232 to RS485 converter. In fact in this world driven by electronic and automation technologies, we can find out everything to convert the signal and protocol format as per our application demand.

One USb, get up to 16 Serial Ports:-

There is one company "ByteRunner" whose USB to RS485 converters are very popular in the market. The company claims to have even 16 serial ports converter. Yes, that is you can have 16 different comms on your laptop just with their device. All the 16 different comms are individually configurable and separate/different settings can be assigned to them.This USB to Serial Adapter is suitable for remote access, retail and industrial applications, data collection and other applications requiring high-speed RS-232 communication ports.

Small USB 16 port Device

Moreover, these devices are capable of Speed of Serial port speed up to 230,400 bps or 921,600 bps depending on the model and provide you with features like Full modem control signals & data signals support. So these devices prove to be boon for every automation engineer where we have to daily deal with serial commiunication devices.

One more company named "Logica" also manufactures USB to RS422/Rs485 converter and it allows to convert an output signal RS232 from a PC or another device into an RS485 or RS422 electrical standard. These devices also have the feature of Automation Transmission and Hardware Transmission which makes these devices a versatile equipment for all your communication needs.

Logica USB to RS422 Converter

Later in coming articles, we will also discuss about the circuit of this Converter and procedure to make it at home. Till then you can subscribe to Automation-Talk by Email to get all latest updates.

Mar 4, 2018

Conzerv Energy Meter EM6436 Modbus Communication and Connection Diagram

Conzerv has a range of EM series Energy meter and there are various different models available for your different need and according to the application. Conzerv Energy meter comes with and without Modbus communication feature, so be sure when selecting Energy Meter according to the application. If you want to communicate it with PLC then make sure that it is MODBUS Enabled.

The EM series Power meters offer complete load management facilities in a compact package. If you like to see more such posts, please subscribe to Automation-Talk by Email.

How to check whether Conzerv Energy meter is MODBUS enabled?

1) First of all, check that terminals 7 and 14 of meter does not have black dot mark, if there is a black dot market on it then it is not MODBUS enabled.

2) Secondly, check that on the front left bottom side RS485 is written and the color of the dot before this, if the color of the dot is white then it is MODBUS enabled and if it is black then it is not MODBUS enabled.

All Conzerv Energy and power meter come with different function keys in the front side for easy set up of the parameters and also some models have TURBO key through which you can directly go to set up mode.

Connection Diagram of Conzerv EM series Energy Meter

NOTE:- Click on the picture for a clear view.

In the above picture, you can see the connection of energy meter. Connect your meter accordingly. The meter has 3 line display and display the parameters sequentially one by one i.e their name and value one by one.

Now the main question is how to communicate Conzerv Energy Meter in MODBUS?

So here is the answer, first of all, make proper hardware connection of MODBUS accordingly that is connect positive of PLC RS485 port with terminal 7 and negative of PLC RS485 port with terminal 14 of Conzerv Energy meter.

Now you have to make PLC program accordingly, generally, in MODBUS we read the parameters like a line to line voltage, frequency, current, power factor etc. Each parameter has its unique address in the energy meter and it has to be read through the query in MODBUS.

Make sure to set the node id, baud rate, parity in yours Conzerv energy meter properly using the setup mode.
You can download the address map of Conzerv Energy meter EM series from here .

Click here to download.

Now the question is How to read data from Conzerv Energy meter in MODBUS using OMRON PLC.

You can review the Omron PLC MODBUS communication from here.

So here is the Data format to read:- 01 03 04 (address - 1) 02

Make sure to subtract 40001 from the address.

Response from energy meter:- 01 03 00 05 0486 9042 4800

Here the value of the parameter in response is 4248, remember that the response of Conzerv Energy meter is always in float, so make sure to convert it accordingly. For example in the above response, the value returned by EM is 4248 in float which is equal to 49.98 in decimal and it is the value of frequency.

So accordingly you can read others parameter too by using the above query format. Hope you like this article and if you do, do not forget to subscribe to Automation-Talk by Email.

Feb 19, 2018

Auto Mains Failure PLC Program using Omron PLC

"Auto Mains Failure System" is Employed for Auto startup of the DG when the mains supply fails. This is a very common system and is the first step in DG synchronization. Here we will see that what is the basic concept in AMF? What hardware is required to set up AMF and how PLC Programming is done.

Auto Mains Failure PLC Program

First of all let us understand what is AMF?

Generally, all the major industries/companies/institution have the DG for power backup, but when main power is cut off, someone has to go to start the DG and this takes time and also a man has to be kept for this purpose. So to eliminate this process PLC panel is installed to Auto start the DG when main power fails. Subscribe to Automation-Talk by Email for more such tutorial.

Working of Auto Mains Failure

When the main power goes, a signal is received to PLC and after 2 minutes DG starts. When the main supply fails signal is received by PLC then after a delay time (can be from 1 to 2 minute), the output for ACB/Contactor of DG is ON and DG starts automatically. Also, the ACB/Contractor of the main transformer if sent OFF command.

When main power comes then the signal is again sent to PLC and PLC off the ACB/Contactor of DG and after 2 seconds it on the ACB/Contactor of the main transformer and after 30 seconds it off the DG. DG is sent OFF command a little late so that the load born by DG for a long time can be compensated by running at no load for some time.

NOTE:- In 'No' condition, the ACB/Contactor of both DG and Main transformer should be ON.

So this is the main concept in DG AMF system.

In a simple system, there are generally 4 inputs and 4 outputs.


1. DG ACB/Contactor close feedback.
2. Transformer ACB/Contactor close feedback.
3. Transformer Voltage Available.
4. DG Voltage Available.


1. DG start.
2. DG Stop
3. DG ACB/Contactor close.
4. Transformer ACB/Contactor close.

For your better understanding below is the sample program. If you have any doubts then just write in comments and we will get back to you. Download the PLC Program for AMF:- Click here to Download.

Hope you like this article, if you do comment below and share it on social media. Hope to see you on next article.

Jan 21, 2018

Mnemonic Names of Commonly used Instructions in PLC

Mnemonic Names of Commonly used Instructions in PLC

In our daily programming of PLC like ABB, Allen Bradley, Omron, etc. we use Mnemonic and some of the very commonly used instructions in PLC are as follows. We know we have missed many of them, so please help us to complete the list by commenting the other mnemonic in the comment section.

Mnemonic Names of Commonly used Instructions in PLC

INSTRUCTION -------------------------------- MNEMONIC NAME

1. Examine if closed --> XIC --| |--

2. Examine If Open --> XIO --|\|--

3. Output Energized --> OTE --(OTE)- -

4. Branch Start --> BST

5. Next Branch --> NXB

6. Output Latch --> OTL --(L)--

7. Output Unlatch --> OUT --(U)--

8. One shot Rising --> OSR

9. Timer On-Delay --> Ton

10. Timer off-Delay --> Toff

11. Retentive Timer --> RTO

12. Count Up --> CTU

13. Count Down --> CTD

14. Reset --> RST --(RST)--

Hope you liked this simple tutorial on "Mnemonic Names". If you do, please show your love by sharing it with other and subscribing to our website.

Get New Updates

Enter your email address:

Delivered by FeedBurner

Receive all updates via Facebook. Just Click the Like Button Below