LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to extract an element from a 1d array generated inside a while loop

Solved!
Go to solution

Dear All,

              Im new to labview. I have been assigned the task of creating the program for plotting certain parameters for my lab. I created a program for interfacing keithley 2636b sourcemeter that will help me source voltages in a range and get the current and resistance as well as plot them. I used a simple while loop for that. My problem is this. I need t extract the nth element from the array created for resistance after each measurement and save it to an array. I need to do a resistance measurement several times one after the other and saving the nth element each time from those individual arrays and push it into a buffer so that i can plot the elements in the buffer against a parameter(This is called a TLM measurement) . I tried several methods. Some nice guy/gal had posted a solution using for loop to extract an element. Its not working in my program as i have to use a for loop within my while loop and its not giving the correct value. Kindly advice. Im in much trouble. Help!

0 Kudos
Message 1 of 5
(3,841 Views)

Hi Kim,

 

traditionally one would use the index array function to get a certain element from an array.

 

In your program you appear to just be acquiring one value per iteration, so which array do you want to extract the value from? Your code is a bit of a mess tbh, but I suspect you want to be looking at 2D arrays or arrays of clusters as well. 



Remember Cunningham's Law
0 Kudos
Message 2 of 5
(3,832 Views)

Hi Peter,

            I know its a mess. I have been tryiing many things so someof the unwanted things are also there. Regarding the array, I want to extract an element from the 'R' array (Resistance array).. You can easily understand if trace back from the R-V graph block. Thanks!

0 Kudos
Message 3 of 5
(3,821 Views)
Solution
Accepted by topic author kim!

And indexing doesn't work?

 

Why don't you read about 2D arrays and arrays of clusters and try to make your code "readable" with that?

 

Also there are a lot of resources available online:

3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products



Remember Cunningham's Law
0 Kudos
Message 4 of 5
(3,811 Views)

Indexing worked!! I dint know about indexing.. Thank you soo much! Im sorry im a newbie in this

0 Kudos
Message 5 of 5
(3,805 Views)