# Encoder and number of revolutions

5 years 10 months ago #29530422
by maha

*Encoder and number of revolutions*was created by

*maha*

hello,

if I have a Roboteq SDC21xx.

and I set the Encoder configuration to the following:

setconfig(_EPPR, 1, 200)

which change the configuration to make the motor produce 200 pulses per revolution.

Now, I want to have how much the motor traveled exactly.

what i will do is the following:

getvalue(_ABCNTR, 1)

if the number coming from the above line is 800 for example.

then what i will do is, i will divide it by 4 because (1 pulse = 4 counts).

so it'll be 200. Now this is the number of pulses (200).

I should divide the number of pulses (200) by 200 in order to get the number of revolutions right?

because i set it to 200 PPR.

am i correct? please correct me.

if i set it to 100 PPR then i should divide it by 100 and so on, in order to get the exact number of revolutions of the motor shaft????

thank u

Note** just to make my question clear.. is this the right way to know how many revolutions did the motor do.. and the PPR thing is it correct or not?

if I have a Roboteq SDC21xx.

and I set the Encoder configuration to the following:

setconfig(_EPPR, 1, 200)

which change the configuration to make the motor produce 200 pulses per revolution.

Now, I want to have how much the motor traveled exactly.

what i will do is the following:

getvalue(_ABCNTR, 1)

if the number coming from the above line is 800 for example.

then what i will do is, i will divide it by 4 because (1 pulse = 4 counts).

so it'll be 200. Now this is the number of pulses (200).

I should divide the number of pulses (200) by 200 in order to get the number of revolutions right?

because i set it to 200 PPR.

am i correct? please correct me.

if i set it to 100 PPR then i should divide it by 100 and so on, in order to get the exact number of revolutions of the motor shaft????

thank u

Note** just to make my question clear.. is this the right way to know how many revolutions did the motor do.. and the PPR thing is it correct or not?

Please Log in or Create an account to join the conversation.

5 years 10 months ago - 5 years 10 months ago #29530423
by TechSupport

Replied by

*TechSupport*on topic*Encoder and number of revolutions*
As stated, the number of counts made in 1 full revolution turn divided by 4, will give you the pulses used.

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530424
by maha

Replied by

*maha*on topic*Encoder and number of revolutions*
so if i divided the number of counts by 4 and got the pulses used.

how should i get the number of revolutions from the pulses?

how should i get the number of revolutions from the pulses?

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530427
by TechSupport

Replied by

*TechSupport*on topic*Encoder and number of revolutions*
1 Full revolution is the actual count. So if 1 full revolution is say 24 counts, then every 24 counts, is 1 revolution.

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530428
by maha

Replied by

*maha*on topic*Encoder and number of revolutions*
how should i know how many counts in one revolution i dont get what u r saying

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530429
by maha

Replied by

*maha*on topic*Encoder and number of revolutions*
should i make one revolution and see how much counts i got? if this true then each time i'll get different count depending on how much speed i provided to the motors. right?

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530430
by TechSupport

Replied by

*TechSupport*on topic*Encoder and number of revolutions*
Go to the "run" tab.

Set up a channel in the bottom right area and select counter 1 or enc counter 1. This will read back the absolute encoder value. If power up for first time, this value will be 0.

If the encoder value is currently 0 and the motor is not moving, then it stays at 0 and you have a reference point of the motor shaft (Either memorize the location of the shaft or mark it on the motor). If you manually rotate the shaft of the motor 1 full turn 360 degrees in either direction, it will give you a count.

So if you do 1 full 360 degree rotation of the shaft and wind up with say 24 counts, then that means 24 counts(1 pulse - 4 counts; therefore 24/4) or 6 pulse are used to make 1 full turn on the motor shaft.

So if you spin the motor for a while and get 24000 counts in your absolute encoder count value, then you divide that by 24(24 counts = 1 full turn), then this means that the motor has made 1000 revolutions or 6000 pulses.

Set up a channel in the bottom right area and select counter 1 or enc counter 1. This will read back the absolute encoder value. If power up for first time, this value will be 0.

If the encoder value is currently 0 and the motor is not moving, then it stays at 0 and you have a reference point of the motor shaft (Either memorize the location of the shaft or mark it on the motor). If you manually rotate the shaft of the motor 1 full turn 360 degrees in either direction, it will give you a count.

So if you do 1 full 360 degree rotation of the shaft and wind up with say 24 counts, then that means 24 counts(1 pulse - 4 counts; therefore 24/4) or 6 pulse are used to make 1 full turn on the motor shaft.

So if you spin the motor for a while and get 24000 counts in your absolute encoder count value, then you divide that by 24(24 counts = 1 full turn), then this means that the motor has made 1000 revolutions or 6000 pulses.

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530431
by maha

Replied by

*maha*on topic*Encoder and number of revolutions*
but are you sure that no matter how fast i rotated the shaft.. the value will always be the same?

if i tried it twice and in each time i spin the shaft with a different speed manually. will always get the same number of count? if i of course reset it to zero in the second time.

if i tried it twice and in each time i spin the shaft with a different speed manually. will always get the same number of count? if i of course reset it to zero in the second time.

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530432
by TechSupport

Replied by

*TechSupport*on topic*Encoder and number of revolutions*
If you spin the shaft manually by hand you get a different number every time, then you're doing something wrong. Speed should make no difference if you are making the exact full 1 turn rotation.

Please Log in or Create an account to join the conversation.

5 years 10 months ago #29530433
by maha

Replied by

*maha*on topic*Encoder and number of revolutions*
ok one more thing.. does the PPR configuration has anything to do with all of that?

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni

Time to create page: 0.109 seconds