LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Peak detection and daq aquisition

Hi..

I used the same WA multiscale peak dector to capture peaks of a signal coming from DAQ.

The location values from WA peak detector as some number . So I used

Time Locations[i] = t0 + dt*Locations[i]

 

I took dt as 0.001 as my sampling frequecy is 1 kHz. And t0 as zero

But I am not getting the actually peak time.

Can you help me to use the above formula as what to be taken for t0 and dt.

Values of locations are 

3626338060.32412100

3626338061.08412123

3626338062.44912100

 

The actual time at which peaks appears are 

1.204

1.964

3.329

 

Thanks 

Sukesh

 

 

 

0 Kudos
Message 1 of 10
(2,606 Views)

Hi Sukesh,

 

it seems you handle LabVIEW timestamps, converted to their numeric value:

check.png

When you need relative times instead you need to get the difference of two timestamps…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,581 Views)

Hi GredW

 

Thanks for the reply. 

The values that you have got after timestamp process seems to be not same as the values that I got in actual peak time. 

I could get the relative and absolute time values when I change the display property of DBL block. Which is the same values that you showed.

 

The actual peak values that found are taken from exporting the data to xls sheet from peak plot display block. There I could see actual peak values. But those values are not matching with even with relative time stamp. 

Pls let me how to get values with time values as I get it in peak plot.

 

Thanks 

Sukesh

 

 

0 Kudos
Message 3 of 10
(2,571 Views)

Please attach the following:

  • Your LabVIEW code.  Do NOT attach a "picture" of the code, attach the actual VI (or, if there are multiple VIs, like a LabVIEW Project, compress the folder holding them and attach the resulting ZIP file).
  • A data file.  Feel free to attach a Zip version of the file if too large.

Bob Schor

0 Kudos
Message 4 of 10
(2,562 Views)

Hi Bod

 

vi file is attached.

also the xls file containing the absolute times of peak are also attached. I expect the values to be in that of xls file but the conversion that i have used as per time= t0+dt*location doesnt shows the result.

thanks

sukesh

Download All
0 Kudos
Message 5 of 10
(2,559 Views)

Hi Sukesh,

 

the WAMultiscalePeakDetector is a VI you can look inside. Did you?

If you would do so you would notice those "locations" are already scaled to t0+i*dt…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(2,554 Views)

Hi GredW

I changed dt value inside WA PEAK vi module. Still not finding similarity in the values of location  and xls sheet exported peak times  from peak plot. 

We can see time values in the exported files of xls sheet in ternt of seconds. But I am not getting those values from WA multiMulti peak detector in the "location field". Kinldy let me what went wrong here.

Thanks

Sukesh

 

0 Kudos
Message 7 of 10
(2,550 Views)

Hi Sukesh,

 

But I am not getting those values from WA multiMulti peak detector in the "location field". Kinldy let me what went wrong here.

There's nothing wrong. You just have to note the term "+t0" in the equation for those locations!

t0 is the number of seconds since epoch of the timestamp (as described in the LabVIEW help). That's why you get numbers in the range of 3.6E+9!

 

As written before: to get relative time you need to subtract two timestamps…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(2,548 Views)

Hi Gredw

 

Thanks a Lot . I got it now and did the same modification in the code. I was not able to locate t0 values. 

Now both xls and times from locations are same ...

Thanks

Sukesh

0 Kudos
Message 9 of 10
(2,543 Views)

Hi Sukesh,

 

try to minimize ExpressVIs and DDT wires as much as possible.

Convert from DDT to some meaningful datatype as soon as possible:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(2,540 Views)