01-16-2009 08:25 AM
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
01-19-2009 05:50 PM
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,
01-19-2009 06:47 PM
Dan,
Are you using a counter/frequency card?
Coiuld I have the IOTech hardware you are using?
Tom
www.insyscorp.com
01-20-2009 06:14 AM
01-27-2009 12:19 PM
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