03-16-2016 09:53 AM
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
03-18-2016 08:52 AM
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.
03-21-2016 11:00 AM
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
03-21-2016 11:16 AM
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!)
03-21-2016 12:14 PM
Here is a screen shot of the current VI I am working with.
03-21-2016 12:17 PM
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.