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.
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.
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.
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,
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.
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.
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