LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array --indexing

Solved!
Go to solution

I have an 1D array with 20 elements ..I now want to put all 20 elements in 20 different indicators(variables) for further processing each indivually ....Index array function is too tiny miny and ugly while creating this..any simpler way??

0 Kudos
Message 1 of 13
(3,778 Views)
Solution
Accepted by topic author ebuckbuck

So is this too much work?  I don't understand the question.

 

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 13
(3,770 Views)

Thanks aptman ..but my whole point was to circumvent this approach as the array size just keeps changing after every parse operation in my app..but thanks anyway ...:) 

0 Kudos
Message 3 of 13
(3,766 Views)

You didn't say the number of elements changed.  You said 20 elements.  Can you not just display the elements in an array indicator?  What do you want to do with the values from the array?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 13
(3,764 Views)

Don't even need the ints on the index - first defaults to element zero, each following index increments by one. 

 

Guess the question I have is ... why?  What's wrong with an array indicator on the front panel? 


If you ever want to add an element in the array, you'll have to add more code and connect another indicator to the index-array. 

 

Keep arrays in an array, and pluck out individual values as you need them.

0 Kudos
Message 5 of 13
(3,759 Views)

Thanks all ...

Well individual values are needed because its different words of the serial data frame and then they are parsed individually as elements have dependencies amongst them .Ex MS 3 of element 2 decides how element 4 will be parsed..So needed individual control ....

Now for every parse function ..All elements are needed(different cases based on output of element 1 and there on ) ..

...

Thanks once again ...so far I was using the array index function only ...but it requires fine tip mouse skills!!

0 Kudos
Message 6 of 13
(3,749 Views)

@ebuckbuck wrote:

Thanks all ...

Well individual values are needed because its different words of the serial data frame and then they are parsed individually as elements have dependencies amongst them .Ex MS 3 of element 2 decides how element 4 will be parsed..So needed individual control ....

Now for every parse function ..All elements are needed(different cases based on output of element 1 and there on ) ..

...

Thanks once again ...so far I was using the array index function only ...but it requires fine tip mouse skills!!


NO. 

There's no need for individual control, just use the wire. 

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 13
(3,728 Views)

@SnowMule wrote:

Don't even need the ints on the index - first defaults to element zero, each following index increments by one. 

 


Thanks SnowMule.  I did not know that.  Learn something new every day. Smiley Very Happy

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 13
(3,707 Views)

aputman wrote:
Thanks SnowMule.  I did not know that.  Learn something new every day. Smiley Very Happy

 

 

Just make sure you document what's going on when you do this. 

Message 9 of 13
(3,700 Views)

Thanks a lot Snowmule ...

Just a basic question is how do align multiple items on left and right so beautifully. When I try doing it they spread all over and align elemts and distribute elemnts in edit tab messes it even further. 

Is there any auto way to it??

 

Thanks

 

0 Kudos
Message 10 of 13
(3,684 Views)