LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

signal average

Solved!
Go to solution

Hi guys,

 

thank you all for the help so far, I'm getting closer to solution but need some more help. I'm trying to get average value of my signals (I named them signal and field) and show them on x-y graph. Here https://decibel.ni.com/content/docs/DOC-32883 I've found two ways how to do that, one using the for loop and the other using the shift register which is optimal in my case but doesn't work. I don't know how to solve this so I'll appreciate any suggestion. 

I'm using LabVIEW 8.5, and here is my VI.

0 Kudos
Message 1 of 3
(5,559 Views)

Wow -- not only didn't I understand what you were trying to do with your code (I never use the DAQ Assistant, and stay as far away from the Dynamic Signal Wire as I possibly can), but when I tried to open the Assistant to see how it was configured, it locked up my machine (I had to get Task Manager to kill the VI, the Assistant, and then I manually stopped LabVIEW).

 

I don't know why the process of averaging waveforms would be difficult.  Conceptually it is simple -- you add some number, N, of Arrays together, then divide by N.  If you are accumulating the Average, you keep a running Sum and a running Count (N) of how many are in the sum.  At step N+1, you add the latest Array to the sum, increment N (to N+1), divide, and there's your updated average.

 

For me, it is much easier to do arithmetic with the Array component of a Waveform than to mess with Dynamic Wires.  Try rethinking what you are doing.  It should be very simple to implement the (simple-minded) algorithm I just described ...

 

Bob Schor

Message 2 of 3
(5,544 Views)
Solution
Accepted by topic author HrvojeM

Hi Bob_Schor,

 

I would like to thank you for your help and let you know that I solved the problem with the big help from RyanPoPo. You can see our correspodence here https://decibel.ni.com/content/docs/DOC-32883#comment-46980

 

Best regards,

HrvojeM

0 Kudos
Message 3 of 3
(5,440 Views)