From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

array waveform peak detector

Solved!
Go to solution

Hello everyone,

 

I am having problems trying to work with the peak detector tool .. I have a file that contains 17 columns the first one is time and the rest are the data .. I split and now Im trying to find the peaks from the first wave .. I search around and I figure out that it is something related on how the peak detector receive the data. Im trying now to convert the files again in an array but only inside labview and I think that is going to fix this problem .. but I cant.

Please if somebody could help me I will be really great

In the attachments you could find the .vi file and the excel file to run the program ..

Thanks ..

 

 

Download All
0 Kudos
Message 1 of 15
(4,219 Views)
Solution
Accepted by topic author Alvaro_Ortiz
In Excel, I would save the .csv file to .txt file and then do something like shown in the attached VI by reading the file in using 'Read from Spreadsheet File.vi'.  This way you have complete access to the actual values including time array within the LabVIEW program....Don
 
 

Attachmenttest.vi (21 kb)

0 Kudos
Message 2 of 15
(4,184 Views)

Roth ..

Im still having a problem with your method .. I tryed in my .vi and for some reason is not working .. As I told you I found two different methos to do it but I am still interesting in the one that you have because in my method Im creating another array for the time .. instead of using the one that appears on the original file ..

Please tell me what is the problem with your method.

 

Thanks ..

 

In the attachment you will find all the methods that I have .. including yours (which is not working) ... Also the files that contains the data is attached.

 

 

0 Kudos
Message 3 of 15
(4,161 Views)

It works fine.  When you open the .csv file in excel, make sure you specify comma is the delimiter.  Then save to ascii text file. The screenshot below shows the first waveform.

 

waveform.png

 

 

0 Kudos
Message 4 of 15
(4,150 Views)

Roth ...

I apologize for the confusion .. You are absolutely right .. It was a confusion on the file that I was reading .. I have a thousand of files .. So I just make a confusion on the one that I was reading.

I working on a project that have to analyze events in an Acoustic Emission experiment .. Every event have 16 channels (signals) to analyze .. So my next goal is to make this automatically, instead of doing manually.

 

Thanks for everything Roth.

 

0 Kudos
Message 5 of 15
(4,127 Views)

Roth,

 

Working on this project I am back in a question that Im having several weeks ago that maybe you have been dealing with it.

Every time that I change the column, or data .. to analyze other graph ... I have to stop and run again to displayed ..

Is there an structure or a method to do it continuously ? .. I mean if a change the column and I want to visualize a new graph I don't need to stop and run again and again ?

 

Thanks..

0 Kudos
Message 6 of 15
(4,111 Views)
I am not exactly sure what you are asking.  I ran your VI with your test data and I was able to view all of the graphs and columns of data without having to rerun the VI.  Can you please be more specific? 
Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 7 of 15
(4,093 Views)

Ok ..

let me explain it better ... I have different options of visualization of the data. One of them is to visualize all the data when is running .. for that I have 16 graphs and I have no problems with that. The second option is to visualize one by one in only one graph and choose values for each one. The problem with that one is that I have to stop and run again if I need to visualize the next data on the same graph and I am going to loose the values that I was choosing on the last graph.

I need to manually set the arrival time of the data and storage in an array. I have several events that have 16 data sensors each.

 

0 Kudos
Message 8 of 15
(4,064 Views)
Okay, I think that I understand.  Something to try would be to store all of your data into separate arrays.  You can then use the build array function to concatenate the arrays that you want to display on your graph.  You can put in as many arrays as you want and view them all on the same plot.  You could use a case structure to determine which arrays go to the graph if you have a certain pattern of plots that you want to view.  You may have to be a little more creative if you want to be able to randomly choose plots, but I think that building an array for each data input is a good start.  Let me know if I am way off base here.  I hope this helps.
Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 9 of 15
(4,039 Views)

Thanks for the answer ..

Ok let me explain you something else,

The experiment have 16 sensors that are acquiring EVENTS (the acquisition happen in other DAQ experiment ... and then the events are saved in txt files) ... (every event have 16 signals that I have to analyze and every event is storage in an individual file). During an experiment it could happen a 100 events or more ... so the idea is to be efficient ... and to split the data after be analyzed is not an option (is gonna take a lot of time).

So what I am doing right now is to read every event at a time .. then I split the 16 signals .. make my analysis and then stop .. and read the next file .. and so on ...

 

For me it would be good if I don't have to start and stop the program for every file .. or in the case that I have only have one graph to analyze one sensor ... I have to start and stop the program to make the next analysis of the next sensor .. That takes a lot of time ..

I already try the option to make a case for every sensor but it didn't work ... I still have to stop and start to visualize the next graph .. I need something to change on the fly ...

I think that labview reads only when you Start and is not continuously reading

 

Thanks ...

 

 

 

 

 

0 Kudos
Message 10 of 15
(4,026 Views)