05-08-2009 07:09 AM
Hi guys,
I have the following VI (partially) built up;
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
Peter
Solved! Go to Solution.
05-08-2009 07:28 AM
05-08-2009 07:32 AM
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
05-08-2009 07:45 AM
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
05-08-2009 07:49 AM
05-08-2009 07:51 AM
05-08-2009 08:02 AM
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!
05-08-2009 08:04 AM
05-08-2009 08:24 AM
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....
05-08-2009 08:34 AM
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