LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

store value obtained in while loop

Solved!
Go to solution
Highlighted

Hi,

 

I am acquiring data (1000 points every 0.1 s) in a while loop. I would like to calculate the y-mean of the first sample of 1000 points when I click on a boolean "calibrate", store this value somewhere (outside the while loop?) so that I can subtract it from each new y-amplitude. In the vi below, a new y-mean value is calculated in each loop, altough I would only like to use the first one.

0 Kudos
Message 1 of 3
(968 Views)
Highlighted
Solution
Accepted by topic author Ninjatovitch
You dont need to save the value outside the while loop. Keep the offset value when calibrate button is pressed and subtract the value with the acquired value.I modified your VI find the attached VI.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 2 of 3
(958 Views)
Highlighted

Hi Baji,

 

Thanks a lot for your help!

 

Best regards,

Ninjatovitch

0 Kudos
Message 3 of 3
(946 Views)