From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make VI scalable?

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 3
(2,231 Views)
Solution
Accepted by topic author ianhaigh

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 Smiley Wink

Best regards,
GerdW


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

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

0 Kudos
Message 3 of 3
(2,209 Views)