LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the speed (RPM) from the Encoder VI

Solved!
Go to solution

Greetings,

 

I have a two motors with quadrature encoders attached to them.

 

I am using the Encoder VI with the myRIO, which outputs two values - Counter value and Counter direction. From the counter value I am trying to display the speed (RPM). All the counter value does is is count up or down depending on the direction; I need a way to use these counts to measure the speed. I can't figure out how to do this?

 

Thank you in advance for your help.

0 Kudos
Message 1 of 10
(6,503 Views)

You should count difference in counter values and divide it to period of measuring.

rpm.png

Message 2 of 10
(6,490 Views)
Solution
Accepted by stanm13

@Artem.SPb wrote:

You should count difference in counter values and divide it to period of measuring.

rpm.png


Not exactly, the result of the count substraction need to be divided by the number of encoder counts/rotation before being divided by dt (expressed in minutes).

 

Ben64

Message 3 of 10
(6,466 Views)

// Not exactly, the result of the count substraction need to be divided by the number of encoder counts/rotation before being divided by dt (expressed in minutes).

 

  This is true. But I hope  stanm13 understands it 🙂
0 Kudos
Message 4 of 10
(6,455 Views)

Thank you very much. I understand now.

0 Kudos
Message 5 of 10
(6,446 Views)

Hi ,

 

You have used subtraction , division blocks . Can you tell me the name of that other block in the image?

 

Thank you !!!

0 Kudos
Message 6 of 10
(5,459 Views)

"feedback node", it's the same as shift register in loops

fb.png

0 Kudos
Message 7 of 10
(5,456 Views)

Thank you!!!

 

If I put those feedback node in a while loop , what should be the value of " dt " ?? 

0 Kudos
Message 8 of 10
(5,421 Views)

The time between reading or time between counter increase

0 Kudos
Message 9 of 10
(5,385 Views)

 

 

I found the execution time for while loop in another post . Can I use this output as 'dt'?

 

Thank you!!

0 Kudos
Message 10 of 10
(5,377 Views)