ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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
(7,228 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
(7,216 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
(7,191 Views)
Solution
Accepted by 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
(7,172 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
(7,144 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
(7,140 Views)