LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting peaks within one minute intervals and outputting with time stamp

I'm currently working on my senior design project for biomedical engineering. We are creating a piezoelectric sensor in order to measure respiration on a bed non-invasively. The sensor lays on bed under subject and records movement due to respiration. We currently have figured out how to detect peaks. However, now we want to count number of peaks detected within a 1 min time period and output that result with a 'timestamp'. We would like the output to be into excel as two columns, rate(number peaks in 1 min) and time. Time in minutes and not actual time is fine. Sampling rate was 500Hz.

 

My current VI has peak detection criteria and can output total number of peaks and their locations.

 

Any help would be greatly appreciated as this is our last step before verification and have been stuck on it for awhile. 

 

It won't allow me to attach a tdms file in which our data is stored as, so I can't upload the data currently.

Also attached is our current VI for peak detection labeled 3.26.Resp.PeakDetect.

 

Thanks for any and all help!!

0 Kudos
Message 1 of 5
(2,686 Views)

I put my data into an excel file by hand incase it's needed. The file is only a minute and a half long due to it being preliminary testing data. 

0 Kudos
Message 2 of 5
(2,680 Views)

Well, 500Hz*60sec/min = 3000 samples.  So you want to read 3000 samples and do your math.

 

If you want relative time, then each data point you put in your new file will add 1 minute to the time.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,676 Views)

so I would need to create a case structure to read 30,000 samples at a time then output the math into an array? I'm relatively new to labview so I'm having trouble setting something like that up. I've looked over other examples but they don't fit with my data

0 Kudos
Message 4 of 5
(2,638 Views)

I see no need for a case structure.  Or did you set up a state machine that I missed?

 

I recommend making a VI that does nothing but read your 30,000 samples and process it (counting the peaks and what not).  From there, you create the array for the number of peaks and the time (in minutes).  Then you can call that VI inside of a loop to build up the array of data points.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,630 Views)