From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO - get velocity (RPM) and acceleration from quadrature encoder

Hello,

 

I need some ideas to get from a quadrature encoder the velocity and acceleration.

At the moment I try to get this with the Express VI "Encoder" form myRIO-modul.

 

I attached the data of the encoder TR-Electronics IMV36.

 

I would be very happy about tips.

 

-Masterchief-

0 Kudos
Message 1 of 8
(9,667 Views)

Hi Masterchief,

 

I'm not sure if I understand your problem correctly.

If you want to calculate the velocity or acceleration you simply need to calculate the derivation with respect to the time.

For velocity you need the angular difference of two consecutive encoder values which you have to divide with the time interval.

For the acceleration you need the velocity difference which you have to divide with the time interval.

You can't do that with the express VI "Encoder" but it should be very simple to implement.

 

Regards

Christian

Christian
CLA, CTA, CLED
0 Kudos
Message 2 of 8
(9,636 Views)

Hey MasterChief,

 

If you want linear velocity you'll need to know the diameter of the wheel you're using and the QE counts per revolution.  From that you can calculate the linear displacement per encoder count.  Then you can use that to calulate the velocity (displacement / time) and integrate that to get acceleration.

 

Let us know if that helps or if you have more questions on how to implement this.

 

Thanks!

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 3 of 8
(9,605 Views)

Hi Community,

I've a few questions
regarding to myRIO und Encoder. In the standard project are already Encoder implemented in the FPGA Code

But there are a few question's that i dont get at all. The First and main question is, how do i connect that encoder to my myRIO
?

I've those two Channels ( A+/A-/B+/B-) for the position's, those will be connected to one encoder?

In my interface C, there are two encoder implemented. ENC0.A, ENC1.B / ENC1.A, ENC0.B.

Do i have to connect those to positive wire's to a Encoder (Channel A+ = ENC0.A / Channel B+ = ENC1.B) and both negative wire's tho the digital ground?

Or do I need both encoder's on th e Interface c to connect one sensor?

The second one i've a bit problem to understand is ho to calculate the rpm. When i use those Encoders i get on the Express vi the Counter Ticks. How do I get the rpm? What I've found is: http://www.ni.com/white-paper/3921/en/

 

Do i need to implement Figure 8 in my FPGA Code to get the RPM out?

 

Im confused and need your help, thanks in advance!!!

 

Best Regards

 

Connector C.pngSensor.png

0 Kudos
Message 4 of 8
(9,494 Views)

Hey MasterMichael,

 

it's easy!

Connect your Channel A to ENC0.A and your Channel B to ENC0.B! This means your Encoder Input is Port C and Encoder Number zero.

AND ATTANTION!!! The GND of your Encoder must be connected to myRIO and your external power supply.

 

The RPM:

 

This is easy, too! See attached 😉

BUT! It's not ready jet!...if you have some better code...please post it here! THANKS

 

Robin

Message 5 of 8
(9,489 Views)

Thanks alot for your fast reply :)!!!

 

That means i got it right, that i can connect 2 Encoders on port C? And about the Ground, i use the standart power supply, so i use the digital ground (port 19) on interface C and connect those 4 negative wires onto it?

 

thats all? => I gues i should have stopped yesterday erlier. Somehow I were always searching the point of my mistake 😞

 

thanks too for your inout about rpm.. its somehow hard to mee that the solution is really that easy... Thanks a lot 🙂 !!

0 Kudos
Message 6 of 8
(9,485 Views)

Hey,

yes you can connect 2 encoders! But you can connect more if you modify the FPGA on myRIO.

 

You connect the GND of your encoder to the GND of myRIO.

And the 5V of myRIO to your encoder (if your encoder needs a external power?! - my encoder a TR-electronic IOV58 needs this (11-28V).

 

😉 yes...but maybe the timing is not the rigth! i have to validate this code in the next weeks! but for the first, it works fine 😉

0 Kudos
Message 7 of 8
(9,482 Views)
hello
I 'm entering a signal by the encoder , my question is how can I know the frequency of the signal input , appreciate any help you

 

0 Kudos
Message 8 of 8
(8,122 Views)