08-28-2012 10:12 PM
08-29-2012 02:24 AM
Hi Anand,
I tried what you suggested. Here are the results so far.
I will try to explain my problem a bit more...
When I run my VI, my pressure pump starts running, and pressure in the system starts to increase.
I want to calculate pressure (P) over time (t) ratio (P/t) at the instant the rising pressure crosses 80mmHg.
The attached VI does something close. Only thing is that I want the FIRST P/t value when this condition is met and want to use it further. So, I want that first P/t to be stored somewhere temporarily while the program is still running.
Based on the first instant of P/t when the pressure crosses 80mmHg, I want to run a motorized leakage valve for a time period proportional to P/t.
So, I have 2 problems:
(1) How to hold/latch the P/t value associated with the instant when rising pressure crosses 80mmHg.
(2) How to send voltage signal to motorized valve only for a fixed duration (range ~ 1-2 seconds), based on the detected P/t ratio.
Thanks!
VI Attached.
08-29-2012 02:29 AM
So you want to calculate the slew rate of the pressure when it reaches 80mmHg? Do you have a image of how the pressue increase w.r.t time also please post the vi in 2009 version.
08-29-2012 02:36 AM
Hi Anand,
I want to know how long it took the pump to pump upto 80mmHg.
The pressure plot is attached.
I have Labview 2011. Is there a way to save the VI as 2009 version?
I am attaching the picture of the VI.
cheers,
Saif
08-29-2012 02:44 AM
From the Picture I can see that the pressure reaches 80 mmHg around 10 seconds so you want that time has to be found automatically?.
Yes go to File>>Save for previous verison>> Select 2009 and save.
08-29-2012 02:54 AM
Yes that is correct. And also I want to use that P/t ratio further.
Attached in 2009.
08-29-2012 02:55 AM
Yes, that time should be found automatically because this ratio changes for individuals. So, for me it reacged there in 10 s. For somebody else with bigger arm, it will reach there in 12 seconds, and so on.
08-29-2012 03:23 AM
I have attached a code in that you replace the DAQmx DBL control with the DAQmx vi. The code gives you the time once the pressure crossed 80mmHg.
08-29-2012 03:41 AM
Hello Anand,
This is great! I just cheked it and it works 🙂
I will try to understand what you did.
Also, now I will try the remainder of the problem.
Cheers,
Saif
09-04-2012 04:09 AM
Hi Anand,
Hope you are doing very well!
If you remember, you had helped me with this problem a few days ago.
All works well.
I noticed one thing. When I ask the system to give me the time elapsed to reach a pressure of 80, it does. However, when I analyze this data in Matlab, I realize that there is some delay. So, for example, the systems outputs T = 7 s to reach 80. When I check offline, T = 7 s actually corresponds to 83. This valuse seems to be moving up&down a bit.
I wanted to ask you if there is a way to get the actual system pressure at T = 7s (say)? I tried to read the acutal pressure as soon as T latches from 0 to 7 s. However, I need the system pressure also to latch.
Is this possible?
Any help would be much appreciated!
Cheers,
Saif
.