LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak Detector

Just looked at my code.  mine will work fine, but this will work faster:
 
(I've just passed forward the index from the "max" function instead of searching the array for that value)
 
Regards
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 11 of 20
(1,767 Views)
Hi
 
Just had a go at hooking up and it doesn't seem to be working as expected. I get 5 values out, but all the same! I'm guessing that I've made a simple mistake somewhere - but can't see it.
 
Attached is a screenshot of the vi.
 
Cheers
 
Dave
0 Kudos
Message 12 of 20
(1,752 Views)
Hi David,
 
You are using the vi "Array Subset.vi" instead of "Delete From Array.vi".
It looks like this in the pallet.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 13 of 20
(1,743 Views)

Hi Adam

 

Right, I've changed the vi so the delete from array is now in there. I can see how the vi is meant to work now but I get the attached results. Thanks so much for your help - its awesome!

Cheers

Dave

0 Kudos
Message 14 of 20
(1,732 Views)
Right... well I looked at it and that's my bad (sorry)
 
What you are looking at doing is this.....
I was taking and searching the array that had the elements deleted from it... it doesn't work that way... you need to copy what I have there.
(and you do actually need the search from array function in there too)
Really sorry... we'll get there eventually. (is it any quicker?)
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 15 of 20
(1,726 Views)
Hey David,
 
Can you open this, copy and paste it into your code and see if that works?
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 16 of 20
(1,679 Views)

Awesome - Adam your a star - got the code working in isolation in the vi at the moment and its just great - seems to be alot quicker than my last attempt. Now I just need to try it in the main vi.

Cheers

Dave

0 Kudos
Message 17 of 20
(1,673 Views)

Hi Adam

Quick question - I've put the vi into my main vi and I'm testing using some files. I get the following processing times out -

File 1 - 1.5mb - 9s

File 2 - 2.6mb - 70s

File 3 - 3mb - 90s

Do these times look in proportion to you? Seems to be a massiv difference between the first file and the rest..

Cheers

Dave

0 Kudos
Message 18 of 20
(1,657 Views)

Hi David,

 

Sorry it's taken so long to get back to you. (I've had one of those weeks)

Anyway, the times seem to be quite out of proportion.  Where in the code is the largest drain on time?  If you place your code in flat sequences and measure the time it takes for each of these to complete, you can narrow down the problem further.  Have a shot at this?

Have you had any more luck with all of this?  (I get the feeling that the "time hungry" code will now be in the power spectrum vi and the average level vi's)

AdamB

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 19 of 20
(1,640 Views)

Hi Adam

Now worries - my last week has been the same as well - hence my delay! I will try and have a look at this in the next week - too many other things getting in the way at the moment!

 

Cheers

 

Dave

0 Kudos
Message 20 of 20
(1,597 Views)