LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Code

I am trying to design a program for measuring blood pressure.  However, I came across a problem that i dont know how to fix.  The waveform is coming in nicely, but the indicator is spitting out the wrong value.  I want the program to show the first sign of oscillations (the pressure reading at that first peak), but instead it is showing the value of the largest peak on the slope.  Attached is a screen shot of the problem area I am dealing with.

0 Kudos
Message 1 of 4
(2,469 Views)

Hi cta,

 

from what I can see in that picture your problem could be the use of the ArrayMinMax function. Here you pick the index of the largest array value.

(Then you do some RG code: make an one-element array from that max value, then pick the very first value from the one-element-array Smiley Wink )

 

Of course a lot of information is hidden in the ExpressVIs...

Message Edited by GerdW on 04-17-2010 04:01 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,453 Views)

cta5016 wrote:

Attached is a screen shot of the problem area I am dealing with.


 

Please attach a real VI or a picture of your actual data instead of a diagram image. We cannot troubleshoot an image.
 
One thing I noticed: to get the first peak, that would be index #0. You are getting element #1, which is the second peak location.
 
The entire lower part after "peak detect" is a complete mess. Can explain your thought process?
 
 
Also: Next time, try to use an appropriate subject line for the post. "Problem with Code" is too generic and could apply to 95% of all questions here. Be more specific, e.g. "problem with peak detection" or similar.
Message Edited by altenbach on 04-17-2010 09:32 AM
0 Kudos
Message 3 of 4
(2,434 Views)
0 Kudos
Message 4 of 4
(2,421 Views)