DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

calculating velocity from an encoder using Dasylab

I trying to calculate velocity of an encoder using dasylab.  I want to use the following fomula: (Xn+1 - Xn)/(Tn+1  - Tn), where X is the sample and T is time.  I'm looking for a way to extract Xn and then Xn+1 continuously. 

 

I am using Dasylab 10 pro with Iotech hardware

 

Any help would be great

 

Thanks

Dan

Message 1 of 5
(7,771 Views)

Hello Dan,

 

Since it looks like you're not using National Instruments hardware I would recommend that you contact Dasylab support directly.  If you are using National Instruments hardware please post back with the device model number.

 

Cheers,

 

Brooks
0 Kudos
Message 2 of 5
(7,751 Views)

Dan,

 

Are you using a counter/frequency card?

 

Coiuld I have the IOTech hardware you are using?

 

Tom

www.insyscorp.com

 

 

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 3 of 5
(7,749 Views)
Tom, I am using the Ioech wavebook with the WBK17 counter input module. Thanks for the help Dan
0 Kudos
Message 4 of 5
(7,744 Views)

Hello,

 

Use an Arithmetic module - One operante-Difference <=> It will give you the result of [ Sample(n+1)-Sample(n) ]

If you want to do it at your own sample rate put a Latch module before.

For time information use a TimeBase module (generate or extract from throw)

You can use also a PWM module to extract the frequency of your encoder

 

The problem if you do this is the sample rate of your application that must be higher (twice) the encoder output frequency max

 

The best is to use a counter input and extract directly the frequency.

 

Good luck!

 

H. Debruyne

0 Kudos
Message 5 of 5
(7,683 Views)