LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Avarage calculation with labview

Solved!
Go to solution
Hello everybody
 
i have labview 8.5 with an NI cDAC-9172 on the cDAC i have 4 pt100 thermometer (rtd)
 
and i have also one big problem i hope somebody can helb me
 
i have 4 themometer wich function and are wired to my cDAC-9172
 
i must create e program on labview which:
- shows me every second the actual temperature of the 4 thermometer
- take every second the actual temperature save it (for 60second=1minute) and then calculate the avarage temperature of the minute (all datas for 60second sum up and then divided with 60) this avarege temperature must then be saved in a ecxel sheet...im sorry for my bad english i hope you have understand all,,,,you took from each thermometer the temperature for one minute (every second) the temperature then you divide it with 60 and you have the avarage temperature from the last minute for each thermometer this avarage temperuter should be saved in a excel sheet
 
 
WHY do i make such a complicated thing???
i do it because i wanna see every second on the pc the actual temperature but then i will not store a lot of datas,,,,,it suffices when i have the avarage temperature of a minute for a long measurment (over hours) in a excel sheet....
 
 
WHAT have i done till now???
With the DAQ-Assistant i take the signal (dynamic data type) and with the VI "1D-Array dezimate" i can show all my 4 temperatures (in real-time; every second; 1Hz) on the frontpanel!  now i took a for loop which should take each temperature for one minute long the it should sumed up and divided through 60 to give me the avarage temperature but it dont function??? can somebody help me?
0 Kudos
Message 1 of 28
(5,013 Views)
You need to take your temperature in the for structure, cause what you do in your your vi, it just to make 4 array where you have 60 times your 4 temperatures and after you divide per 60, you will have your temperature at 1 time.
 
But if you take the temperature in the for structure, for each iteration you will have different values of temperature in your array.
 
I hope that you understand me Smiley Indifferent
0 Kudos
Message 2 of 28
(5,003 Views)

i do a picture to see what i say, In your vi, the for structure is useless.

If your signal have just 4 temperatures you can have them like this

 

I hope that will be help you

0 Kudos
Message 3 of 28
(5,000 Views)
mioumiou thank you very lot i will try it and the let you know thank very lot
0 Kudos
Message 4 of 28
(4,997 Views)
fantastic mioimiou thank you a lot
0 Kudos
Message 5 of 28
(4,947 Views)
happy to see it's work for you  Smiley Happy
 
If you have another difficulty, come to ask
Message 6 of 28
(4,943 Views)

hi friends

i have a new problem,,,:-) ive already finished my program but i have one problem...when will finish my measurment i push the STOP button but it doesnt stop directly,,,it takes 1:30minutes til the measurment finish,,,,why??? the button is not in the "for Loop" it should stop immadiately.....

0 Kudos
Message 7 of 28
(4,879 Views)
Hi- As the For loop is in the While loop, each time it (the for loop) finishes, the while loop will start again if the Stop button is not already pressed. If you press the Stop button while the For loop is executing, the while loop won't read the new value until the for loop finishes. If you need it to stop immediately when the button is pressed, you can add a conditional terminal to the for loop. Move the Stop button into the for loop, and wire it to both the conditional terminal of the for loop and the while loop (making sure to disable auto-indexing). It's early, and I may not have made it as clear as I wished, but I hope this may help! Cory
-Cory
Message 8 of 28
(4,856 Views)

Hi ago,

your while loop can first stop if all code inside is ready.

Mike

Message 9 of 28
(4,854 Views)

Because the button is not in the for loop, it cannot stop immediately. The for loop has to finish and then the stop condition will be processed. Right click on the for loop and select Conditional Terminal. Place the stop button inside the for loop and wire it to it's conditional terminal and wire it through the for loop to the while loop's terminal.

 

Message 10 of 28
(4,849 Views)