LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference of measured values

Solved!
Go to solution

Hi 

 

I am actually writing a vi which uses while loop for measure the voltages at difference values.

for example :

at power supply voltage v1,I am measuring x volts. And this loop continues for like 10 times.

i.e at v2, I measure x1 volt.. at v3, I measure x2 volts.

 

I just need to find the difference in the measuring voltages i.e (x1-x), (x2-x1),(x3-x2) and so on. And then get the highest difference value.

 

Can anyone help me out in this. Appreciate a lot !

 

Thanks

 

 

0 Kudos
Message 1 of 4
(2,559 Views)
Solution
Accepted by shubhi

I would use a for loop since you are iterating a set number of times.  Use a shift register to store the previous voltage.  You can then subtract your current reading from the previous reading.  Send this output through an autoindexing tunnel.  You will want to throw out the first value (x-???) using the Array Subset and then you can use the Array Max & Min to get the highest difference.

 

Hopefully this example will help.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,555 Views)

Hey Thanks

 

My vi actually looks like this where I have defined the conditions of initial and the maximum voltage.

Its just at different voltages from e3631 , i get different different results at e34405.

All i want is difference in different voltages from e34405 and their max difference.

 

I got confused with your idea of using shift registers.

Would be glad if you could explain it more.

0 Kudos
Message 3 of 4
(2,546 Views)

Shift Registers from LV Help

A decent example of the basics of shift registers

 

If you don't know about shift registers, I'm guessing you are pretty new to LabVIEW.  You might want to check out LabVIEW 101.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,537 Views)