LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak detector for multiple data sets

Hello,

 

I am using a DAQ with 81 electrodes to interpret electrical conductions in the heart. I have a data set that I am wanting to  analyze. I need to find the first peak in all 81 channels and place these values in an array. I am not sure how to configure the looping mechanism to build the array I am needing. I need the data from each column of data (each electrode) to run through a derivative function and then through a peak detector. I am using the cursors to select chunks of data that I am interested in. Any advice or tweaking of the program that I have would be a massive help.

 

Attached is my attempt at achieving this and the data I am working with. I appologize in advanced as I have only been working in LabView for 2-3 months. If more explanation/ clarity is needed I'd be happy to elaborate.

 

T

Download All
0 Kudos
Message 1 of 6
(3,416 Views)

Hello Thomas,

 

Thank you for posting on the forums and happy to hear to you are using LabVIEW!

 

Looking over your code it looks like you are combining multiple ideas, some of which may be redundant.

 

It looks like in the while loop you have two groups of code that are accomplishing the same kind of calculations. One is in a case structure and the other is below. Also the logic in the nested for loops inside of the case structure, seems to have incomplete logic.

 

I was wondering what is currently working in your code and what is not working? Also, what format is the data when you read it into your VI?

 

Thank you.

0 Kudos
Message 2 of 6
(3,358 Views)

Hey Alex,

 

Thank you for getting back with me. 

 

The data format that I am putting into the VI is a .txt file. It has 81 columns of data coresponding to the 81 electrodes that I am pulling data off of. Depending on how long I run the system for the number of rows varies. 

 

So the bottom part of the VI successfully does what I want as far as peak detection goes for 1 column of data in the .txt file. Thats the reason I have kept it there. What I am having difficulty with is translating that into detection of all 81 columns. This is what I have attempted to do at the top of the VI. What I hope to do is find the 1st peak within the cursors for each of the columns of data (each of the electrodes) and build an array of those values.

 

I appologize for the redundancies, as I said before I am very new to LabView. I am quite framiliar with MatLab where I leave broken code in until the very end then I clean up haha.

 

Thanks,

Thomas

0 Kudos
Message 3 of 6
(3,321 Views)

Hi Thomas,

 

I cannot view your VI because I'm using LV 2014, but here is a quick snippet that might help you get started. (Or might be totally useless, I'm not sure since I haven't seen your VI!)

 

Find Peaks.png

0 Kudos
Message 4 of 6
(3,314 Views)

Here is a screen shot of the current VI I am working with.

0 Kudos
Message 5 of 6
(3,301 Views)

Alright, it is pretty close to what I was suggesting. The "# of channels" input to the for loop is unnecessary, it will run based off the auto-index tunnel. Also, it is helpful to keep the wires from left to right in order to visualize your code.

0 Kudos
Message 6 of 6
(3,295 Views)