LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous Time Averaging

Hi all,

 

I wish to do synchronous time averaging where the signal is acquired if the trigger function detects a rising pulse from a tachometer.

My problem is when I add the current signal and previous signal together, there is no signal output after the add function.

I'm using a shift register to accumulate signals for every iteration.

Can anybody help me in solving this?

 

Thank you.

 

Regards,

Hyin

0 Kudos
Message 1 of 6
(2,854 Views)

Hi Hyin,

 

adding something to an empty array results in an empty array...

 

You have to initialize your shift register (or use a case structure to handle the initial iteration). Right now your VI will start with an uninitialized (and thus "empty") shift register!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,849 Views)

Hi Gerd,

 

I thought when I add an array with an empty array will result in the array itself. How come it can become zero?

Can I know how to initialize the shift register? I try to add a constant outside of the loop, but it doesn't work as well.

 

 

0 Kudos
Message 3 of 6
(2,847 Views)

Hi Hyin,

 

adding arrays with different size (=length) will result in an array with the smaller size of both the input arrays, so adding with an empty array will always yield in an empty array...

 

You should use a case structure to avoid adding in the first iteration!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,843 Views)

Hi Gerd,

 

I add a case structure to pass the signal out when the iteration number is zero, and add the signal when the iteration number more than zero, and it works well.

Now I can do time averaging alrd.

Thank you very much!

 

I wish to ask one more question.

I tried to use the "time averaging function" in the signal express before and it doesn't do the right averaging. I mean it doesn't synchronize the signals when it perform the averaging.

Do you know why? 

0 Kudos
Message 5 of 6
(2,837 Views)

Hi Hyin,

 

I don't use SignalExpress, maybe you should ask in that forum?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,835 Views)