LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average Column From Array of Cluster

Solved!
Go to solution
Highlighted

Hey everyone,

 

I needed some help with a project I'm working on. So I'm using DAQmx to read counter data on a NI 9361 module. From there I want to determine if the frequency measured is within a certain range or not. I have the basic idea figured out so far. The part I am having a hard time with is selecting just the frequency data from the DAQmx read data. It is giving me an array of two clusters (one for duty cycle and one for frequency). I wanted to separate the frequency data from that array and average it. Any help on doing that? I've attached the VI and some screenshots.

Download All
0 Kudos
Message 1 of 3
(184 Views)
Highlighted
Solution
Accepted by topic author Cannon_Controls

@Cannon_Controls wrote:

. The part I am having a hard time with is selecting just the frequency data from the DAQmx read data. 


You can extract the frequency array using a FOR loop as follows:

 

altenbach_0-1594448015767.png

 

Some other suggestions:

 

  • never hide the labels on the diagram or have terminals without labels.
  • One of your big case structures can be deleted without any change in functionality
  • Your VI uses 100% CPU while doing nothing e.g. if :start has not been pressed yet.
  • Your inner stop button has the wrong mechanical actions. This also eliminates the local variables if done right..
  • The contents of both cases of your error case structure are identical. What's the point?
  • Why do you need all these useless extra decimal digits for some of the diagram constants?
  • Your VI cannot be stopped, just aborted.
  • ...

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 3
(118 Views)
Highlighted

Thank you for your help on the question and the additional feedback. It was all very helpful.

0 Kudos
Message 3 of 3
(72 Views)