Variably Change a 2-D Array name

Hi Everyone,
So I have this VI that I had created and someone on here helped vamp it up big time. Thanks again for that. I have run into a snag with my program. So I have this VI that takes in arrays and places them in an xml file. I am using teststand to control a SigGen, PowerMeter, and a switch matrix so I can take a whole bunch of array measurements and place them into a singke xml file. My problem is that my xml file (when the test is completed) will have about 200 or more arrays in it. So I was hoping that I could make the 2-D array name into a variable so I can make each array unique in my xml file. That way I can eventually create another VI that takes the xml file and display the desired array. Does anyone know how to make the 2-D array name into a variable so I can change it to what I want from teststand? My VI is attached below.
Thanks,
dlovell
Solved!
Go to Solution.
Attachments:
Write to XML.vi ‏19 KB

Hey Taki,
So I understand now where you are coming from. Did your VI (the picture you posted) work? I can't get the 2D-Array to change to my Var_Name (my input name)... Below is my VI that I made look like your picture.
Thanks,
dlovell
Attachments:
Write to XML Test.vi ‏21 KB

Similar Messages

  • Variable array names...i think

    I have a list of arrays which need filling and i have created a for lop that will run the necessary commands to fill the arrays...
    how do i put an array name into the 'for' loop that will change each time...
    ie.
    for(int x = 0; x < 3; x++)
        array ?x? [index] = tempVariable;
    }Message was edited by: Reashlin
    reashlin

    You don't.
    An array's index can be variable, but a variable's name cannot. If you really need "named" arrays, put the arrays into a map.
    Map<String, int[]> arrayMap = new HashMap<String, int[]>();
    int[] array1 = new int[10];
    arrayMap.put("array1", array1);
    array1[0] = 123;http://java.sun.com/docs/books/tutorial/collections/
    Or, if accessing the array by an index is enough, then just use an array of arrays.
    int [][] arrays = new int[5][10];
    array[0][0] = 1;
    ... etc. ..

  • Variable array name?

    Hi,
    I'm writing a lottery game where players enter 6 numbers into 6 text fields. I want to write these numbers into an array for comparison with the winning numbers and I want to be able to name the array as they press the submit button so that when I come to compare the winning numbers I can call each array in turn and see how many numbers match. I know how to put the 6 numbers into the array but I wonder how to change the array name everytime the button is pressed.
    Does anybody have any ideas about how to do this suggest a better way of doing it?
    Thanks.

    You could use a "two-dimensional" array, the first dimension giving the "submit number", and the second, the "text-field number". E.g.,
    // Allow for 20 submissions:
    String[][] kLott = new String[ 20][];
    // Build first submission
    String[] kSubm = new String[ 6];
    kSubm[ 0] = "12345";
    kSubm[ 1] = "54321";
    kSubm[ 5] = "22334";
    // Save first submission
    kLott[ 0] = kSubm;
    ...Even better, you could create a submission class, with the name of the player and the array of text-field values as members. Then save these submission objects in an ArrayList or Vector. E.g.:
    class Subm {
      String   kPlNa = null;    // Player name
      String[] kTFVT = null;    // Text-field values table
    List kLott = new ArrayList( 20);
    // Build first submission
    kSubm = new Subm();
    kSubm.kPlNa = "Harry";
    kSubm.kTFVT[ 0] = "12345";
    kSubm.kTFVT[ 5] = "22334";
    // Save first submission
    kLott.add( kSubm);
    ...You can add a constructor to the "Subm" class to make the intialization more concise:
    class Subm {
      String   kPlNa = null;    // Player name
      String[] kTFVT = null;    // Text-field values table
      ////// Subm.Subm (constructor)
      public Subm( String iPlNa, String iTFV1, String iTFV2, ...) {
        kPlNa = iPlNa;
        kTFV1 = iTFV1;
        kTFV5 = iTFV5;
      ////// Subm.Subm (constructor)
    // Build first submission
    kSubm = new Subm( "Harry", "12345", "54321", ... "22334");

  • Using a ariable for an array name

    I am currently working on the search method for my project.Which is to use breadth first search, to find the goal state of a problem.I am storing each new state encountered in a queue called states, and using an array for each state. So states would be a queue of arrays.
    I was hoping to name each new state in order so state1 state2 state3 and so on. So for instance state1 would be an array containing the original board.
    The problem I am having is declaring a new array for each new state. I was hoping to use a variable i to keep count of the number of states, so that when I declare a new array I could use something like
    String[][] statei = original board array
    So if i = 1 then state1 would contain a copy of the original array.
    However I cannot seem to get java to recognise that i is a variable and not part of the name for the array.
    Is there any way to let java know that I�m using i to represent a variable. Do I need to but i in quotation marks or something similar?
    Thanks for any help

    sorry i wasnt clear enough, what i have is an initial array called boards. Now every time i move a value in boards i need to create a new array. So for instance
    i = no of states
    new String [][] statei = a copy of boards[] with the affects of making the move
    example if i was moving the value of boards[x][y] to boards[x][y+1]
    i would need statei to be an array containg the change to the array above

  • Using an array name stored in a String in a Statement

    In my sequence, I build an array in one section and store it in a variable called Locals.Test_Array.
    I build the name of the permanent place I would like to store this array and store it in a string called Locals.SG_Test_Array_Name.
    I would like to move the values from Locals.Test_Array to the Station Globals Array name stored in Locals.SG_Test_Array_Name.
    For example:
    the string stored in Locals.SG_Test_Array_Name is "StationGlobals.Coolant_Temperature_Test_Array" (already created in Station Globals)
    What I am trying to do is this:
    Statement                        StationGlobals.Coolant_Temperature_Test_Array=Loca​ls.Test_Array  (this works)
    The Station Global Array name needs to change as the sequence executes and the data in Locals.Test_Array changes.
    What I need is something like this.
    Statement                         Locals.SG_Test_A​rray_Name=Locals.Test_Array  (where SG_Test_Array_Name is a string that holds the name of the array)
    Thanks, Big_Will

    Evaluate(Locals.SG_Test_Array_Name + " = Locals.Test_Array " )

  • Variable number of two dimensional arrays into one big array

    I have a variable number of two dimensional arrays.
    The first dimension is variable, the second dimension is always 7.
    i.e.:
    Object[][] array0 = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    Object[][] array1 = {
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Object[][] arrayi = ...I'm generating these arrays with a for-loop:
         for (int i = 0; i < filter.length; i++) {
              MyClass c = new MyClass(filter);
              //data = c.getData();
    Where "filter" is another array which is filled with information that tells "MyClass" how to fill the arrays.
    "getData()" gives back one of the i number of arrays.
    Now I just need to have everything in one big two dimensional array.
    i.e.:Object[][] arrayComplete = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Any idea on how to accomplish this? It's blowing my mind right now.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Just brainstorming here:
    Why not put your actual data in a class and store that in a LinkedList (so you know the total number of elements for your multi-dimensional array). Then initalize your multi-dimensional array and populate it? Haven't tested the following, but thinking something along the lines of
    public class MyData {
         //data here
         public Object[] toArray() {
              //something similar to this
              return new Object[] = {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"};
    LinkedList<MyData> data = new LinkedList<MyData>();
    data.add(mydata1);
    //however many times you need
    Object[][] arrayComplete = new Object[data.size()][7];
    for(int i = 0; i < data.size(); i++) {
         arrayComplete[i] = data.removeFirst().toArray();
    }Another option for knowing how many rows you would need might be using something like:
    int rows = 0;
    rows += array1.length;
    rows += array2.length;
    //etc...But is not entirely useful if you don't know how many variable arrays you have (although reflections might help if the name of the array variable is incremented systematically, someone told me earlier to avoid reflections since it could make debugging a LOT more difficult).
    Edited by: bogdana on Apr 1, 2010 10:38 AM

  • Non-static variable change cannot be referenced from a static context

    My compiler says: : non-static variable change cannot be referenced from a static context
    when i try to compile this. Why is it happening?
    public class change{
      int coin[] = {1,5,10,25,50};
      int change=0;
      public static void main(){
        int val = Integer.parseInt(JOptionPane.showInputDialog(null, "Type the amount: ", "Change", JOptionPane.QUESTION_MESSAGE));
        change = backtrack();
    }

    A static field or method is not associated with any instance of the class; rather it's associated with the class itself.
    When you declared the field to be non-static (by not including the "static" keyword; non-static methods and fields are much more common so it's the default), that meant that the field was a property of an object. But the static main method, being static, didn't have an object associated with it. So there was no "change" property to refer to.
    An alternative way to get this work, would be to make your main method instantiate an object of the class "change", and put the functionality in other instance methods.
    By the way, class names are supposed to start with upper-case letters. That's the convention.

  • How to pass dynamically generated string value as array name in TestStand?

    Hi All,
              I have a string variable which holds an array name as its value. The string value is a dynamically generated one. Now my problem is how to retrieve the values within the array where as the array name is stored in a string variable.
    for eg:
    fileglobals.InfoName = "Array_Name" --> fileglobals.InfoName is a string variable, Array_Name is the array name generated dynamically and it is known only at run-time.
    Array_Name[0] = "a";
    Array_Name[1] = "b";
    Array_Name[2] = "c";
    In the above case, I have to retrieve the values of a, b and c
    Any help is greatly appreciated
    Thanks
    Arun Prasath E G

    Hi,
    Looking at your sequencefile.
    You seem to be trying to save into FlieGlobals.InfoName a string with the values of "FileGlobals.Info_0".."FileGlobals.Info_n" where n is the value of Parameter.TestSocket.Index.
    Then you are setting the value into FileGlobals.TempName from "StationGlobals.FileGlobals.Info_0" assuming Parameter.TestSocket.Index is 0.
    Is this correct?
    I realise this is a cutdown sequence file but you must make sure These variable actually exist in either FileGlobals or StationGlobals. Also with FileGlobals each SequenceFile has its own FileGlobals unless you have set the properties of the SequencFile to use a common FileGlobals.
    What was the precise error you was seeing as it will properly telling you what variable of property it can't find.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Outlook lost connection when load balanced CAS array name was moved to different AD site and data centre

    At the weekend our F5 load balanced CAS array name was moved to our 3rd datacentre and all users lost access to Outlook.  The databases were running on DAG2 listed below at the time.
    We have 3 DAG servers configured as the following:
    DAG SERVER ONE (DAG1) | Datacentre 1 | Primary AD Site | Multi role server MBX, CAS, HT
    DAG SERVER TWO (DAG2)  | Datacentre 2 | Primary AD Site | Multi role server MBX, CAS, HT
    DAG SERVER THREE (DAG3) | Datacentre 3 | Secondary AD Site | Multi role server MBX, CAS, HT
    We primarlily run from DAG1 or DAG2 - DAG3 is for real DR and loss of Datacentre 1 and 2.  The CAS array "Outlook" is configured for the primary AD site load balanced across DAG1 and DAG2.
    We use an F5 load balancer that balances the connections across DAG1 and DAG2, if both fail then DAG3 is used automatically.   We have tested and it works fine simulating loosing DAG1 and DAG2 and bringing up as a 1 node cluster on DAG3 with a
    FSW and the load balancer pointing at DAG3 for Outlook connections.
    For some reason this stopped Outlook users connecting - can anyone advise me why as I have been asked to test this again and I was expecting it to work?

    Hi,
    As far as I know, For Exchange 2010 before SP2 RU3,the Outlook clients with an existing Outlook profile would continue to use the old RPC endpoint rather than the new RPC endpoint (even though Autodiscover detected the change). Thus, except with Andy's suggestion,
    I recommend you can also repair or recreate the Outlook profile to have a test.
    For more information, you can refer to the following article:
    http://blogs.technet.com/b/aljackie/archive/2013/11/14/outlook-rpc-end-point-and-pf-the-microsoft-exchange-administrator-has-made-a-change-that-requires-you-quit-and-restart-outlook.aspx
    Thanks,
    Angela Shi
    TechNet Community Support

  • Windows 7 or Windows Server 2008 R2 domain join displays error "Changing the Primary Domain DNS name of this computer to "" failed...."

    Hi,
    Windows 7 or Windows Server 2008 R2 domain join displays error "Changing the Primary Domain DNS name of this computer to "" failed...."
    DC:windows Server 2008 R2
    Domain functional level:Windows Server 2003
    When Winxp join domain, have no this error message.
    I checked http://support.microsoft.com/kb/2018583?wa=wsignin1.0 does't work.
    There have 3 suggestion in this article:
    1.The "Disable NetBIOS over TCP/IP" checkbox has been disabled in the IPv4 properties of the computer being joined.
    Doesnt's work.
    2.Connectivity over UDP port 137 is blocked between client and the helper DC servicing the join operation in the target domain.
    On my DC, I run netstat -an, reslut as below:
     UDP    192.168.20.3:137       *:*
    3.The TCP/IPv4 protocol has been disabled so that the client being joined or the DC in the destination domain targeted by the LDAP BIND is running TCP/IPv6 only.
    We are not using IPV6.
    This server recently updated from Windows Server 2003 to Windows Server 2008 R2. Before upgrade, when Win7 and Win2008 join this domain, also have the same error message.
    Please help to check this issue.
    Thank you very much.
    BR
    Guo YingHui 

    Hi Guo Ying,
    I have faced this critical error which makes over-writes the host names in the domain when you join.
    For example: Already you had a host name called as PC.domain.com in the domain.com Domain.
    When you try to add the another host name called as PC in the domain.com Domain, it doesn't give you the duplicate name error on the network it does over-write the existing host name called as PC.domain.com & it will add the new host name into the domain.
    Host name which got over-written will get removed from the domain. I faced this issue in my project. My DPM host name got removed from the Domain & new host name got joined into the domain which halted my backups for one day.
    Final Resolution is as follows:
    You need to start the dns console on the DC & drop down the domain name.
    Select the _msdcs when you click on _msdcs it will show the Name Server's list on the right hand side.
    You need to add the Domain Naming Master under the _msdcs or add all the domain controllers which you had.
    After you add the Name server's try joining the PC OR Laptop to the domain which is successfully joins it.
    Regards
    Anand S
    Thanks & Regards Anand Sunka MCSA+CCNA+MCTS

  • In R12 how to change concurrent output/log file name prefix?

    how to change concurrent output/log file name prefix?

    but i want to change change concurrent output/log file name prefix?You cannot, and I believe it is not supported for all concurrent requests -- Please log a SR to confirm this with Oracle support.
    Thanks,
    Hussein

  • How do I change my Apple Discussions Alias name?

    I dont want to keep displaying my own name here, not sure why, but it seems that most dont. Online security I suppose.
    I asked this question in the wrong forum, but I am led to believe that it is just not possible. I was told that I could delete my Apple ID and create a new one but I don't want to do that either.
    The thing about getting another Apple ID is that I use it for many other things and don't want to cause myself problems elsewhere. I use my Apple ID for iTunes, it is linked to my MobileMe account (no idea how to unlink it or link it to another ID), I use it for online shopping in the apple store, it is linked to my various Apple Care products, I use it for my iChat account (because nobody I know uses Jabber or AIM). So I am pretty reluctant to lose it.
    I can't understand why you can change your actual Apple ID Name, but not your alias??? It seems sensible not to be able to change your actual Apple ID login name (I use my dormant @mac.com address), but your alias?? What else is it used for???
    On the topic of losing points when you change your Discussions login account: This doesnt really apply to me. I don't think I have any points (cant see any on my profile) and wouldn't know how to benefit from them even if I did? I do try to help people out from time to time, rather than just use the forums to help myself, but I am relatively new to Mac's (commercially anyway), and am therefore not that helpful.

    Sorry, just saw the BIG yellow post just above this one!!!
    However...
    Important: If you enter your real name in the Alias field, your real name will appear as your alias. Also note that angle bracket characters ( ) are not allowed. Once you create an alias, you cannot make changes to it. If you want to change your alias, you will need to create a new User Account."
    I am very happy to create a new User account, but I dont want to have to create a new Apple ID. It this possible???
    Message was edited by: Robert Borley

  • I changed my apple id user name on my iphone, but when i want to sign to icloud on my ipod it gives me only the old id user name

    i changed my apple id user name for icloud on my iphone, but when i want to sign in to icloud on my ipod it gives me only the old id user name, and of course its deleted and when i put the old password for my old id it doesnt accept it, so please help me in how my ipod get the info that i changed my apple id, and also when i try to sign off icloud it again gives me back the old apple id and ask me for a password to turn off my find my iphone, im really confused and i tried everything.....
    My ipad was changed normally and easily but my ipod is stuck and of course is not listed on my devices on icloud....please help me!!!!!!!!!!!!!

    Hello oshalaby,
    To get it to your new Apple ID, you would need to change it back to your old on so you can turn off Find My Device and turn it off. Once that is done, change it back to what you are currently using now. Take a look at the article below for more information. 
    If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/en-us/TS5223
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Regards,
    -Norm G. 

  • I want to delete my icloud-account from my iphone 5 and then register again, because I want to change my email-address/account name. What would be the steps to follow? How do I make sure I do not lose any information stored on/in my iphone 5?

    I want to delete my icloud-account from my iphone 5 and then register again, because I want to change my email-address/account name. What would be the steps to follow? How do I make sure I do not lose any information stored on/in my iphone 5?

    You would have to delete the existing iCloud account and create a wholly new one - you cannot change the @icloud.com email address of the one you already have.  To make a new one, you will also need an new AppleID as any AppleID can only have one iCloud account associated with it.
    Deleting the account will not delete anything off your device (if prompted for things like contacts, choose to keep them).  You will have to sync everything anew with the new account as you cannot move your sync'd content, your old backups or anything else from one iCloud account to another.  You will have to set up sync again and let it sync to the new account, and then make new backups to the new account as well.

  • TS4020 Can I change my iCloud email address name without creating a new account?

    CCan I change my iCloud email address name without creating a new account?

    Once you have created an iCloud account and chosen an @icloud.com address to go with it you can't change the address (short of creating an entirely new account).
    However, all is not lost. You can add up to three 'email aliases' - these are additional addresses (not accounts) which deliver into the same inbox as the main account. (In fact it's a good idea to give out alias addresses, rather than the main address, because if they attract spam you can easily change them.) (New aliases can only be @icloud.com ones; @me.com addresses cannot now be created.)
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account or move it to another account.
    More information on aliases here: http://help.apple.com/icloud/#mm6b1a490a

Maybe you are looking for

  • IPod Touch not recognized in Windows & iTunes won't start unknown error -50

    I have been trying to fix a connectivity issue with my iPod touch for almost 6 hours now. I've read all over the iPod Touch forums and none of the solutions worked for me. I've installed and uninstalled iTunes multiple times and nothing seems to work

  • Adding more than the recommenced RAM...

    I have an iMac 17in Flat Panel 800MHz with 256MB of Apple installed RAM (with an open slot for user installed RAM). The maximum recommended total RAM is 1GB. Can you put a 1GB pc133 144pin SODIMM in the user installable slot? Is this a bad idea to ha

  • RG1 Print Issue

    Dear Fnds, Iam facing with 2 quires , 1) while iam doing RG1 Print ...System is not supporting to Print the Form.... System will give a pop-up wherein give the appropriate file name and path for the same and click on save to save the excel file i hea

  • T-code/Report for seeing the existing entire GL master data

    Dear Experts, Is there any t-code/Report for seeing the existing entire GL master data at chart of accounts level and company code level. example : GL a/c no    company_code   account_group   shrt_text    long_text     tax_category      open_item_man

  • JDBC XMLType Insert/Update Performance

    I am writing a backend Java EE application that inserts or updates XML documents into a table backed by XMLType.  I'm using Oracle 11.2.0.3 with associated drivers and XDK, with connections obtained from an oracle.jdbc.poo.OracleDataSource.  Unfortun