05-05-2011 02:04 AM
Hi,
I am in the process of constructing a small data display and analysis application. So far I can read the data in and choose which channels to plot on the x and y axis of a graph. I am now at the stage to produce some algorithms to apply transforms to the selected channels. The VI is attached as it stands currently, along with some sample data to read in.
The maximum number of channels is 16, but often there are far fewer (only 2 or 3). When I come to do the analysis, I only want to do it on the selected channels, not all 16. At the moment my code is not great because it still requires all the wires from the index array to the X-Y plot bundling.
I was thinking there must be a better way to do it - first identify how many channels I have selected (array size) and use this as the counter for a FOR loop just to execute that number of times. But that's where I get stuck - even then I will still end up with having to separate the 2D array into several 1D arrays to be able to get it into a format that the X-Y plot will accept. At the moment the way I see it it that the number of 1D arrays will still need to each have a bundle node and associated wires, and there will still have to be 16 of them for the case where all the channels are used.
I did think of using waveform graph/charts, but it will not always be a constant time step on the X axis - it could be a force-displacement plot or anything.
Surely there must be a better way and I'm just not seeing it!
Any help/advice is appreciated
Cheers,
Ian
Solved! Go to Solution.
05-05-2011 02:31 AM - edited 05-05-2011 02:31 AM
Hi Ian,
have you heard of AutoIndexing before? It makes your life so much simpler!
Btw. there also are functions like this hidden in the functions palette
05-05-2011 03:57 AM
Thanks Gerd - that's perfect. I knew there must be a way to do it...
Cheers for the heads up on the GetFileExtension VI too,
Ian