Build array element labeling

Hello,
  I am using the build array function to make a large boolean array. How can I have the element positions labeled so that I can easily determine what bit in the array I am connecting to?
Regards,
Kaspar
Regards,
Kaspar

You didn't mention that in your problem statement.  Also, you mentioned you're using Build Array.  Are you interested in knowing the terminal position on the Build Array that you're wiring to?  There is currently no way to do that, as they all have a name of "element" when you hover over the Build Array with a tip strip.  How many values are you wiring to your Build Array, anyway?  If there are so many that you can't keep them straight without labels, perhaps there's a more elegant way to deal with the code?
If not, though, perhaps you could include a decoration on the diagram separating every 5th element that could help you more easily determine what position you're at with the build array:
-D
Message Edited by Darren on 05-23-2007 03:09 PM
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Attachments:
build_array_dec.png ‏9 KB

Similar Messages

  • Error in file export when order of elements in build array changes

    Hi everyone,
    A while ago I wrote a vi file which does the following:
    At first it initializes a camera and chooses a region of interest (ROI). Data out of the ROI will be discarded.
    Then it raster scans a motor stage in x and y direction, in bidirectional mode (meaning that x alternates between scanning from left to right and right to left as y is inreased).
    For each point of the scan, the spectrum is collected, which is then integrated in lambda to give an idea of the total intensity.
    Then the intensity is plotted, along with the spectrum at each point.
    The final results are exported in a text file.
    The problem:
    If I flip the order of the wires in the "build array" before the file export, placing the Total Count (intensity) wire in place of the Spectrum wire, the file export fails. What I mean by "fails" is that the .txt file contains characters that look like chinese!
    Why is that?
    I attach my .vi as well as two screenshots which demostrate the problem.
    Solved!
    Go to Solution.
    Attachments:
    correct.png ‏182 KB
    Wrong.png ‏180 KB
    1.7z ‏119 KB

    mikeporter wrote:
    Hey Jeff... The changes you recommend are all good (and necessary) but the thing I'm stuck on is that regardless of what happens to the floating point data, there's that built-in VI that changes it to string representations of the numbers. And as I understand it, that is where the problem is.
    Mike...
    PS: Coming to NI Week?
    Not this year
    What scared me was the sgls on a SLs with no wire branch to force a data copy which, would force LabVIEW to preserve the sgls since the SL might need to be used again then, they get all mixed up building arrary out of mixed coerced sgls and dbls.  With the potential of a miss-reussed buffer (not uncommon in 2011) confusing the string operations in the write to spreadsheet.   The problem of course, must exist outside of write to spreadsheet file since it only exhibits with a build array element order change.  Or, we all are halucinating (Possible alternate theory)  
    Jeff

  • Label TS array elements from LV

    Hi,
    How can I change the Label of a TS array element from my LabVIEW code??? Se picture added.
    It is done when you insert at ”Multiple Numeric Limit Test” step in a test sequence and select “Edit Limits…” you get the “Edit Multiple Numeric Limit Test” dialog box. When this is closed with OK the Names of the Measurement Set is applied to the elements in Step.Result.Measurement. How can I do this from LabVIEW???
    I am looking forward to hear from you.
    Best Regards,
    Morten Pedersen
    CIM Industrial Systems A/S
    Attachments:
    ArrayElementsNames.jpg ‏98 KB

    You can access the name of an object by using ActiveX to get to the step's Property Object. Once there, you can use a property node for the name and change it to write.
    Let me know if you need more information about this.
    Regards
    Anders M.
    National Instruments DK

  • Build Array keeps name of the last element but not the others. Workaround?

    Hi there,
    Sorry if this has been posted before, I did the search first but did not find anything.
    Problem is that I have two setups that are identical and need to be controlled from a single vi. Since they are the same they are configured with the same sets of parameters so I decided to create a cluster of these and then build an array of the clusters. This way I need to only use one wire and if I need a given parameter I can easily get it from there (or so I thought) and also since I need to see if anything changes I can compare one wire instead of each one of the parameters.
    The gui has the list of parameters then in the block diagram I bundle them appropiately, using "Bundle by Name" and then each bundle into an array using "Build Array". Problem arises when I index the array for the first setup and the use that to unbundle the parameters I need, using "Unbundle by Name" (though if I use "Unbundle" the same happens)and lo and behol, the ouput names are from the second setup, not the first.
    Here is the curious thing though, even though the names are all wrong the values are correct. I could live with this but it is annoying plus it will make another user very hard to understand the diagram plus this is just a proof of principle to test with two, eventually there will be eight or even more and that is going to get really confusing.
    Is there a way around this? Even if it is to change the names after unbundled.
    Check the attached vi to see what I mean.
    Solved!
    Go to Solution.
    Attachments:
    Test Build Array Names.vi ‏11 KB

    I think you are forgetting an important point about arrays.  The only thing that can be different between each element of an array is its value.  The array elements must all share the same properties.  So that would include the names of the individual elements that make up the cluster that is an array element.
    It appears that the last cluster that gets built into the array is the one that defines the names of the elements that are within the cluster element.  You either need to give all elements of the array the same names within the cluster.  Or use a cluster of clusters instead of an array of cluster to build your data structure.

  • Why won't all the array elements display?

    Hello,
    I am trying to learn about manipulating arrays.  The example finder includes this one," build array_forum.vi", which shows the two modes, concatenate and append, which I can understand, HOWEVER, I cannot figure out how they built this vi.  For example, I can find the Build Array function, but, I cannot understand how they created the "array of numeric data 1"  "array of numeric data 2"...etc, and I cannot find the functions on the palettes that result in the display "build array concatenate inputs".  Where are these blue functions????
    Where are these functions found on the palette, and how does one construct them like this?
    The other vi shown here, "for loop array_forum.vi" is my attempt to duplicate it, but, it does not show all the elements of the array; instead it displays only ONE element, the last element of the array.  How do I display all the elements of the array I am trying to create using the FOR LOOP?  Am I doing something wrong with the FOR LOOP?
    Thanks,
    dave
    Solved!
    Go to Solution.
    Attachments:
    Build Array_forum.vi ‏12 KB
    for loop array_forum.vi ‏7 KB

    Hello Tim and Nilquist,
    Thanks for your help.  Let me re-state my question.  I have studied the Labview basics, and I understand about REPRESENTATION, data types etc., but, take a look at the attached vi.  In it, I have added an indicator, and the indicator I have added is called ARRAY by default, and it is the shape of a large box.  The original indicators in the original example are small boxes are labelled I-32.  Where did the original indicators come from?  Is my indicator identical to the original ones? I am using LV2011 basic.
    Thanks,
    DAve
    Attachments:
    Build Array_forum_2.vi ‏12 KB

  • "In initializer for 'mxmlContent', type Object is not assignable to target Array element type..."

    Hi all,
    So I've have built an application on flash builder 4.5 using Christophe Coenraets' tutorial "Building an EmployeeDirectory" (http://www.adobe.com/devnet/flex/articles/employee-directory-android-flex.html#articlecont entAdobe_numberedheader).
    I'm getting this error message "In initializer for 'mxmlContent', type Object is not assignable to target Array element type mx.core.IVisualElement." and then the debugger highlights my code this line of my code "</s:List>" in my EmployeeDetails.mxml file. This started after I coded Part 5, Step 2 "Integrating with the Device Capabilities: Triggering the Actions".   The rest of the code debugged fine.
    I think it relates to Christophe's note "Note: Make sure you import spark.events.IndexChangeEvent (and not mx.events.IndexChangedEvent) for this code to compile.".  I don't know where to place this
    " import spark.events.IndexChangeEvent;" line of code. 
    Any help?  Tks in advance..
    Any help would be greatly appreciated.  Thanks

    You have a DataGrid directly inside a State element. Perhaps wrap it in an AddChild element?
    More information on using states can be found here:
    http://livedocs.adobe.com/flex/3/html/help.html?content=using_states_1.html

  • How to avoid Build Array function inside a For (while) Loop?

    Hi there,
    I have a simple question about how to avoid using Build Array function inside the loop. Now I want to remove the Build Array funtion inside the loop to improve the performance (To get better memory management). Any idea how to do that?
    Thanks a lot!
    Warmest regards,
    Chong

    It's been my experience that using the auto-indexing to build an array
    on a For loop is just as good as initializing and replacing elements.
    The For loop knows before it runs how many iterations it has to run and
    can allocate the array ahead of time.
    You're better off initializing and replacing when using a While loop
    because it does not know how many iterations it will run and can't
    pre-allocate the array ahead of time.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Is it possible to create a 1 D array with the "build array VI"? when receiving random number

    Hello all,
    Is it possible to create a 1 D array with the "build array VI" when receiving random number?
    I am receiving random data and the build array VI always create a 2D array which might cause some problem if you want to compute certain type of operation after.
    Any example will be welcomed.
    Thank you,
    Israel 

    Hello Lynn and Yamaeda
    First I want to Thank you Lynn for your linguistic contribution indeed "Build Array" is a primitive and not VI, thank you for the education. In reality what I am doing is simple.
    I have two arrays of complex elements Array1 and Array2.
    Array1 conains the complex elements ""(a0+ib0) ; (a1+ib1) ;...(an+ibn) ;
    Array2 conains the complex elements ""(c0+id0) ; (c1+id1) ;...(cn+idn) 
    What I want to do is the multiplication of the first array by the  conjugate of the second array element.
    Array1*(Conjugate Array 2)" for the first element the results is "(a0.C0-b0.d0) + i(b0c0-a0d0)" and the etc...
    and then taking the square root ([(a0.C0-b0.d0) power of 2]) +  [(b0c0-a0d0) power of 2])
    I was wondering if there were some dedicate primitive that could solve the computation above which is the cross correlation in Frequency domain.
    Thank you very much.
    Israel

  • How do I access array elements in one method from another method?

    Hi all!
    How do I access the array's elements from another method so that method 2 can have access to method 1's array elements? Thanks for any help!
    I am trying to create a simply program that will use a method to create an array and a SEPARATE method that will sort the array's elements (without using java's built in array features). I can create the program by simply having one method and sorting the array within that same method, BUT I want to sort the array from another method.
    Here's my code so far:
    public class ArraySort {
       public static void createArray(int size){
           double myArray[] = new double[size];    //create my new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);   //fill the array with random numbers
       public static void sortArray(){
           // I WANT THIS METHOD TO ACCESS THE ARRAY ELEMENTS IN THE METHOD ABOVE, BUT DON'T KNOW
          //  HOW???? Please help!
        public static void main(String[] args) {
            createArray(4);    //call to create the array
    }Thanks again!
    - Johnny

    Thanks for the help all! I ve managed to get the program working, using java's built in array sort, but when i try to call on the array sort method from WITHIN my main method, nothing happens!
    Can somebody please tell me why I am not able to call on the sort method from within my main class???? Thanks!
    public class ArraySort {
       public void createArray(double[] arrayName, int size){
           double myArray[] = new double[size];  //create new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);    //populate array with
           }                                                 //random Numbers
           sortArray(myArray); 
       } //Sort array(if I delete this & try to use it in Main method --> doesn't work???
       public void sortArray(double[] arrayName){
           DecimalFormat time = new DecimalFormat("0.00");
           Arrays.sort(arrayName);      //sort array using Java's built in array method
           for(int i = 0; i <arrayName.length; i++)
               System.out.println(time.format(arrayName)); //print arary elements
    public static void main(String[] args) {
    ArraySort newArray = new ArraySort(); //create a new instance
    double myArray[] = new double[0]; //create a new double array
    newArray.createArray(myArray,4); //build the array of indicated size
    //newArray.sortArray(myArray); //This will not work???? WHY?????//

  • Problem with building array inside a case statement

    I have a problem with my build array.
    Iam trying to construct a build array when ever I see a new element in my parent array during run time.
    Using shift registers, search array and If- case structure, inside a while loop. Iam implementing this logic (I dont want to use Event structure).
    Iam able to achieve most part of it, but have a problem with the first element. Except the first element of my parrent array, every thing is appending in to the build array. Can any one look at my vi and suggest me what Iam doing wrong here.
    Thank you
    Attachments:
    debug.vi ‏12 KB

    I think you need to replace the tunnels (carrying the array) in the for loop with a shift register.
    Lynn

  • Using a For Loop Index for Array Element Number?

    Hi.  Thanks in advance for the help.  I can't seem to find what I want to do here using the search function... probably because I don't know how to frame the question appropriately.  Ignore the title to this post cause it's probably wrong vocabulary for what I want to do.
    Here's the situation:
    I have a 2D array where the first column is the X data and each subsequent column is Y data (call it Y1...Yn).  The n-value varies from run to run (some runs have 4 columns of data, some have 20), but that is easily gathered when reading the data file.  I need to perform a number of operations on each set of data, the least of which is smoothing the data and graphing it, so I'm limiting my discussion to these 2 operations.
    What I want is a for loop structure where the indexing of the loop tracks the Y1...Yn columns, grabs each column for the iteration, performs the relevant analysis, and spits out the result, but in a stackable manner.  Thus the title; I want to use the for loop's index to mark the array element for building a new array.
    See the image attached.  A 2D array of 9 columns (X, Y1...Y8) is analyzed such that each data set, (X, Y1), (X, Y2)...(X, Y8) is bundled, graphed, run through a B-spline Fit, of which is also graphed.  I need to replace this with something that looks like the for loop structure shown.  
    I just don't know how to get those two data bundles [(X, Yi) and it's smoothed pair] out of the for loop in a stacked set from every iteration of the for loop.
    Again the title, I think I want to build a new array where i use the index of the for loop to control the entries of the new array.  But I can't see how to do that.
    Any help would be appreciated.
    Attachments:
    NeedForLoopForThis.PNG ‏30 KB

    Hello H.R. Dunham, and welcome to the forum!
    It seems that you may be looking for Auto-Indexing, a basic feature of loops in LabVIEW.  You'll need to transpose your array before wiring it into the for loop, as elements are auto-indexed by row before column, but at that point you should be able to operate on each column and output an array of n cluster elements corresponding to your input columns.  Auto-indexing tunnels look like brackets to indicate each element will be indexed automatically- this should be the default when wiring an array into a for loop or when wiring anything out of a for loop.
    As for how to build your pairs, I suggest removing the X column and creating a "starter" cluster containing your X data and placeholder Y data before entering your "Y" processing loop.  Use the bundle by name function in the for loop to insert your processed column data into the cluster and auto-index the cluster output. Flow would be something like this:
    1) Gather data
    2) Split X and Y using standard array operations
    3) Create "template" cluster with shared X data
    4) Pass template cluster and Y-column array into an auto-indexed for loop.
    5) Insert processed Y data into cluster inside loop.
    6) Auto-index cluster data out of loop.
    This tutorial is probably also a good place to get started:
    Getting Started with NI LabVIEW Module 3: Loops
    http://www.ni.com/white-paper/7528/en/
    Hope that helps!
    Regards,
    Tom L.

  • Running Average of a 2D array element-wi​se

    Hello all,
    I am having trouble approaching this problem. I have a sub-VI which outputs a 2D-array for each iteration of a while-loop. This is spectroscopic data set where the first column is the time value and the next 32 columns are intensities from the array detector. RIght now I am fine with just figuring out how to solve my problem with only two columns. 
    Anyways, I want to be able to save the array between iterations ( which I am implementing a shift register for) and then average the next array with the previous saved array. Since all my time points will be equivalent in between iterations (the sub-VI creates a special time axis), I want to do a straight running average where each element is averaged with the previous corresponding element in the array. 
    What would be the best way to approach this part? Should I just do a build array and at the end somehow iteratively average together all of the appended arrays? I figure that would take way too long compared to a running average though. 
    Thank you for your help. I can clarify further if anything seems unclear. 

    Try using index array for elemenet by element averaging for both the arrays. You dont need buid array anyways.
    One more question, if some points are same then do averaging of those elements which are not equal or expected to be different.
    Do you have any sample data. It will be great if i have some data on which operation needs to be performed.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • Comparing array elements for equality

    Hi
    I have written a simple program that works as a lottery number predictor. It works fine except for the fact that sometimes 2 numbers will be the same. Does anyone know of a method that compares an array element to the others to test for equality?

    ok I've had a go at implementing a solution. I worked it out on paper so I haven't tested it yet in the program. Let me know if you can see any errors that I can't.
       boolean numNotSame = true;
       int[] lottery = new int[5];
       int currentNumber;
       start:  //label to return to if 2 numbers are the same
       while(numNotSame){
          for( int j = 0; j < lottery.length; j++){
              currentNumber = 1 + randomNumbers.nextInt(34);   //get random number
              for( int i = 0; i < lottery.length; i++){
                 if( currentNumber == lottery)
    continue start; //if numbers are the same begin again
    } //end inner for
    lottery[ j ] = currentNumber; //set array element if number not used yet
    } //end outer for loop
    numNotSame = false; //set false so while loop will end
    } //end while block

  • Average of array elements

    Hi, I have a VI that's acquire data from Compact Field Point. These data come from cFP like an array. But I need acquire these data three times and, so, average them. There's a way to do this or I will have to use the "Index Array" function to separate each element of array and, so, make the average of each one?
    Any help will be appreciated

    It is not entirely clear to me what the array from the cFP contains (I have not used cFP). I see several possible scenarios:
    1) The array is a 1D array consisting of a single reading taken from multiple channels
    - In this case I am assuming that you want to average three of these data points. If this is the case then all you need to do is add the arrays together and divide by three.
    2) The arrayis a 1D array consisting of multiple readings from the same channel
    In this case I am assuming that you want to average all of the data from each of these sets then you can use a build array function to put make the three arrays into a single array, use the Sum function to add all of the array elements together, and then divide by the length of the array.
    3) The array is a 2D array
    In this case then you're receiving multiple readings from multiple channels. Since this solution is more difficult and I need more information to accurately answer your question I'll defer this solution unless needed.

  • Cascade two Build Array functions - what happens?

    I found the the code shown in the attachment in a very complex VI that I am overhauling.  Would someone explain to me what is happening with the "cascaded" Build Array functions.
    I can see that the first Build Array function builds a 1D array of integers which passes to the second Build Array function which outputs a 2D array of integers but, since there is no Element or second Array input, I don't see how this works.
    This is part of a subVI that is not embedded in a loop.
     All the examples have at least two inputs.  With one input there is no Concatenate Inputs option. There is some implicit operation here that I do not understand.
    Would someone explain how this works? 
    Solved!
    Go to Solution.
    Attachments:
    Cascade two build array functions.PNG ‏7 KB

    You are taking a scalar value and creating a 1-D array with exactly 1 element.
    Then you are taking the 1-D array and building it into a 2-D array, with exactly 1 element.
    Since you can't concatenate something with nothing, the only logical mode for the Build Array would be to build it into an array of the next larger dimension.
    You could add a third one, then you'd have a 3-D array with exactly 1 element.  And so on.

Maybe you are looking for

  • Error message when installing non-factor​y Hard Drive on a (Presario V6700)

    Hi all. I have a Presario V6700. Unit originally began shutting itself down & rebooting to the start up screen & going no further then after a few time of that, ultimately freezing during bootup process. Everthing still running, blue lights still on

  • How to find the list of org .field values in sap

    Hi, I need a list of org files values . example : I want to know ... Plant= WERKS,Cost Center=KOSTL. similarly I need the list of all org. values. what is the table name? Thanks in advance SR Message was edited by:         sunny raj

  • G4/400 flashing folder

    friend returned old computer to me. I turned it on and it had no startup chime, nothing. I tried reinstalling the os. After several hours, got the message that the installiation failed. Tried starting up with diskwarrior, and was able to get a flasin

  • Keyboard shortcuts don't stay put after power off

    As I use Pro Tools I can't use F11/F12 for dashboard/desktop, so I've used the preferences to set them to F13 and ^F13. This works fine including when I 'sleep' the Mac. However, if I shut the Mac down then the next time it's turned on those shortcut

  • How to assign Roles

    Hi,           I need to assign following roles to user. How can i do that...? H_BC_ALL_ENDUSERS HPL_FI_AA_CAP_PROJ_REVIEWE3840 HPL_FI_AA_PROJ_ACCOUNTTANG3840 HPL_MM_S_PUD HPL_MM_SCM_CUSTOM_RET_CLK_PUD Thanks and regards Raj