LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Blood Pressure VI

Solved!
Go to solution

Hi guys,

 

I have the following VI (partially) built up;

 

 

 

 

 

Blood Pressure VI

 

 

If you can follow my logic.. it is taking two readings from the input wave, when the low is taken the loop should complete and pass the two values into the comparison section.

 

My issue is that when I take the high pressure it reads the value, but then resets to zero when the case structure goes false.  I need some kind of buffer.  I've tried creating an array of the output from the case structure (0 0 0 0 0 0 80 0 0 0) with the intention of then taking the maximum, although it appears to assign the variable to the 1st element of the array, then over-ride it with a zero.  Someone suggested using a local variable, although I have no experience of them.

 

Any and all help appreciated Smiley Happy

 

Peter


Regards,

Peter D

0 Kudos
Message 1 of 19
(4,624 Views)
you should have a while loop running around your case strutures an you could either make this event driven or make it a state machine and that make fix those errors.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 2 of 19
(4,613 Views)

 Hi

 I am not sure I follow. In order to measure High or Low you need to press a button right ? then, it will never measure the two values.

The output you get depends on the False case on both of the case structures. see what's in there.

also in the while cycle : this will run until you press the Low buton, right ? there is no need of the True constant there...

please explain more what you are trying to do

N

 

0 Kudos
Message 3 of 19
(4,610 Views)

I agree with nitad,

 

Something does not make sense.

How do you know which button to press?  Blood pressure is whatever the patient has, so until you measure it, how would you know if you should press high or low pressure?

What happens if the person has normal pressure?

 

Maybe it is because I do not understand the application.

 

In normal use, you should simply have a start & stop buttons.  The High Pressure, Low Pressure and Normal Pressure should be indications that light up based on range & limits.

 

Please explain what you are trying to accomplish.

 

R

0 Kudos
Message 4 of 19
(4,602 Views)
normaly you want your while loop on the outside and than you put your cases in the while loop but for this what you could do is use a while loop and put an event structure in it and make this program event driven.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 5 of 19
(4,600 Views)
can you post the code?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 6 of 19
(4,601 Views)

Sorry I didn't specify my problem very well.  High and low pressure should technically be systollic and diastolic, the two values which make up your blood pressure.

 

My input will be a continuous voltage signal from a pressure transducer attached to a cuff.  The cuff will be pumped to a pressure greater than the patients systolic pressure, the pressure will be released (ie voltage will drop) untill a sound is heard from the stethoscope (manually).  At this point the voltage will relate to the systolic pressure (say 160) and should be read by clicking the button.  The pressure will be further released until the sound relating to the diastolic pressure is heard, at this point the voltage is to be read.

 

This will give the "140 over 80" values you would hear.  Both of these values are used to determine how healthy the patients blood pressure is.

 

The case stucture over the whole project is so that the program can be initialised by clicking the "Start.." button, rather than using the run button.  Additionally I don't have (or know how to obtain) any code for this.

 

Thanks for the replies!


Regards,

Peter D

0 Kudos
Message 7 of 19
(4,595 Views)

Here's the VI.


Regards,

Peter D

0 Kudos
Message 8 of 19
(4,588 Views)

to use a local variable just right click the object you want and than go to create and there shoudl be a local variable option click it and it will creat a local variable for that object (and than from there you can change it from read to write by right clicking the local variable and change it).

 

 

but I geuss I still don't understand your problem?

 

sorry....

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 9 of 19
(4,565 Views)

PjayD wrote:

The case stucture over the whole project is so that the program can be initialised by clicking the "Start.." button, rather than using the run button.  Additionally I don't have (or know how to obtain) any code for this.


This may help, perhaps 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 10 of 19
(4,559 Views)