LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting array elements

Solved!
Go to solution

Is it possible to use the Array Elements to be used for other operations?

I am looking for a program to extract values from each Elements of an Array and that to be used as an Input for other operations so that i don´t have to type in each value while the program is running.

I am new to LabVIEW. kindly help.

 

 

0 Kudos
Message 1 of 6
(5,085 Views)

Yes.  It is called Index Array.

 

If you want to do something with each element of an array in a loop, then you use Auto-indexing tunnels.

 

If you aren't familiar with these then I would recommend you learn more about LabVIEW from here. How to Learn LV

0 Kudos
Message 2 of 6
(5,073 Views)

Yes. I have done index array and i have got the values being displayed one after the other. My query is how to use those values for further operations.
I am trying to tinker with a huge program which is why I am not attaching the file.

I will try to explain the situation better. lets say i have to put waterpressure and air pressure values as input for a nozzle spray systems. there are already predefined pressure values which needs to be put. what i need is i type the values at first and when i press start these values from the array should be taken as input for the pressure values one after the other which will be used for further processing. I hope i have made it clear.

0 Kudos
Message 3 of 6
(5,048 Views)
Solution
Accepted by topic author safskm

And that is where you can use auto-indexing tunnels.  It will take each one in turn for each iteration of the loop.

 

Example_VI_BD

Message 4 of 6
(5,029 Views)

Thank you. This is what i was looking for.

 

One more query though. How am i to take those values from the string for further operations? for example i want to add those values which are displayed from the array. i have two arrays and i am indexing them so that the elements are displayed one by one. next is I want to add these values which are being displayed from the two arrays.

0 Kudos
Message 5 of 6
(5,001 Views)

Hi safskm,

 

use an Add operation.

When you use string arrays you need to convert the string content to a numeric datatype - or you use the ConcatString function instead… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(4,997 Views)