Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

encoder position to velocity

I am a beginner DAQ user and am trying to use a PCI-6110S to measure the velocity of rotation of a quadrature encoder. i am able to monitor the position change, but do not know what time component i can use to convert the position to velocity and acceleration. pls advise.
0 Kudos
Message 1 of 8
(7,241 Views)
I would suggest using the buffered postion measurment. This allows you to use your other counter or an external device to generate a known pulse train and wire it to the gate of the counter that you are using for the postion measurment. The count will be sampled on every rising edge of the gate. In LabVIEW you can take these values and use the Derivative x(t).vi to calculate the velocity. Use it a second time on the velocity to calculate the acceleration. Make sure you wire the speed of your gate signal into the dt. The reason this works is because you are sampling at a fixed rate and the sampling rate does not depend on the software loop time.

I hope this helps out.

Joshua
0 Kudos
Message 2 of 8
(7,241 Views)

Hello, i think my problem is same too.. but i use another methid to measure position..

 

i use Count Edges to measure Pulses and i convert this into Degree..

 

But i've a problem too with convert the degree or position to velocity(rpm)

 

Can i just wire this value(degree) by using Derivative.vi? and i hope i get velocity as soon as possible..

 

and How to get this value(rpm) precisely?

 

Thank before...

 

Any answer would be appreciated..

 

Best Regards,

 

Ariawan

 

0 Kudos
Message 3 of 8
(6,526 Views)

If you are able to measure the postion in degrees, you will be able to use the same method as above.  Use a known gate signal, as mentioned, to generate a constant time interval for your derivation.  You will plug the known period of your gated signal into the dt input terminal, and plug your angular postion signal into the X input terminal of the derivative x(t).vi.  The conversion to RPMs can be found by dividing your position in degrees by 360 degrees to represent this value as a revolution.

 

ie: 90 deg = 90deg/(360deg/rev) =  0.25 rev

 

Best

AdamF

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 4 of 8
(6,519 Views)

I don't exactly know about generate constant time..

 

I just using optocoupler sensor..and my output sensor just two is TTL signal(1 and 0) and ground..And i connect it to Ctr0 in my USB 6251 DAQ..

 

i've measured Edge Count and calculate this into degree..

 

but what i confuse is to get fixed time interval..(as u said that we have to generate constant time by other counter..?how can?? i don't have any Gate signal..or Z index..

 

so how easily can i measure rpm with my simple device like that??

 

I hope u can give the answer...and be appreciate of this..

 

 

Best Regards,

 

Ariawan

0 Kudos
Message 5 of 8
(6,509 Views)
It looks like you are posting this issue in two places.  Please continue on this thread: http://forums.ni.com/ni/board/message?board.id=40&message.id=8138&requireLogin=False
0 Kudos
Message 6 of 8
(6,503 Views)

 

Hi ALL,,

 

i've seen the link that u give to me..

 

As my picture below..

I've gotten a position value in single sample..

 

When i use your advice(it's a N sample method that is formed in array and of course it uses sample clock method by ither counter)

 

So how can i easily develop RPM(velocity) value by its position? and even i get fixed time interval i can't..

 

 

~my optocoupler just has 2 output:

 

TTL signal and ground 

 

Any comment would be appreciated..Thank

 

Ariawan. 

 

 

buat ni.jpg

 

0 Kudos
Message 7 of 8
(6,469 Views)

Hi ariawan,

 

I have posted a new response to your question here.  In the future we would appreciate it if you refrain from opening multiple threads for the same issue (it is difficult for people to tell which questions have/haven't been answered and difficult for others to follow along in general).  If you have any follow up questions about this issue please don't hesitate to post back to the other thread.  Thanks and welcome to the NI forums!

 

 

Best Regards,

John Passiak
0 Kudos
Message 8 of 8
(6,444 Views)