LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access array (which is neither control or indicator) into another case structure

Solved!
Go to solution

Hello everyone,

 

Problem Description:  I have a mutli-dimensional array named "Microphone Channel Array" , from which I am extracting "Channels" field values and inserting into an array label:" Insert Channel Into Array". It works fine.Now I want to use that array into another case structure. How to do it?

 

I am new to labview. Accessing variables is different from programming languages.Searched many forums for my question but was unsuccesful. So i decided to post my question, I hope i can get an answer here.

 

Please refer the below picture attached.

0 Kudos
Message 1 of 6
(3,212 Views)
Solution
Accepted by topic author Jagadeesh_1990

You will want to use a shift register on your outer loop.  Be sure to pass the values straight through in the cases that do not access the array.


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
Message 2 of 6
(3,193 Views)
Solution
Accepted by topic author Jagadeesh_1990

I think crossrulz answered this. 

 

But if you are worried about memory usage you can initialize an array before the loop and use Replace Array Subset.  I think that way may be a faster than the way you are doing it, but I'm not 100% positive.

0 Kudos
Message 3 of 6
(3,179 Views)
Solution
Accepted by topic author Jagadeesh_1990

JoeWork wrote:

But if you are worried about memory usage you can initialize an array before the loop and use Replace Array Subset.  I think that way may be a faster than the way you are doing it, but I'm not 100% positive.


Based on what I see in that picture, the OP should actually be autoindexing the channels out of the FOR loop instead of using the Insert Into Array.  It will be much for efficient and simpler.

 

Then they need to keep that array in a shift register in the outer loop so that it is available for all of the other cases.


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 4 of 6
(3,169 Views)

Thank you Joe. Your Answer was helpful Smiley Happy

0 Kudos
Message 5 of 6
(3,108 Views)

Thank you crossrulz. Your Answer was helpful Smiley Happy

0 Kudos
Message 6 of 6
(3,104 Views)