# How to Detect Speed of Conveyor in PLC?

Hello my friends who are interested in Automation Industry, today we have a simple coding lesson that discusses how to calculate and detect the speed of a conveyor.

Why we need to do that and also how? That is, we are going to speak about.

Why we need such a function?

Maybe the first question that you are asking about is “am I really need such a function” answer is total yes.

Assume that in your plant there are some conveyors or chains that are responsible to carry your products out, that conveyors are controlled by simple AC Induction Motors (have no speed control or we can say no motor drives are used).

The motors are loading and unloading different types of products or packages, the case is “if these conveyors were loaded with an extra number of packages” definitely the motor will be overloaded and the speed of the conveyor would decrease.

Unfortunately, that may negatively affect on this conveyor, and also the motor may be over heated and fails to work and that would definitely be harmful for the whole process.

So, to deal with such a situation we need to have feedback from the conveyor and once the conveyor speed is starting to decrease, we can stop the conveyor and make an alarm to go and check the situation.

## Detect Speed of Conveyor in PLC

We explained the PLC code and its five networks. Please read the below explanation.

Network 1:

Here for the first network as usual it’s a simple Start/Stop network, that detects if the system is turned ON or OFF.

Network 2:

For this part here the two sensors are toggling the “Timer_Counting” bit to set and reset the timer that is responsible for timing the duration that the box needs to go through the two sensors.

Then we are loading the memory of the timer into another location to be processed and to make it understandable also we convert it to a Float number to get an accurate measurement.

As we know the speed = Distance / Time, and we have a fixed distance which is about (2m) and from previous we have calculated the time so know it’s easy to get the speed by this simple equation.

Network 3:

Here we are going to unscale the “Actual speed” value to display it on the LCD screen on the site

Network 4:

Here is the setting of the system alarms, if the speed exceeds 0.9m/s a high-speed alarm will be launched and it will not turn off till the reset button is pressed.

The same for the low-speed alarm if the speed decreased below 0.35m/s

Network 5:

Here is the scaling and transmitting of the signal from the variable potentiometer to the output that controls the conveyor speed.

Download PLC Program: Conveyor Speed Calculation using PLC

## Simulation of the PLC Code

Here we can simulate our PLC code using the Factory I/O software program:

Watch the below video where we simulated the above-discussed PLC program with a 3D simulation environment.

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