From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Take time between two max values

Solved!
Go to solution

Use fewer local variables. You have a couple of places where the local variable is read before the terminal is written. That is a "stale" value.

You are only taking one sample at a time, so the output type of "array" isn't valid. Either read more samples, or use a scalar.

This isn't very clean, but it might be closer to what you're looking for:

 

deltat.png

0 Kudos
Message 11 of 62
(784 Views)

Hi Uday, I'm use the version 10.

 

What you modify in the program?

 

Because the problem is the same...

 

There is no substract between the actual number from last number

 

in the 17,990 - 17,910 =  0,08 or 18,010 - 18,000 = 0,010

 

Now the substract is from the actual number from the first number...and this is wrong...

 

 

thanks for the help...I no see any solution... :((

0 Kudos
Message 12 of 62
(769 Views)

Hi Todd,

 

This I tried to do in Labview and it doesn't work...because I need to use Analog 1D DBL 1chan Nsamples.

 

I don't know if I'm explained good about what I'm looking for....

 

I have a voltage and time...this voltage has diferent peaks at max value. 

 

I want to calculate de tame between every peak that I have...for example see in the picture.

 

thanks a lot people for the help...is very importan for me!!

0 Kudos
Message 13 of 62
(761 Views)

You have stated the problem very clearly. Why nSamples? In the VI I downloaded, you had the sample count set to one - which will return an array with only one value per channel.

0 Kudos
Message 14 of 62
(740 Views)

Because if you put Nsamples You can use the Array Max and Min and this help to know wich is the max value every moment....

 

In the program you draw this vlaue you put a control...this depends on the measurement....

 

You see the picture called "time"...is it possible to do this?

 

 

thanks for the help...my english is bad and sometimes Is it difficult for me to understand...

 

 

Jocuma.

0 Kudos
Message 15 of 62
(732 Views)

I think I understand.

If you take the maximum value of an array that only has one value - you get that value.

 

max ( [2, 5, 3] ) = 5

max ( [-2] ) = -2

0 Kudos
Message 16 of 62
(721 Views)

Yes...Because I only want the Voltage Peaks....and when it appears this peaks...there is a time between peak1 to peak2

 

this time Is what I want to save in a table...see this picture.. :S

 

 

thanks! 🙂

0 Kudos
Message 17 of 62
(718 Views)

Hi Uday, Here you have the samples that I take...

 

 

 

0 Kudos
Message 18 of 62
(709 Views)
In the samples you sent, there are no peaks forming.Till 1 sec, it is 7.xxx and after that it is 4.xxx. It is never high then. that is the reason you are not getting any peaks. Am i right.?Please check the data.
Thanks
uday
0 Kudos
Message 19 of 62
(695 Views)

Yes I get the peaks beacuase 4.xxx is the constant voltage and when it's 7.xxx is the peak that I have...

 

you understand me?

 

 

Always there is a voltatge 4.xxx and when there is 7xxx is the peak that I have.

 

 

thanks Uday,

0 Kudos
Message 20 of 62
(693 Views)