LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to input data into an array and call each element in order?

Solved!
Go to solution

Hello, I have been messing with creating a simple VI which can have an array with values in it for varying temperature. How can I make a loop which calls upon this array and each iteration will give the value of each temperature in the array? For example element one is 100K, two is 200K, and so on, I would like the VI to start at the first element, have the indicator tell me it is at 100K, next iteration 200K, and so on. I have tried to do this using array index; however, it seems to be calling upon the values within the elements and not the elements themselves. These values won't be the same for every use so it needs to be the element itself. 

 

I also do not know if there is a way to create a text file or something which I can type all the temperatures and have LabView create the array, if there is please enlighten me.

0 Kudos
Message 1 of 5
(4,090 Views)

On the very first page of the Forum, there are a set of links to various Tutorials, Videos, and other ways to learn LabVIEW.  I'm pretty sure that if you put in a few hours of your effort, you will be able to read out the values from an array one at a time.  You will even be able to put values into an array from, say, a text file ...

 

Bob Schor

0 Kudos
Message 2 of 5
(4,066 Views)

There is.

You could look at 'Read Delimited Spreadsheet', but I have no idea if that makes any sense as a solution for you.  If you post your code, someone may be able to help you better. Otherwise, we'd just be guessing.

0 Kudos
Message 3 of 5
(4,066 Views)
Solution
Accepted by topic author evg1990

Hi evg,

Welcome to the forums! Here are a couple links that should help you get started:

Auto-Indexing Tunnels with For Loops and While Loops in LabVIEW

Read Delimited Spreadsheet VI

 

Also, please do make use of the search feature. If you search for "index array loop" you will get ~3,000 results, some of which are bound to be helpful. Here is an excellent post written by Hooovahh that will tell you how to get better help, how to post code, how to tell others thank you, and some links to free training that I think you will enjoy.

 

Message 4 of 5
(4,048 Views)

Thanks for the response, I was overthinking this, I made them not auto-indexing terminals and was trying to use the index array function with a +1 index to achieve this which was giving me unexpected outputs. I also did not realize you do not need to define the number of iterations if auto-indexing. 

0 Kudos
Message 5 of 5
(4,005 Views)