ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

instead of continuous calculation.

Hi,
I'm acquiring two signals, displaying them on a waveform chart(separately)and further displying them on an xy graph(one as x and the other as y), all in a while loop.i'm also taking the min & max of the 2 arrays(usiing array max & min) for the calculation of the slope.The calculation is continous, i want to acquire the min & max for some time before calculating one slope instead of continuous calculation.
I would be grateful if anyone could help me on that..
Hoping to hear from you all soon...

Victor
0 Kudos
Message 1 of 5
(3,044 Views)
You could try building data in a shift register of your loop and put your slope calculation into a case structure so that it only happens on certian loop iteration multiples or something along thos lines.
0 Kudos
Message 2 of 5
(3,044 Views)
Hi Aaron,
Thanks. this is my vi..could you advise me?
0 Kudos
Message 3 of 5
(3,044 Views)
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 CODE that acquires 2 channels get
s 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 5 of 5
(3,044 Views)
I believe yet another option would be to collect data for N many iterations (For Loop) and output one time per that N. That is, collect data for say 5 iterations, then send that data to the next step (your calculations, etc.). I've attached a demo to help show this. The input to the For loop is a 1D array, but its output is a 2D. You can quickly message the 2D with averaging, etc., but at least you only do that 1/5 the time.
Good Luck with it, Doug
0 Kudos
Message 4 of 5
(3,044 Views)