LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

conditional acquisition

Hello,

I am to acquiring signals from three (3) channels (volume, flow and pressure), but the system from which I'm getting the signal has a certain routine to follow. At the beginning a shutter is opened so we can measure flow (leaving out the pressure) and plot it against the volume on an xy graph to calculate the slope out of that.

After a while we close the shutter, manually, to measure the pressure (leaving out the flow), and plot pressure against the volume on an xy graph to calculate another slope out of that.

This means Volume is constant on the x-axis, while the other 2 channels (pressure and flow) would have to be acquired conditionally. The 2 slopes are used for different calculations.

I have developed a COD
E that acquires 2 channels gets the slope and goes ahead to make the calculations for TGV (which involves pressure against volume).

I believe the other channel will go through the same route, except the formula node, which will be different, because the flow will also be plotted against volume to get a slope.

My problem is how to develop my Code so that it acquires Flow and Volume when the shutter is open, display them on an xy graph and goes ahead with all relevant calculations (without interference from the pressure). And then when the shutter is closed, it switches from the Flow to Pressure measurement, plot it against Volume and goes ahead to do all the calculations with new slope.

What is in this code (VI) is measuring pressure and volume. This should be when the shutter is closed.

I would be grateful if any one could help me in that.

Hope to hear from you soon. Thanks.

Victor.
vopoku@yahoo.co.uk
0 Kudos
Message 1 of 9
(3,527 Views)
When you acquire the pressure reading with the shutter open, does it read close to zero? If so, then you can use a case statement to determine which calculation you need to perform based on a comparison of the pressure with "valid" values. I would say - look at some test data and determine whether this type of comparison is possible. Then write your code to check for invalid readings in order to determine which calculation to perform.

Rob
0 Kudos
Message 2 of 9
(3,527 Views)
Hi Rob, thanks for your suggestion. I have been trying to create a condition as you suggested but I'm stacked could you further help?? i attach my code.
Download All
0 Kudos
Message 5 of 9
(3,527 Views)
Okay. Sorry for the lateness of the reply, but I have been on vacation.

I have looked at your program and believe I understand how it works. I have left some comments on the diagram. I moved some things around (you can ignore that, it was just me trying to get a good idea of the data flow). There was at least one sub-VI that was missing. You may have to repair the diagram. I hope that this gets you on your way.

Rob
0 Kudos
Message 6 of 9
(3,527 Views)
Hi Rob,
Thanks for the concern. Unfortunately, I cannot open the VI you attached. When I try to open it, I have the following error message:
Resource not found.
An error occurred loading VI ' VOM687C2.vi'
LabVIEW load error code 8:Could not load VI resource.

I don't know what the problem is.
could you try to find that out for me.

Thanks.
Victor.
0 Kudos
Message 7 of 9
(3,527 Views)
Very strange. Which version of LabVIEW are you using? I'm using 6.0.2. All I did with your VI is move some things around and add a case structure and some comments. I can save the VI in a previous version if you need. I have not seen that error before and have no idea what that VI is.

Rob
0 Kudos
Message 8 of 9
(3,527 Views)
On second thought, I took another look and found that your VI was saved using version 5.1.1. So here is the revised and resaved VI (using a save as version 5.0). I hope this solves the problem.

Rob
0 Kudos
Message 9 of 9
(3,527 Views)
Hi Victor,
e-mail me a library with your Vis at costadri@yahoo.com (it's not quite easy to present the hole system in few words)
Anyway, first suggestion is to do this naturally � with a sequence:
1. acquire flow and do those calculations with flow/volume
2. transition step
3. acquire pressure and do calculations with pressure/volume

Between step 1 and 3, you have to handle the shutter. Probably you can find out if the shutter position is modified trying to continue measurements for the flow. After that you can wait some time and do the pressure acquisition. If you can not do that, an idea is to place somehow a contact on the shutter and try to read it's state via a parallel port or a DIO board if available.

Hope I didn�t confuse you too much
0 Kudos
Message 3 of 9
(3,527 Views)
"conditional acquisition"

"Hello,

I am to acquiring signals from three (3) channels (volume, flow and pressure), but
the system from which I'm getting the signal has a certain routine to follow. At the
beginning a shutter is opened so we can measure flow (leaving out the pressure)
and plot it against the volume on an xy graph to calculate the slope out of that.

After a while we close the shutter, manually, to measure the pressure (leaving out
the flow), and plot pressure against the volume on an xy graph to calculate another
slope out of that.

This means Volume is constant on the x-axis, while the other 2 channels (pressure
and flow) would have to be acquired conditionally. The 2 sl
opes are used for different
calculations.

I have developed a CODE that acquires 2 channels gets the slope and goes ahead
to make the calculations for TGV (which involves pressure against volume).

I believe the other channel will go through the same route, except the formula node,
which will be different, because the flow will also be plotted against volume to get a
slope.

My problem is how to develop my Code so that it acquires Flow and Volume when
the shutter is open, display them on an xy graph and goes ahead with all relevant
calculations (without interference from the pressure). And then when the shutter is
closed, it switches from the Flow to Pressure measurement, plot it against Volume
and goes ahead to do all the calculations with new slope.

What is in this code (VI) is measuring pressure and volume. This should be when
the shutter is closed.

I would be grateful if any one
could help me in that.

Hope to hear from you soon. Thanks.

Victor.
vopoku@yahoo.co.uk"


attached is my proposed code.
0 Kudos
Message 4 of 9
(3,527 Views)