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: 

peak detector & extract portion of signal

hello
currently i am using usb6008 for signal acquisition. collecting the offline data and process for one set sampled data, it meets what i desire. But when i test it real time(infinite sampled data), collecting the analog signal, it shows error 20013 which related to peak detector. the error message shows peak detector no state. what has really gone wrong?the sampling rate 1k.
 
the 2nd question is that i manage to extract portion of signal.but it can only extract first portion of the first curve of acquired signal. what vi should i used?
 
thanks
 
happy new year.
 
regards
 
0 Kudos
Message 1 of 2
(2,550 Views)
Hi heang,

The error -20013 indicates that the width supplied for the Waveform Peak Detection.vi must meet the requirement 0 < width < samples. It seems like you are acquiring one point at each iteration. Then you are feeding that one sample to Waveform Peak Detection with width > 1, hence you are getting the error. To fix the problem, I would suggest you acquire multiple data points at each iteration of the while loop instead, or acquire all of your data first, and then find the peaks and write them to a file.

Another option is to move the Waveform Peak Detection, Merge Signals and Write Peak Data VIs to outside of the while loop. Be sure to enable the indexing of your data terminal to be able to access the entire data acquired from outside the while loop.

Michael K.

| Michael K | Project Manager | LabVIEW R&D | National Instruments |

Message 2 of 2
(2,530 Views)