10-16-2010 08:41 AM
Maybe I built this wrong from the beginning, and that's why I'm confused, but here's what I've got...
I have a CompactDAQ system with about 50 channels. I created a task in MAX with those channels, with the timing set at N samples, samples to read = 100, and Rate of 1000 Hz. In LabView, that task is wired to an analog 1d waveform (multiple channels, multiple samples). The read is in turn wired to a Mean inside a For Loop, resulting in a 1D array. But what I really need is the ability to look at each waveform independently, so I can plot multiple channels on a waveform chart and also display each channel's value on an indicator. I had this working OK when I wasn't averaging (I had the read data going to index arrays, and then being split to a build arrays for the charts and Get Waveform Components and index arrays for the indicators).
How do I include the time variable and also split the channels when I average? Or am I approaching this from a completely inappropriate direction?
Thanks in advance.
10-16-2010 01:44 PM
HI
CAN YOU PUT THE vi?
10-16-2010 02:44 PM
I've attached a very small portion of the VI that I'm talking about. The task includes all the channels from the CompactDAQ hardware. The top section of the VI works the way I want it to. But what do I need to do after the averaging function in the bottom section to get the same type of chart and indicators?
10-16-2010 04:41 PM - edited 10-16-2010 04:42 PM
Coming out of the For Loop with the Mean VI inside of it is a 1-D array of doubles. (Because of the auto-indexing output tunnel.) If you want to break that up into different indicators, use an Index Array function there and expand it down so that it has 4 outputs.
10-17-2010 08:31 AM
Thanks RavensFan. But I still don't know how to get the time component back into it so I can plot waveform charts. I need to somehow retain that ability after the averaging.
10-17-2010 10:07 AM
There is a Build Waveform Components that acts like bundle by name where you can unbundle the time components from the previous waveform and bundle them back into the new waveform.
However, I'm not clear on what you are really trying to do. If you take a Y array and take the mean of it, you wind up with a scalar. So it really doesn't have a dT associated with it any more. And if it did, the dT is going to be a lot bigger because you averaged N number of samples into 1.
10-17-2010 10:52 AM
As I said in my original post, maybe I'm going about this all wrong. Looking at it in terms of the end result, I'd like my all my channel outputs to be first averaged and then made available for plotting (preferably a chart of time versus averaged values). That said, what's the best approach to accomplish this?
10-20-2010 08:14 PM
I think we are still unclear at what you are trying to accomplish. When you are trying to "average" the signal, are you asking for the overall average of the entire signal, a signal which shows the running average of itself up to that point, or a signal which shows the running average of the last N readings?
If you wanted the second option you could take Ravens idea and output those into Waveform Charts.