Remembering an undefined number of arrays.

I have an undefined number of arrays (usually 3-5, but can be different) which i need to 'remember' within a LabVIEW VI. Each array may need to be called up in the future for a variety of things, or even overwritten.
I am currently storing the default (3 arrays) in three seperate shift registers in the main while loop of my VI but this arrangement is unsatisfactory when the number of arrays to be stored is unknown. The array size is not set in stone and can vary up to 200 points. However, the arrays should be the same size as each other.
Does anyone have ideas on how this can be done? The only idea i've had is to use 'functional globals' but i don't know how to create Reentrant VIs with my version of LabVIEW (if it's even possible). I use LabVIEW 6.1 - the Full development system (i think that's what it's called).
Thank you in advance.
James
P.S. I can view VIs up to LabVIEW 8.5
P.P.S.  Perhaps i should add that each array is allocated a name in a 1D array of strings (the number of arrays is changed by adding or removing elements in this array) and are initialised 'blank'. Only one array is edited or used at a time and the 'active' array is selected using a menu ring.
Message Edited by James Mamakos on 06-16-2009 03:01 PM
Never say "Oops." Always say "Ah, interesting!"

I do not know how many arrays i may have. I currently have a default of 3, but this could eventually be anything up to 50 or more - i really don't know. The user defines this themselves.
I need to know (programmatically) exactly how many arrays there are, and also the size of the largest array. At the moment, i have a default size of 80 elements, but this could eventually be anything up to 200 or more.
Each array is acted on separately (one at a time) whether this is to read, write, or overwrite the elements within it.
I want to be able to change the associated name of an array without altering any data stored in it. I may need each array to have the option of differing in size to the others (one reason why i cannot merely store them as rows in a 2D array), though this is not essential for now.
Basically, i want to create a generic method of storing an undefined number of arrays of an undefined size, and being able to call up and edit them in the future without constantly reading and writing from a data file. The details i've given above are just to give an idea of the limitations and requirements i have.
If anything is still unclear, i will try to find another way of saying it.
James
P.S. As a background of the intended use, i am running a series of identical tests at different temperatures. Each test produces a 1D array of datapoints, and each array is associated to a particular temperature. Each array has its own associated name (to aid selection and viewing both after and during the tests) which will usually be the temperature that the data was collected at. However, there may well be a need for the user to manually name some or all arrays.
Their names are currently stored in a seperate array of strings, and each array is selected using a menu ring. The size of the data arrays is determined by the number of datapoints inputted. When a new array name is created (as a new element in the array of strings), a new 'blank' array is then created ready for data to be stored in it.
The data from the arrays is then displayed on graphs on the FP, and can be written into excel.
Never say "Oops." Always say "Ah, interesting!"

Similar Messages

  • Undefined number of parameters in a function

    Hi!
    Recenlty I've seen in somewhere that new verions of java enable functions to recieve an undefined number of parameters; something like (see the ...)
    public static void createList(int p1, ...){
    }But I don't know where can I find information about this, and I have not be able to find it anywhere.
    Thanks in advance.

    VarArgs

  • Concurrent invocations to an undefined number of partner links

    Hi everybody!,
    I'm getting introduced to BPEL and I have a problem when describing my first process:
    The problem I have is that I need something (structure, container, etc.) that allows me to make undefined (n) concurrent invocations to an undefined number of partner links.
    Is that possible? How can I do it?
    Some tips or guidance would be great.
    Thanks in advance,
    Gonzalo.

    From solution perspective ...
    you can use our dynamic partnerlink feature for that (given it's just the physical endpoints that change at each invocation) the rest can be done with a while loop ..
    nevertheless if you enlight us with the usecase - we can try to maybe come up with a more solid solution ..
    hth clemens

  • Code for find the missing number in array without sorting/comparing in java

    Hi all,
    We have 1 to 100 number in an array, but one number is missing (from 1 to 100). we have to find it out without sorting or comparing of this missing number in array.
    please help me out to find the solution this query.
    regards & thanks
    Mohan Kumar
    Bangalore,
    India

    Maybe you could sum up the numbers you've got in your array and subtract the result from 5050 [the term [code](N*N+N)/2 where N is your upper bound (i.e. 100)]. You'll get the sum of all missing values (which in this case would be exactly the missing number). n.b. that you could genaeralize on that for arbitrary finite series.
    Kind Regards,

  • HT201365 i lost my ipod5 and cant remember the serial number i need help getting the serial number on my ipod 5

    i lost my ipod 5 and i cant remember my serial number i need help with my serial number

    Finding serial number for a device - https://discussions.apple.com/message/18246553 - from box or backup file, not from Apple.
    http://support.apple.com/kb/HT2526 - If you registered a device you can use My Support Profile to find a list of serial numbers that have been purchased or registered with your Apple ID.
    My Support Profile - https://supportprofile.apple.com/MySupportProfile.do
    Maybe a way to find serial number after a device is no longer in your possession - https://discussions.apple.com/message/19524469 - "The easiest way to find your serial number is this Open Itunes...click help... run diagnostics.....(tick or untick as necessary) so that you just have ticked the last two, device connectivity and device sync. run these tests. it will say no ipod/ipad found but will give results of test....scroll down to bottom of results... here you will find the serial number of your last attached devices."
    iPhone: Locating the serial number, IMEI, ICCID, or MEID - http://support.apple.com/kb/HT1267 - from phone itself, a computer to which it has been backed up, or packaging.

  • Setarraybo​unds to modify array get error-1732​5,wrong number of array indices

    hello:
       i tried to use setarraybounds(Locals.Raw_values,"[1]","[6][0][0]"​) to set new bounds value of original array[1][1200]
    but get error: -17325,wrong number of array indices
    and use setarraybounds(Locals.Raw_values,"[0][0][1]","[6][​0][0]") gets error-17324,array index out of bounds
    what can i do?

    now i know i should use "[600]", thanks

  • I lost my iphone 3G and i didn't remember my IMEI number.So is there any way to find it?

    hey i lost my iphone 3g and i don't remember the IMEI number. so how can i get it?
    want IMEI number online.
    reply soon. its urgent

    If you did not backup your iPad, your photos are gone forever.

  • Banking site will not remember my card number. Firefox 6.0.2, Windows 7 64bit

    When I go to my banking site and tick the square for remember my car number, when I close firefox that information is lost and the banking site does not recognize me.

    Generally speaking, your bank would use a cookie to store your card number (bad) or to associate your browser with its list of saved card numbers (less bad). If you have cookies cleared after each session, then you may be blocking this feature.
    To check your cookie handling for your bank's site, when you are on the site, right-click the page and choose View Page Info, then Permissions. Under "Set Cookies" most likely the "Use Default" checkbox is checked. The actual setting will appear in gray.
    If the actual setting is not Allow, then uncheck "Use Default" and check "Allow." This will take effect the next time you start Firefox or if you clear the site's cookies on the Security tab (View Cookies button) and then revisit the site.
    If the actual setting already is Allow, then some other feature (e.g., clearing history when you exit) or program (e.g., a security suite) is clearing the cookie.
    This article has more tips on troubleshooting problems with cookies that don't save: [http://support.mozilla.com/en-US/kb/Websites%20say%20cookies%20are%20blocked Websites say cookies are blocked | Troubleshooting | Firefox Help].
    Any luck?

  • Store last n number of arrays

    I am collecting an array of 34 elements. I want to store the most recent n number of arrays, where n is defined by the user and can be changed during a run.
     Currently what I do is something like the following: build an array until the buffer is the size you want, then use replace array subset to overwrite the oldest element. This works fine, but if the user changes the buffer size, it will send me back to the case where I use build array (false case). Now my data will be out of wack.
    Suggestions? I thought about a lossy queue but you can't change the buffer size during run time can you?
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    moving avg example.PNG ‏14 KB

    smercurio_fc wrote:
    Your code shows no mechanism for the user to change the buffer size. How is the user supposed to change the buffer size?
    This is just an example where I chose number to buffer to be a constant of 5. Ultimately that would be a control where the value would be set. I threw this example together real quick because I can't post my code. I don't think I let anything else important fall by the wayside. Let me know if I did.
    CLA, LabVIEW Versions 2010-2013

  • [CS3][JS] How to turn negative number in array into string

    Hello,
    I have a script that compares the array of the geometric bounds of all text frames to the margins for a document (all pages having the same margins). Any frames that do not match the margins are flagged.
    In order to compare the array of text frame geometric bounds to two arrays of margins (because they are facing pages), I have to convert the numbers to strings.
    My problem is that in the following snippet of code that creates the two margin arrays, the negative of the variables become numbers again. This would not be too difficult to solve except that all the numbers have to be 4 decimal points before converted to strings.
    Thanks,
    Tom
    var myDoc = app.activeDocument;
    var marginY1 = myDoc.pages.item(0).marginPreferences.top.toFixed(4);
    var marginX1 = myDoc.pages.item(0).marginPreferences.left.toFixed(4);
    var marginY2 = (myDoc.documentPreferences.pageHeight - myDoc.pages.item(0).marginPreferences.bottom).toFixed(4);
    var marginX2 = (myDoc.documentPreferences.pageWidth - myDoc.pages.item(0).marginPreferences.right).toFixed(4);
    var marginsRHand = [marginY1, marginX1, marginY2, marginX2];
    var marginsLHand = [marginY1, -marginX2, marginY2, -marginX1];

    Well, I think I have solved it. But I don't know why this solves it.
    I would think that in the above script all the variables would be numbers and not strings. But the data browser says they are strings.
    The solution is:
    var marginsLHand = [marginY1, Number(-marginX2).toFixed(4), marginY2, Number(-marginX1).toFixed(4)]
    If someone can explain why now all variables in the arrays are strings and not numbers, I'll be happy.
    Tom

  • Unlimited number of array elements, help please!

    Hi everyone,
    I have written this code for comparing two arrays but i don't know how to accept all types array lengths. Now i am limited to 5 elements and i want it to accept the the users desired number of elements. How should i do?
    import java.util.*;
    class console
    public static void main (String[] args)
    ConsoleInput ci = new ConsoleInput();
              System.out.print("Hur m�nga Vektorer ska lagras? ");
              int antal = ci.readInt();
              if (antal<2)
             System.out.println("Du beh�ver 2 st vektorer");
             System.out.println("Hur m�nga element per vektor?");
             int antalelement = ci.readInt();
              System.out.println();
                   for (int j=0 ; j<antal-1; j++)
                   System.out.print("Ange vektor1: ");
                   int vektor = ci.readInt();
                   int vektor3 = ci.readInt();
                   int vektor2 = ci.readInt();
                   int vektor4 = ci.readInt();
                   int vektor5 = ci.readInt();
                   int[] vektor1 = new int[] {vektor,vektor3, vektor2, vektor4, vektor5};
                  int langd = vektor1.length;
                  System.out.print("Ange vektor2: ");
                   int element1 = ci.readInt();
                   int element2 = ci.readInt();
                   int element3 = ci.readInt();
                   int element4 = ci.readInt();
                   int element5 = ci.readInt();
                   int[] vektor21 = new int[] {element1,element2,element3, element4, element5};
                   Arrays.sort (vektor21);
                    int  kopiera = vektor1.length + vektor21.length;
                             int[] nyvektor = new int [kopiera];
                              for(int i = 0; i < vektor1.length; i++)
                                   nyvektor[i] = vektor1;
                             for(int i = 0; i < vektor21.length; i++)
                                  nyvektor[vektor1.length + i] = vektor21[i];
              System.out.print("Unionen ar: ");
                                  verktyg.sort(nyvektor);
                                  int counter = 0;
                                  for(int k = 1; k < nyvektor.length; k++)
                                  if(nyvektor[k] == nyvektor[k-1])
                                  counter++;
                                  int[] union = new int[nyvektor.length - counter];
                                  union[0] = nyvektor[0];
                                  int b = 1;
                                  for(int k = 1; k < nyvektor.length; k++)
                                  if(nyvektor[k] != nyvektor[k-1])
                                                           union[b] = nyvektor[k];
                                                           b++;
                                                           for (int h = 0; h<union.length; h++)
                                                           System.out.print(" " +union[h]);
    System.out.println();
    System.out.print("Intersection ar: ");
    Arrays.sort(nyvektor);
                   int counter1= 0;
              for(int i = 1; i < nyvektor.length; i++)
              if(nyvektor[i] == nyvektor[i-1])
              counter1++;
                   int[] intersection = new int[counter1];
              //c[0] = C[0];
              int a = 0;
              for(int i = 1; i < nyvektor.length; i++)
              if(nyvektor[i] == nyvektor[i-1])
                                       intersection[a] = nyvektor[i];
                                       a++;
                        for(int i=0; i<intersection.length; i++)
                                       System.out.print(" " +intersection[i]);
    System.out.println();
    System.out.println("Differensen ar: ");
    Arrays.sort(nyvektor);
         int counter2 = 0;
                        for(int i = 1; i < nyvektor.length; i++)
                        if(nyvektor[i] == nyvektor[i-1])
                        counter2++;
                             int[] difference = new int[vektor1.length-counter];
                                                 boolean falsk = false;
                                                 int k=0;
                                                 for(int i = 0; i < vektor1.length; i++)
                                                      for(int d=0; d<vektor21.length; d++)
                                                                if(vektor1[i]!=vektor21[d])
                                                                     falsk = true;
                                                                else
                                                                     falsk = false;
                                                                     break;
                                                                if(falsk)
                                                                     difference[k] = vektor1[i];
                                                                     k++;
                                            for(int i=0; i<difference.length; i++)
                                  System.out.print(difference[i] + " ");

    How about this?import java.util.*;
    import java.io.*;
    class DynamicVectors
      public static void main (String[] args)
        BufferedReader console
          = new BufferedReader (new InputStreamReader (System.in));
        String consoleLine = "";
        StringTokenizer tokenizer;
        System.out.print ("Hur m�nga Vektorer ska lagras? ");
        try
          consoleLine = console.readLine();
        catch (IOException ioe)
          System.out.println (ioe);
        tokenizer = new StringTokenizer (consoleLine);
        int antal = Integer.parseInt (tokenizer.nextToken());
        if (antal<2)
          System.out.println("Du beh�ver 2 st vektorer");
        for (int j=0 ; j<antal-1; j++)
          int vektorSize;
          System.out.print("Ange vektor1: ");
          try
            consoleLine = console.readLine();
          catch (IOException ioe)
            System.out.println (ioe);
          // Here's where the fun starts...
          tokenizer = new StringTokenizer (consoleLine);
          vektorSize = tokenizer.countTokens();
          int[] vektor1 = new int [vektorSize];
          for (int i = 0; i < vektor1.length; ++i)
            vektor1 = Integer.parseInt (tokenizer.nextToken());
    // ...and that's all there is to it.
    int langd = vektor1.length;
    System.out.print("Ange vektor2: ");
    try
    consoleLine = console.readLine();
    catch (IOException ioe)
    System.out.println (ioe);
    // Here's where the fun starts...
    tokenizer = new StringTokenizer (consoleLine);
    vektorSize = tokenizer.countTokens();
    int[] vektor21 = new int [vektorSize];
    for (int i = 0; i < vektor21.length; ++i)
    vektor21 [i] = Integer.parseInt (tokenizer.nextToken());
    Arrays.sort (vektor21);

  • How to extract number from array?

    I'd like to extract some number from an array.For instance,there is an array {5,0,21,3,1,2,3,71,36},labview is expected to check if there is consecutive number in it.If is,the number before the first of the consecutive number and the one just after the last of the consecutive number are extracted,then they are put into another array. If not,nothing is done.In this array,1,2,3 are consecutive,then the number 3 and 71 will be put into another array.
    I thought about it for a long time but nothing came out.I am really at a loss now.Any help will be appreciated.An uploaded vi would be better.Thanks so much!!

    this may jus help you to get started... pls debug for error possible. You can have better solution.
    (and you got to figure out yourself of how it works as I was jus simply wire them up unitl it works )
    Cheers!
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    consecutive_check_example.vi ‏51 KB

  • Variable number or array

    I have a variable that could be a number or an array of 4 numbers to use. What I have is:
    if (Number(mTBLR)) {
    top = mTBLR;
    bottom = mTBLR;
    left = mTBLR;
    right = mTBLR;
    if (mTBLR.constructor == Array && mTBLR.length == 4) {
    top = mTBLR[0];
    bottom = mTBLR[1];
    left = mTBLR[2];
    right = mTBLR[3];
    Is checking the constructor a good way to go I could not find much in my docs on this?
    Also while on this is there a simple way to test the number is integer

    Muppet Mark wrote:
    Its just sometimes the little things that can stop you in your tracks and have you scratching your head for the correct method
    I agree and because it's something new you can be in for more head scratching if you are not careful. I know that I have done my share.
    So the back and forth here is not about who is correct but what is correct test for a integer.
    var mTBLR = "+20-10";
    alert(!!mTBLR.toString().match(/[-+]?\d+/));
    Even if you change the re to /^[-+]?\d+$/ gives a test for integers or correctly formatted string.
    If there is a problem using parseInt in this case it can be replaced by one of several math methods like Math.round. Or the entire second expression can be replaced with !( mTBLR % 1) but you still need to make sure that mTBLR is not a string and those test can't do that because javascript is happy too convert a string to a number.
    So I don't see a way to avoid x.constructor. I agree that both constructor and parseInt can be misused, but that doesn't mean they shouldn't never be used.

  • Report with undefined number of columns

    Hello,
    I'm using VB.NET and Crystal Reports 2008 for my Windows application.
    I've a new report to implement. It's a budgetting report in a table form, which shows the amount of money allocated to a certain projects over a range of years. In each row I show the different projects, in each column I show the budget of each project per year. Users can select the number of years to print (as a parameter), that means, the number of columns is dynamic.
    My question is, how am I going to design this report? Will cross-tab help? My report will be in landscape format. The page width is enough for 8 columns, i.e. 8 years can be printed per table. If users choose to print more than 8 years, the "extra" columns should be printed on a new table underneath the one with the first 8 years, or on a new page if there's not enough space underneath.
    Your help and suggestions would be much appreciated. Thank you very much.
    Agnes

    Please note, this forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.
    As your query concerns design of an actual report, you should be posting your query to the Crystal Reports Design forum:
    SAP Crystal Reports
    Ludek
    Moved to Report Design Forum
    Edited by: Don Williams on Nov 24, 2008 7:23 AM

  • I've locked my Ipad by repeatedly entering the wrong security password.  How can I open it again and now I think I've remembered the right number?

    I've locked my self out of my ipad by repeatedly entering the wrong password.  What can I do to reopen it again please?  I think I have the right number now too>
    John.

    Wrong Pass Code  >  http://support.apple.com/kb/HT1212

Maybe you are looking for

  • Problem with replacement of index series, change of base year

    Hi Experts! I try to explain my problem in Real Estate. In Italy from January 2011 the baseline (base year) national index of consumer prices for the entire community (NIC) and national consumer price index for families of workers and employees (CPI)

  • Cache problem with "videos" viewed by thumbnail ?

    Hello, When I add video clips to my iTunes library, I have to crite the name of the author, the album... but sometimes display in the video view seems not to refresh : the clip are still listed without albums. I added clips 4 days ago, it refreshed i

  • Dual NIC Issues

    I am trying to run my Arch computer as a router to allow another computer on my home network to use the internet (probably using IP Masq.) The issue is that when I plug in two nics into my computer my ADSL connection will connect but I will not be ab

  • How to test i-phone free application before it will go to approval mode?

    Hi Everyone, I want to upload my free application in i-tune connect for testing purpose in real device.How to test this application before it will go to the approval? I have admin and legal rights and also signed the free application contract. Please

  • Duplicating directory structures on different machines

    I'm trying to mirror directory structures on two different machines. Namely so that Premiere project files can be shared withotu having to relink the media paths. Machine A has 2 Volumes: /Volumes/System/ (startup disk) and /Volumes/Media/ Machine B