# Distance in milimeter from Encoder pulses

## 13 posts in this topic

Hi everyone! I need to calculate the distance in millimeter by using encoder pulses. Basically I need to give the signal from PLC to stepper motor at the desired length to cut the paper.  Following is the information

Encoder= 1000 PPR

Encoder shaft diameter= 80mm

Edited by Areeb

##### Share on other sites

Ok that's your encoder diameter, But you will need the distance traveled by the system per revolution of the encoder.

1 person likes this

##### Share on other sites

It's easy: Just setup an interrupt in your selected PLC (which you haven't specified either) on xx number of pulses, and setup the equation that equals that number of pulses... Reset your counter whenever you want to reset the traveled distance...

1 person likes this

##### Share on other sites

@Gambit Yes I need to calculate the distance traveled by encoder, actually I used 1000 PPR encoder so wanted to used its pulses to calculate the distance so that I can give the signal to my motor at the desired length.

##### Share on other sites

@kaare_t U are absolutely right but I need the distance (mm) also to give the signal to my motor so that It can cut the paper at exact desired length. All I need to know is the distance in millimeter so that one can easily set the distance by using HMI.

##### Share on other sites

I can explain my problem in this way. Suppose there is paper whose length is 300 mm and I need to label the tag  in the middle of the paper say 150 mm after every 1 rotation (360*/ 1000PPR) of the encoder. so here I need the distacne in millimeter from encoder to give the signal to my motor for label the tag.

##### Share on other sites

So, is it rotary cutter or labeling application?

What is the  needed accuracy?

Give us some hardware info like PLC, registration type...

Edited by glavanov

##### Share on other sites

Yes it is cutting and labeling machine. needed accuracy ?

Edited by Areeb

##### Share on other sites

I only need the strategy for calculating the distance through pulses PLC is mitsubishi FX 3U and I have Delta DVP ES2 for testing.

##### Share on other sites

first determine correct ratio or scale factor:

reset position
move whatever your encoder is tracking certain distance (257mm for example)
look at the encoder value (5103514 counts for example).
then divide the two values to get travel in pulses per mm (19858.03112840)

now that you have scale factor, divide whatever encoder pulses are by that factor and you will get traveled distance in millimeters.

3 people like this

##### Share on other sites

Thanks Everyone, @panic mode I thing Your suggestion is really helpful for me. Thanks !

##### Share on other sites

Thank you @panic mode, it helped me a lot too

##### Share on other sites

very good. btw thanks for the feedback. i recall almost not posting it because i though anyone would get it if they just though about it...

but then, we all have moments when exhaustion clouds judgement so i decided to post it anyway. glad it helped.