# Incremental Encoder

## Recommended Posts

I am using a V430-J-TR34 and an incremental encoder to measure, cut, and monitor continuous pipe coming from a pipe mill. The mill puts out a continuous length of pipe at about 100 feet per minute. I have a couple of problems or questions with it. 1 want a keypad entry on the display so I can enter the distance for the pipe to be cut, I have that setup okay but I am having trouble with the inches. I have  an entry of feet and one for inches. With the feet I am linking it with a MI and multiplying it by 2000 which is the pulses per ft. With the inches the pulse is 166.66667 per inch but I can't enter a decimal in the multiplication function the closes I can get is 166 pulses.

When I reset after the cut is made my encoder value goes to 0  which is good but I want to measure the total feet of pipe that is ran through this mill, to do this do I add a store and input the encoder value and then divide the stored value?

I also want to measure Feet Per Minute.

Is there an example out there that already has this done?

##### Share on other sites

• MVP 2023

Are you really worried about a difference of 6 thou of an inch  in length?  That's what the length maths works out to when you work in inches.  Do 2 separate inputs on your HMI for feet and inches, do the maths directly on the feet one, and run the inches through a linearization that will do the maths and rounding automatically for you.  Then add the two together for your working count.

For your total count simply add the pulse count to something like an ML instantly before it resets.  When you get near to filling that ML, you do your division to find the number of feet, add this to another "total feet ML", reset your total pulse count and start again.   To read this directly is simply adding the 2 together with appropriate maths.

Measuring ft/min is dependent on whether you want it instantaneous or average.  Vastly different so won't go into that yet.

cheers, Aus

##### Share on other sites

• 2 weeks later...

As far as the feet and inches that is no longer a problem. I had the program set up as you suggested but the inches did not work out, but when I ordered my new encoder it reads 300 pulses per revolution and with a 6" wheel that is 600 per foot and that works out to 50 pulses per inch.  And I can take care of resetting by taking my length a pulse before the reset as you suggested.

Now the feet per minute, it can be an average once the machine is up to speed the feet per min will be very constant.

Can I use the High Speed Input and the second line of the AB Shaft Encoder, Frequency Measurement to get a FPM?

##### Share on other sites

• MVP 2023
2 hours ago, Mark A said:

Can I use the High Speed Input and the second line of the AB Shaft Encoder, Frequency Measurement to get a FPM?

Yes - that is an easy way.  It looks like you've already done the basic math on how the frequency will scale to your feed rate.

Joe T.

##### Share on other sites

I am not sure what function to use to convert the frequency to FPM. Is there a simple way to do this either in the HMI or the Ladder?

##### Share on other sites

• MVP 2023

Do it with individual math blocks in the logic.  Or you can cram it all into a formula block.    When I'm first working out an equation I prefer the individual blocks all with separate MIs so I can see the results of each calculation.

You've already worked out 50 pulses / inch, so one pulse = 0.02 inch.  The frequency value in the MI is in units of pulses / sec.

So....

f (pulse/sec) * 0.02 inch / pulse * 1 ft / 12 inch * 60 sec / min = feet / min.

I'm not going to spell it out any further in this post - your exercise now is to try to program the above formula and post your code.  Or try something that doesn't work right and post that code.

This is how we learn.

Joe T.

## Create an account

Register a new account

×