From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview help with arrays, clusters, and variants

Hello,

 

Need some help, there are too many things that I do not know where to start.

 

I have a multichannel system (meaning one measuring system with one, lets say, a power supply, a switch, many resistors, and one multimeter).

I want to make all the channels sequencial measurements with the switch going by all channels (assume 8).

 

Instead of having a work area of the 8 channels repeating the same thing, I want to bundle stuff (parameters, some reference measurement for some later calculation), and select them to send to a single channel measuring step.

 

In the picture I am showing the channels (in this example 8), and for the DUT name, an array with the string names. I could select the name of the sample with the Index Array if I place it on the for loop (same for other 1 dimensional parameters).

 

But assume now that I want to measure an V-I curve for a reference resistor (to normalize measurements or correct for different switching channels). I will be taking a set of values that I will be using to normalize the data. That is I have a vector of n points length.

 

How I do the same thing for the nx1 arrays that I want to bundle and then selectc?

 

Thank you very much,

 

Gaston

 

Question.png

 

Question2.png

0 Kudos
Message 1 of 7
(1,960 Views)

Bundle each array into its own cluster.  Then Build an Array of those clusters.

0 Kudos
Message 2 of 7
(1,920 Views)
  • Are you sure an I64 datatype to hold the number of channels is reasonable? (Do you really have more than a few billion channels??? Did you notice the coercion dot? the FOR loop expects I32 for N)
  • Index array with the index wired to [i] is about the same as autoindexing. (with some important exceptions).
  • Sorry, I did not get your real question. Too confusing! Can you attach some code (instead of a picture) and use the control labels in your problem description (e.g. what are currently "string names", which one is "vector of N points", where is the "nx1 array"? etc.))
  • Your subject mentions "variants". Where are they?
0 Kudos
Message 3 of 7
(1,910 Views)

1. Integer, if is I64 does not make a difference if is i8;

2. I been using Labview since 4.0 version where everything use to be wired. Then, last 10 years have not used it. So I may not be using all the new stuff available, like the autoindexing;

3. The code is what I show, literally;

4. See picture from Labview help. I got there from some help topics that lead me there.

 

Variant.png

0 Kudos
Message 4 of 7
(1,866 Views)
  1. It is best to use the native datatype, which is I32 for N. No need for glaring coercion dots.
  2. I've been using LabVIEW since 4.0 and auto-indexing was available. (In fact autoindexing was there from the very beginning, see the LabVIEW 1.2 manual :D)
  3. A picture is never "code" because we cannot see the important details (e.g. the values and the lengths of the various arrays, etc.)
  4. Yes, but your post never mentions variants. I could not see the connection. Are you looking for a variant based solution?

 

I am willing to help, but there is insufficient information to even try....

0 Kudos
Message 5 of 7
(1,858 Views)

Hello,

 

1. I am a physicist using Labview to capture data, not programming Labview full time, so I do not have gone that deep. The I64 was default, I did not select it nor correct it;

2. Never saw it before. I am aware now;

3. The important details are irrelevant in this case. The arrays today are 2^11 points long (2048 measurement point, until I find the time to trim them), with DBL or EXT data representation.

4. Variants are in the title, because browsing a solution to my problem I stumble on this category that I never used before and the help is useless. I am not looking for a Variant based solution, I just want to do what I shown for the strings (that is, run a bunch i.e. 8, of measurements in sequential fashion, and use a reference to normalize data).

 

 

0 Kudos
Message 6 of 7
(1,845 Views)

Build the ref arrays into a 2D array and autoindex at the loop boundary. You get one 1D array per iteration.

 

I assume the string array also has 8 elements. 

 

Autoindexing will loop until it runs out of elements, no need to wire N at all.

 

There is no A/D converter with so many bits that you require EXT. That just slows you down.

0 Kudos
Message 7 of 7
(1,833 Views)