LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Cluster from Array of Clusters on an Event

Solved!
Go to solution

Hello,

 

I am new to LabView and require some assistance from you experts. I am  working on a data Acquisition Project, and I basically have a UI that allows the user to put in the number of channels they wish to use. they can then click on the Next Button and that adds a new cluster to the array. what i am struggling with is, if the user decides to change the channel size , to a number less than that of previous value, i would like to delete the extra clusters from the array and move the cluster to the index of the current value (of Total Channels).

 

For example if the user inputs 10 and is configuring channel 9 and decides to change the total channel number to 5, i would like the cluster to go to that index.

 

Hopefully my VI will make sense more.

0 Kudos
Message 1 of 2
(1,681 Views)
Solution
Accepted by topic author PGgautam1

@PGgautam1 wrote:

if the user decides to change the channel size , to a number less than that of previous value, i would like to delete the extra clusters from the array and move the cluster to the index of the current value (of Total Channels).


You can just use Reshape Array with the size to the length your user inputs.  This takes care of increasing an decreasing the number of channels.  And when you change the size, use Max & Min on the new size and the current index, keeping the Min value to set the new index.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(1,664 Views)