LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with VI

Having problems troubleshoot this VI any suggestions?

 

Create a new VI where temperature data, created with the Simulated Temperature
(deg F).vi in the Activity directory, is displayed on a strip chart. Compute
and display the running average of the temperature data.

 

 

0 Kudos
Message 1 of 14
(4,475 Views)

What problems are you having?

 

I'm suspicious of your loop that implements the running average.   Did you look at Mean Pt by Pt?

 

And what is the definition of running average?  (The average of all you've ever taken?  Or the average of the last N number of samples as you progress?)

 

 

0 Kudos
Message 2 of 14
(4,455 Views)

The running average is what Im having trouble with

0 Kudos
Message 3 of 14
(4,447 Views)

What is your definition of running average?

 

What are you getting versus what are you looking for?

 

Until you define the problem, it is difficult to find the solution.

 

0 Kudos
Message 4 of 14
(4,445 Views)

I'm looking for the average of the last N number of samples as you progress

0 Kudos
Message 5 of 14
(4,439 Views)

Then look up Mean Point by Point.

0 Kudos
Message 6 of 14
(4,422 Views)

Also take a step back and do a fea simple tutorials:

 

  • "delete from array" is not the correct function to get an array subset.
  • A "running average" is a scalar, not an array
  • Your inner FOR loop makes no sense
  • You inner while loop makes no sense
  • You need to define the loop rate. No need to spin as fast as the computer allows.
  • For a running average, you also need to define the history size.

 

Message 7 of 14
(4,384 Views)

Also, next time use a more specific subject. Almost all questions her are about "help with VI". You could have said "help with running average", for example.

 

To explore and compare many way of doing a running average, have a look at our presentation (part II) where I explore various ways of doing exactly that.

 

Here's how a 10 point running average could look like:

 

10ptaverage.png

0 Kudos
Message 8 of 14
(4,375 Views)

How do you connected the "equal to zero" to the "mean," as well as where did you find the bundled DBL and waveform blocks you used? Would you mind attaching the VI in the screen shot?

0 Kudos
Message 9 of 14
(4,365 Views)

@gigocackirovski wrote:

How do you connected the "equal to zero" to the "mean," as well as where did you find the bundled DBL and waveform blocks you used?


It is mean ptbypt, not mean. Big difference!  (find it in the signal processing... point by point...  probability&statistics palette). You already know the word "bundle", so I guess you know where to find it. I am not sure what you mean by "block", but the terminal wired to the output is just the chart. It will turn brown automatically once you connect a cluster if the right type.

0 Kudos
Message 10 of 14
(4,346 Views)