LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO Optical Encoder express VI Angular position and speed.

Hi, I am a systems engineer student and I would like some help on acquiring angular position or shaft postion from an encoder connected via myRIO. From using the Encoder express VI, I am able to get the counter values and counter direction. Is it just maths that I need to be able to calculate the shaft position? The encoder I have has 1024 cycles per revolution (CPR).

 

I have searched how to do this, but can only find how to do it with a DAQ assistants, which has the option to measure linear or angular postions. Does myRIO have similar express VIs to this?

 

encoder question.png

0 Kudos
Message 1 of 3
(4,036 Views)

Hi there,

 

Having a quick think about this, to me using this could work - 

 

Feed counter value into the quotient remainder function, then take the remainder and feed that into the below equation.

 

Counter Value => Quotient Remainder function  => (Remainder/1024) * 360  = position in degrees. 

 

What are youur thoughts on this?

 

Scott

0 Kudos
Message 2 of 3
(3,938 Views)

Thanks. How about the speed calculation by the counter value in this case?

Regards,

Rui

0 Kudos
Message 3 of 3
(3,357 Views)