LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate velocity!

Solved!
Go to solution

Hi all,

I currently measure the distance travel of a plunger on my UUT using a LVDT output (analog voltage going to a DAQ card). How would I measure velocity since I can't think of way to measure travel time of plunger ! I'm using LV 8.5.

Thanks

 

0 Kudos
Message 1 of 14
(7,323 Views)
Solution
Accepted by topic author dphan128
How are you acquiring data now?  Is it single point acquisition or measuring a waveform?  If you take the derivative of the waveform, that would give you velocity.
Message 2 of 14
(7,307 Views)
I acquire single point data now
0 Kudos
Message 3 of 14
(7,279 Views)

Are you measuring distance or are you measuring position?

 

If you're measuring position, then you have to take TWO readings, and TWO timer values:

Velocity = (Current Position - Previous Position ) / (Current Time - Previous Time) 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 14
(7,271 Views)
I'm measuring distance of travel. I took the analog reading at start of travel and another at end of travel. And do my calculation to figure out distance of travel. My problem is I can't figure out way of measure timing from start to end with my set up!    
0 Kudos
Message 5 of 14
(7,264 Views)

What triggers your readings?

 

If you want a rough approximation, then whatever triggers the START reading should also remember the current mSec timer.

Whatever triggers the STOP reading should also remember the current mSec timer. 

Two positions + two timers = Velocity, as outlined above.

 

That's "roughly approximate" because there's no hard correlation between triggering the reading and reading the timer - you don't know which comes first, or by how much.

 

If you need a more exact answer, consider sampling the whole travel at a fixed rate, then count samples between start and end.  Multiply the sample distance by the delta-T and you have time. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 14
(7,262 Views)

That was my issue. I had no way of "marking" the initial and "marking" the end ! I'm using state machine method in my LV so every action just happens in a sequence. Basiscally it looks like this:

-set my plunger to home postion

-measure home postion's analog value

-set my plunger to fully extend postion

-measure fully extend postion's analog value

-subtract fully extend postion value by home position value and calculate distance of travel

0 Kudos
Message 7 of 14
(7,255 Views)

So, you ARE measuring position.

 

Again, what is triggering the measurements? 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 14
(7,250 Views)

In the state "measure home position's analog value" add a "Tick count (ms)" and put the reading in control "Start Time"

In the state "measure fully extend position's analog value" add a "Tick count (ms)" and put the reading in control "Arrival Time"

Subtract both control and you have the travel time, if and only if your code is synchronous with your plunger 😞

 

 

I would read the value of the plunger continuously.

Using the scan rate of your DAQ you know the exact time between readings.

Out of this two you get velocity.

 

Or like Ravens Fan already said, read position continuously in waveform type and differentiate the waveform.

Message 9 of 14
(7,249 Views)

Hi, how do I differentiate the waveform to attain the value of velocity?

0 Kudos
Message 10 of 14
(6,765 Views)