ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mean of 5 data at a time

The first one is because you can choose which one from the array depending of the channel. Habitually it's a control that you chose on the front panel but for now I changed it for a constant. I wanted to reduce it later. 

 

The second one I didn't know how to do it. 

 

I have 4 channel and I want to combine the data and do a mean so I compare it on a graph with something else.

 

 

0 Kudos
Message 11 of 12
(404 Views)

@anickt wrote:

The first one is because you can choose which one from the array depending of the channel.

 


 

Yes, but its all from the same array so one "index array" is sufficient. It can be resized. If each index can differ, you would use a FOR loop.

 

altenbach_0-1652976535126.png

 


@anickt wrote:

The second one I didn't know how to do it. 

 


A good rule of thumb: If dynamic data is involved, there is probably a better, more efficient, and cleaner way. All these "to/from DDT" have hidden configurations that make their exact functionality completely opaque and impossible to reproduce from a picture. Too many unknowns.

 

If you have five channels, why don't you collect the data in a single 2D array instead of five different 1D arrays. Herding cats. 😄  <<20% of the code! 

 

altenbach_0-1652977531225.png

 

 

0 Kudos
Message 12 of 12
(395 Views)