LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming in this formula

If I have a simple program consisting of a DAQ assistant inside a while loop with its data output in volts is there anyway to program in the following formula?

 

Acceleration= {((Vout1/125)/0.5)-((Vout2/125)/0.5)}/(T2-T1)

 

so if I start the program Vout1 will be the first data output and T1 will be the time in sec (0 sec) and Vout2 will be the second data output at time T2.  Essentially I am trying to convert the voltage output from my device into acceleration as the program runs.  Thanks.

0 Kudos
Message 1 of 6
(2,769 Views)

Yes.  You want a shift register.  Feed the voltage into a shift register on the right hand side.  The left hand side of the shift register will be the value from the previous iteration of the loop.

0 Kudos
Message 2 of 6
(2,765 Views)
what about T1 and T2?
0 Kudos
Message 3 of 6
(2,760 Views)

This should be what youre looking for, replacing the random rnumbers with DAQ Assist:

 

 

Also, that 500 ms wait was just for a quick glance making sure I wired everything correctly, you wouldn't need that per se.

Message Edited by Chris_VH on 03-31-2009 02:10 PM
Chris Van Horn
Applications Engineer
0 Kudos
Message 4 of 6
(2,757 Views)
delta T will be in Millisecond correct?
0 Kudos
Message 5 of 6
(2,729 Views)
Up to you, but in MY example, dividing by 1000 will give dT in seconds.
Chris Van Horn
Applications Engineer
0 Kudos
Message 6 of 6
(2,726 Views)