11-11-2013 02:45 AM
Hi! I have a VI through which I acquire data signals from some transudcers and I use them to calculate 2 values (let's call them Qin e Qout) . At the present time I send them to a LVM file and then I realize some post-processing analysis (which involves dividng Qout/Qin). Is there a way I can do that while the VI is running?
I mean, can I tell LV to store a certain amount of points and then calculate Qout and Qin for that points and dividing them?
I saw that LV can do some data processing but it seemed to me it's all in real time, processing the data in the exact moment they are acquired. Am I wrong?
Thank you in advance.
11-11-2013 02:52 AM
Hello,
You can process them one or more iterations later by using shift registers.
also you can process it after the measurement has finished.
Koen
11-11-2013 03:19 AM
What do you mean by I can process it after the measurement has finished? How do I tell LV to choose, let's say, the first 100 points and do some maths and then the same for the following 100...and so on?
11-11-2013 03:31 AM
As you already describe, you can use a For-loop with 100 iterations.
Then put this For-loop in a while loop where you do your processing
11-11-2013 03:36 AM
Turillo wrote:I mean, can I tell LV to store a certain amount of points and then calculate Qout and Qin for that points and dividing them?
I saw that LV can do some data processing but it seemed to me it's all in real time, processing the data in the exact moment they are acquired.
@Turillo wrote:
What do you mean by I can process it after the measurement has finished? How do I tell LV to choose, let's say, the first 100 points and do some maths and then the same for the following 100...and so on?
The two statements" "Processing the data in the exact moment they are acquired" and "process 100 point" are not really compatible unless all 100 point arrive at exactly the same moment. Do you want to buffer the acquired data and trigger an analysys for every 100 points? Do you want to analyze the last 100 points whenever a new point arrives?
How complicated are the "calculations" and how fast is the acquisition? Is there a danger that the processing takes too long compared to the acquisition?
What should happen with the output of the calculations (Written to the file together with the raw data? Displayed in an indicator?)
@Turillo wrote:
Am I wrong?
LabVIEW is a full featured programming environment, and this you can do essentially anything you want. As a first step you need to give us more details on what you actually want. 😄
11-11-2013 03:47 AM
@Koen: mmm, I wouldn't like to use for/while loops as the VI is quite complicated and already includes 2 while loops running simultaneously...
@altenbach: I would like to buffer the data..No, I don't want to analyzethe last 100 points whenever a new point arrives...
basically my task is this: I have a machine running in cycle of a determined amount of seconds. I want to calculate the Qout/Qin for every cycle.
The calculations are easy, just a simple division...plus acquisition time is 1000ms so this shouldn't be a problem...
As for the data, I would like to both display them on an indicator and save them to a file but only the file is still a good option.