cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to get time associated with Max/min vi?

How to get time associated with Max/min vi?

Hi,

 

I am recording the Max value of a signal using Max/min vi. 

 

How do I get a time value corresponding to the Max value of signal?

 

ie how many seconds did it take to reach peak value.

 

Thanks for help.

0 Kudos
Message 1 of 16
(260 Views)

Re: How to get time associated with Max/min vi?

You would need to use Tick Count (ms) when you start your signal and use Tick Count (ms) when the max has been hit.  Subtract Max Time - Start Time = Elapse Time.

 

Question: Are you processing this as it happened or post-processing the data because the procedure would be different.

 

Matt

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 2 of 16
(246 Views)

Re: How to get time associated with Max/min vi?

I am post processing. 

 

 

I am acquiring signals from a position sensor. 

 

Using a shift register and acquired signal fed into Max/min, then recording max value using numerical indicator outside of while loop.

 

Where is ''Tick Count (ms)'' located? I am using a waveform graph.

 

Thanks

 

 

0 Kudos
Message 3 of 16
(238 Views)

Re: How to get time associated with Max/min vi?

Tick count is in timing.

 

If all your samples are at a precise frequency (evenly spaced samples) then you can count the samples and do simple math to get the time.  Easy.

 

If they are not all evenly spaced then you will need to add a time stamp to each sample.  This can be done as two arrays or a cluster with data and time.Find the mx, get the time, do the math to get elapsed time.

 

Hope this helps but got to go home,

 

Matt

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
0 Kudos
Message 4 of 16
(232 Views)

Re: How to get time associated with Max/min vi?

Just into simple terms,

 

How would I do  it with this example?

 

Thanks

0 Kudos
Message 5 of 16
(223 Views)

Re: How to get time associated with Max/min vi?

and also have a value in seconds instead of hours/mins/secs and date

0 Kudos
Message 6 of 16
(219 Views)

Re: How to get time associated with Max/min vi?

Still having trouble

0 Kudos
Message 7 of 16
(196 Views)

Re: How to get time associated with Max/min vi?

You're not storing your time anywhere.

 

I'm not sure how the dynamic datatype stores the timestamp information.

 

If you use waveforms, you'll have the timestamp and can store it at the same time you store max value.

 

You can also use a Not Equal check to compare your new maximum with the previous maximum and store the iteration terminal in a shift register if a new maximum is found.

0 Kudos
Message 8 of 16
(184 Views)

Re: How to get time associated with Max/min vi?

Start with something like this. For each iteration, it will get the max and the time stamp for each channel. It creates an array of max values along with their associated timestamps. Then, the array min/max is used to get the overall max value and it's timestamp.

It can be simplified but I was unsure of exactly what you wanted for max. That conversion to scalar really was confusing.

0 Kudos
Message 9 of 16
(180 Views)

Re: How to get time associated with Max/min vi?

Thanks for your reply,

 

What I am looking for is something to say,  it took 3 seconds to reach Max value. 

 

The system I am running wants to record Max value and how many seconds it took to get to that value.

 

These figures are key for my system because I want to improve the system to get a Max value as quick as possible.

 

Ideal front panel would be ie,

 

Max value 200

Time taken: 5 seconds

0 Kudos
Message 10 of 16
(172 Views)