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: 

Peak detector at high speeds

Hello all,

 

I am working on a VI that will aquire data from an Infrared reciever. It should recieve over 1000 valleys(voltage drops) per second but if i try to let labview count the valleys, the indicator can't keep up with the samplespeed(the indicator does not go below 4.96v). The waveform chart does show me the peaks(+/- 4.8v), the only thing that doesn't work is the peak counter(which compares the value generated from the reciever with a constant value(4.85v)). Any ideas on how to fix this?

 

I've attached my VI, thanks in advance!

 

 

0 Kudos
Message 1 of 4
(3,018 Views)

If you read the help to the peak find you will find that it applies a square function fit over peak length points and calculate the zero crossing of the derivate......

Maybe you should try the simple threshold detector vi?

Sorry can't open your vi, still with 2012...

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(2,981 Views)

Hi there,

 

I am from the Applications Engineering department at National Instruments, I have had a look at your code and hopefully we can come to a solution for you. 

 

My inital concern was with your use of local varibales throughout your code. In my opinion, they are being unnecessarily used throughout your code and possibly introducing race conditions. This is where you may be trying to perform read/write operations at the same time which can cause data loss. I would reccomend removing the 'Signaal BVP (Swensor test)' varible and wire the directly from the indicator to ensure correct data flow.

 

If you are still encountering issues it would be good to use the highlight execution tool to check your data flow and maybe reconsider the VI used for the counting/analyisis like Henrik mentioned.

 

Let us know how you get on, if needed I can always try reproduce the issue myself.

 

Regards,

 

Josh 

0 Kudos
Message 3 of 4
(2,920 Views)

Hello JoshWY,

 

Thanks for your reply!

 

I have changed the VI quite a bit, trying to cut out as many of the local variables as possible. I have attached my new VI and a screenshot of the front panel in working state so you can see the peaks we need to be able to count (BVP LED Test Chart (Swensor)). We are still encountering issues detecting the peaks using the Threshold Detector PtByPt VI. We are only able to count roughly 200 peaks per second, whereas it should be around 1000 peaks per second. We would really appreciate your time and help.

 

Thanks in advance

Download All
0 Kudos
Message 4 of 4
(2,870 Views)