Merging different arrays as one long array

Hi there, I have some problem with merging of array.
Because of the natural of my VI, I will need to merge arrays together to form a single long array.
I have designed a VI using For loop and case-switching but the current array keep over-writing the previous array. I had enable auto-indexing on the For loop but it couldnt work.
I have attached two VI for further illustration.
Trying to merge arrays togther.vi  is the program i am working on.
Desired output of program.vi  is the actual thing i would like to obtain at the output.
Thanks for all the help.
Keith Tan
Solved!
Go to Solution.
Attachments:
Trying to merge arrays together.vi ‏27 KB
Desired Output of program.vi ‏15 KB

Hi Keith,
it's the magic of shift registers
You should always note which LV version you're using!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
Desired Output of program.vi ‏17 KB
Trying to merge arrays together.vi ‏28 KB

Similar Messages

  • Merging different values into one column

    Hi all,
    If my report has two columns A and B. For one value of A, there are multiple values coming from database for B.
    So, report displays them like this:
    A     B
    1     x
    1     y
    1     z
    Is it possible somehow that i can merge all possible values of B in one row instead of many. i.e. report should look like this:
    A     B
    1     x,y,z
    Please reply with your suggestions.

    Hi,
    It is possible that can merge all B column values in one row.
    Steps:-
    1. First you create an object for B using @aggregate_Aware() function like
    @Aggregate_Aware(TableName.B,TableName.B)+', '
    Object qualification should be measure. Here B is the column name.
    2. In WebI report drag and drop A and B objects
    3. Run the report
    Now you will get the result.
    Edited by: Swarna K on Mar 11, 2011 5:27 AM
    Edited by: Swarna K on Mar 11, 2011 7:20 AM

  • Difficulty wiring three different arrays to one spreadsheet file

    I am having trouble outputting three different arrays from a case structure and sending them to an Excel file. I have read through several similar Excel threads and not seen anything really similar to my situation. I can't even get my arrays correctly wired to the "write to file" icon. Any suggestions would be great. I also attached my vi for reference.
    Thanks 
    Attachments:
    Read voltage, give current 5-29.vi ‏38 KB

    I cleaned it up a bit and fixed a few problems. It may not do everything that you want but I take no credit for the way the cose is written.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Read voltage, give current 5-29.vi ‏24 KB

  • Combining/Merging Clips into one long clip in the project bin?

    I'm shooting on Panasonic P2 cards
    Since P2-material comes in as an individual clip per recording, it's quite different from working the way we're used to with one long clip using cassettes. My wish is to merge these clips to one, but I'm having some challenges. This is what I've tried:
    1. In Project window, I try to mark several clips and drop them to the source window, but only one of them appears at ones (the rest is in the dropdown-box above the window).
    2. In Project window, I mark several clips, go to Clip, but the option Merge Clips are greyed out (why? is there a format limitation for this function?)
    3. In Project window, I mark several clips, add them to a new seqence and use the sequence as a source for my main sequence. BUT, the limitation is the audio. My output should be a stereo sequence. Adding the source-clips to a stereo-source-seqence, makes of course the audio coming from the source-sequence a stereo track. My wish is to preserve four mono-tracks. I've tried making a source-seqence with a 16 track mono master, but this one won't add to the main seqence (which has a stereo master).
    Does anyone have a solution?

    Assuming we're talking about shorter takes and not a longer, spanned clip, I don't think what you want can be done in PP.  Nesting will always bring the audio over as one track.
    You may have to skim the clip sequence in the Program Monitor and copy/paste the portions you want to use into a second sequence for output.  This will preserve the audio.

  • User defined func: Unavble to merge two arrays in result list

    Hi
    I am trying to merge two arrays on the basis of "FEE" element in the input file;
    Actually there is an Attribute Name and Value pair array coming in the input file which has 5 pairs already(Notification + 100 , oversize + 8 etc.) see example below;
    <m0:Fees>ZB9</m0:Fees>
    <m:Attribute>
      <m0:Attributename>NOTIFICATION</m0:Attributename>
      <m0:Attributevalue>100</m0:Attributevalue>
      </m:Attribute>
    <m:Attribute>
      <m0:Attributename>OVERSIZE</m0:Attributename>
      <m0:Attributevalue>8</m0:Attributevalue>
      </m:Attribute>
    <m:Attribute>
      <m0:Attributename>OVERWEIGHT</m0:Attributename>
      <m0:Attributevalue>108</m0:Attributevalue>
      </m:Attribute>
    <m:Attribute>
      <m0:Attributename>SIGNATURE</m0:Attributename>
      <m0:Attributevalue>294</m0:Attributevalue>
      </m:Attribute>
    <m:Attribute>
      <m0:Attributename>RTS</m0:Attributename>
      <m0:Attributevalue>8</m0:Attributevalue>
      </m:Attribute>
    The condition is:
    CASE 1. If the FEE doesn't exist in the file then only the Atrribute Name and Value in added to the Array
    CASE 2 If FEE exist then add all the Atrribute Name and Value pairs as well as in the last index of Array add String "Fee" in Attributename and String "ZB9" in  Attributevalue.
    CASE 1 is working fine.
    but in CASE 2 even if i m taking an output array of length Attributename +1 and Attributevalue +1 and trying to add "Fee" and "ZB9" respectively, it never happens.
    Please have a look at the code below;
       //write your code here
    public void ud_Attributename(String[] Fees,String[] Attributename,ResultList result,Container container){
              String attribute_copy[]=new String[Attributename.length+1];
              String attribute_name[]=new String[Attributename.length];
              String array_copy1[]=new String[Attributename.length+1];
              //int len =Attributename.length;
              if(Fees[0]!=null)
                   if(Fees[0].equals("ZB0"))
                   Fees[0]="01";
                   else if(Fees[0].equals("ZB5"))
                   Fees[0]="02";
                   else if(Fees[0].equals("ZB6"))
                   Fees[0]="03";
                   else if(Fees[0].equals("ZB9"))
                   Fees[0]="04";
              try{
                   if((Fees[0]=="01")||(Fees[0]=="02")||(Fees[0]=="03")||(Fees[0]=="04"))
                        for(int x=0;x<=Attributename.length;x++)
                             if(x==Attributename.length)
                             array_copy1[x]="Fee";
                             else{
                             array_copy1[x]=Attributename[x];
                             result.addValue(array_copy1[x]);
                   else
                        for(int i=0;i<=len;i++)
                             attribute_name<i>=Attributename[i+1];
                             result.addValue(attribute_name<i>);
              }catch(Exception e)
              {e.printStackTrace();}
    Same way i've used for Attributevalue.
    But the result is
    <ATTRIBUTEPAIR>
    <PAIR>
    <NAME>NOTIFICATION</NAME>
    <VALUE>04</VALUE>
    </PAIR>
    <PAIR>
    <NAME>OVERSIZE</NAME>
    <VALUE>8</VALUE>
    </PAIR>
    <PAIR>
    <NAME>OVERWEIGHT</NAME>
    <VALUE>108</VALUE>
    </PAIR>
    <PAIR>
    <NAME>SIGNATURE</NAME>
    <VALUE>294</VALUE>
    </PAIR>
    <PAIR>
    <NAME>RTS</NAME>
    <VALUE>8</VALUE>
    </PAIR>
    </ATTRIBUTEPAIR>
    Please suggest where i am wrong. ur help is very much appreciated.
    Thnks in advance

    this is i am doing now
       //write your code here
              String attribute_copy[]=new String[Attributename.length+1];
              String attribute_name[]=new String[Attributename.length];
              String attribute_name1[]={"Fee"};
              //String[] Attributename.copyTo(attribute_name1,0);
              //String[] attribute_name1 = (String[]) Attributename.Clone();
              //String fees;
              String array_copy1[]=new String[Attributename.length];
              int len =Attributename.length;
              for(int y=0;y<len;y++){
              array_copy1[y]=Attributename[y];
              if(Fees[0]!=null)
                   if(Fees[0].equals("ZB0"))
                   Fees[0]="01";
                   else if(Fees[0].equals("ZB5"))
                   Fees[0]="02";
                   else if(Fees[0].equals("ZB6"))
                   Fees[0]="03";
                   else if(Fees[0].equals("ZB9"))
                   Fees[0]="04";
                   else if(Fees[0].equals("ZA1"))
                   Fees[0]="05";
                   else if(Fees[0].equals("ZA2"))
                   Fees[0]="06";
              try{
                   if((Fees[0]=="01")||(Fees[0]=="02")||(Fees[0]=="03")||(Fees[0]=="04")||(Fees[0]=="05")||(Fees[0]=="06"))
                        int j=0;
                        for(int a=0;a<=len;a++)
                             if(j==0&&attribute_copy[j]==null)                                   
                                  attribute_copy[j]="Fee";
                             else
                                  //int b=-1;
                                  for(int i=0;i<=len;i++)
                                       if(i==j)
                                       //i=i-1;
                                       attribute_copy[j]=array_copy1[i-1];
                                       break;
                                       else{
                                       continue;}
                        result.addValue(attribute_copy[j]);
                        j+=1;
                   else
                        for(int i=0;i<=len;i++)
                             attribute_name<i>=Attributename[i+1];
                             result.addValue(attribute_name<i>);
              }catch(Exception e)
              {e.printStackTrace();}
    and the result in queue is
    SUPPRESS
    [FEE]
    [NOTIFICATION]
    [NOTIFICATION]
    [OVERSIZE]
    [OVERSIZE]
    [OVERWEIGHT]
    [OVERWEIGHT]
    [SIGNATURE]
    [SIGNATURE]
    [RTS]
    [RTS]
    but in the output i m getting
    <ATTRIBUTEPAIR>
    <REF_HANDLE>0001</REF_HANDLE>
    <PAIR>
    <NAME>Fee</NAME>
    <VALUE>04</VALUE>
    </PAIR>
    <PAIR>
    <NAME>OVERSIZE</NAME>
    <VALUE>8</VALUE>
    </PAIR>
    <PAIR>
    <NAME>OVERWEIGHT</NAME>
    <VALUE>108</VALUE>
    </PAIR>
    <PAIR>
    <NAME>SIGNATURE</NAME>
    <VALUE>294</VALUE>
    </PAIR>
    <PAIR>
    <NAME>RTS</NAME>
    <VALUE>8</VALUE>
    </PAIR>
    </ATTRIBUTEPAIR>
    Notification is missing.

  • How to merge different comp track into one comp track?

    Hi
    I use logic studio 9
    I have recorded two different comp tracks for lead singing of project
    And now I have two different tracks with a lot of takes to choose from in each one of them
    I would like to merge the two into one comp track with all the takes so it will be easier to edit
    Is there any way to do that?
    By the way, there is no reason why I made 2 tracks for the same singing part. Now it seems to be a mistake...
    Thank you very much

    Hi
    Basically, you need to unpack one (or both) sets of Take Folders, and then merge the two together:
    Working on the basic assumption (for discussion purposes) that you have two tracks, each with Take Folders on them.
    Method 1:
    Select each Take Folder on track 2 and click-hold on the arrow top right of the folder. Choose Upack to new tracks. Carefully select the new regions and drag/drop them onto the Take Folders on Track 1.
    Method 2
    Unpack ALL Take  folders on both tracks, Select all the regions and use the Region:Folder:Pack Take Folder function to re-pack into a new Take.
    CCT

  • My iPhone is merging different contacts with the same firstname into one contact. How can i resolve this.

    My Bosses iPhone is merging different contacts with the same firstname into one contact. How can i resolve this? He seems very disturbed and thinks i don't know what i'm doing. I've set up all his devices to sync across and now its messed up on his iPad, and two iPhones.
    E.G Contacts with firstname 'Adams' and different numbers are synced into one account.
    Now i have no clue how many contacts are this way cos he has a huge number of contacts (he's the ceo).
    Please i need a suggestion on how to fix this.
    Thanks for the help.

    Janie Mac wrote:
    Cannot find settings to then go to general then about.
    How do I edit the device in iTunes?
    Double-click on the name.
    My screen shot shows both devices because I sync wirelessly.  Right now I can change the iPod name but not the iPad name because the iPod is idle while the iPad is syncing.  In another minute or two, I'll be able to change the iPad name.

  • How to enter two different arrays into two columns of a multi column listbox

    Hi All,
    I have two different arrays of values suppose 1 array A(1,2,3,4,5) and another array B(3,4,5,6,7). I want to write these to arrays into a multicolumn listbox such that 1st column would be array A and 2nd column would be array B.
    Thnx in advance
    Solved!
    Go to Solution.

    I still couldnt understand how to do it...
    I am posting here my VI. here the 1, 2, 3, 4 are some controls. If i enter any value, the calculated Voltage and current are continously pushed in the array. Now i have display these arrays in the multi column listbox as 1st column be the voltage and second column being the current.
    Attachments:
    manual_graph.vi ‏643 KB

  • Looking for simple algor. for merging two arrays

    Do anyone have a simple algorithm for merging two arrays where both arrays can be null or length=0

    class Merger
         private int[] arr;
         public Merger(int[] pa, int[] pb) {
              arr = new int[pa.length + pb.length];
              for (int x=0; x < pa.length; x++) {
                   arr[x] = pa[x];
              for (int x=0; x < pb.length; x++) {
                   arr[x+pa.length] = pb[x];
         public int[] getArray() {
              return arr;
    public class MergeMaker
         public static void main(String[] args) {
              int[] a = { 1, 2, 3 };
              int[] b = { 7, 8, 9 };
              Merger m = new Merger(a, b);
              int[] c = m.getArray();
              for (int x=0; x < c.length; x++) {
                   System.out.println(c[x]);
    }Mark

  • Red Raw Source Settings - multiple settings for one long clip?

    Hello everyone,
    I have a timeline with red raw material from Red Scarlet 4K. My DOP wants to make some adjustments in the source settings before Grading. I have some long merged clips (with a lot of changes in light etc.) and I have let`s say two different parts of one of the long clips in the timeline, so I tried to make some changes in the source settings for those two clips in the timeline, but the source settings change the master clip and not only the edited clips in the timeline. Is there a way to make adjustments in the source settings separately for every clip in the timeline?
    after I open the source settings it won`t show me the part of the clip which I have in the timeline, but the whole clip from the beginning, so I have to search manually where my clip in the timeline begins, so I know how to adjust it. Is there a way that the source settings show me only the part of the clip (or at least an in and out point) I have in the timeline?

    In my experience, each .RDC container can only have a single RMD (settings) file associated with it.
    To create multiple settings for the same clip, you would have to duplicate the .RDC folder and its contents for each new setting required.
    You would then have to replace each use of that file within your sequence, for each new setting required,
    i.e. 3 settings would require original plus 2 duplicate .RDC folders, then you'd have to replace each occurrence of that clip with 1 of 3 files that has the proper new setting.
    Now, of course, if you're not grading in PrP, I can't say how the color correction software would know which duplicated files or settings to link to.
    No, there is currently no way to open the Settings dialog for a .R3D file and have it match frame to a clip in the sequence. Perhaps you could submit a feature request for that option.
    Adobe - Feature Request/Bug Report Form

  • Two ROIs with different purposes in one display

    Hi there,
    I'm using LV10 and I'd like to know if there's a simple way to create two different ROIs in one image display with different use.
    For example:
    An avi file is displayed. I create a ROI by drawing on the image display to shrink the regarded area (to save computing resources and time) of the avi. I create a second ROI (also by drawing on the image display) to set a location for a colour analysis.
    At the moment, I'm using only one ROI by drawing it on a display and getting its data by using a property node. I reckon this can't work with two ROIs in one display.
    My idea is to use a switch and local variables to get what I need, but this seems quite circuitous.
    Is there any smarter way?

    Hello seasoo,
    alternatively you could use "unbundle by name" and then index the contours (for loop or index array). After indexing, use "unbundle by name" again to extract the points of each ROI - top left point, bottom right point.
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • I would like the share an iTunes library between two different accounts on one Mac. How do I do this?

    iTunes no longer works properly (aka at all) while using one of the user accounts set up on my iMac. It does, however, work when logging in under another user account on the same iMac. (if any of you can help me solve this issue that would be perfect). If there is no solution can anyone help with my request to share an iTunes library between two different accounts on one Mac. How do I do this?

    jc_hering wrote:
    that works for anything he purchases after he creates the new account.  What about his current music that currently resides in my itunes library?  How can I get his current music out of my library into his new account/library??  Thanks..
    Copy it to his computer into his iTunes library and authorize his computer with the iTunes account used to purchase them..
    You cannot tranfser items from one iTunes account to another. Purchased items remain part of the iTunes account is was purchased with.
    iTunes account - used to purchase items
    iTunes library - where purchases (and CD RIPs) go on the computer

  • How can I consolidate all photos from different users on one computer?

    We just enable one computer to be the "Family" computer. I want to be able to consolidate all photos from the different users into one location. That way no matter wich user is login they can see and browse all the family photos. How can I do that? Do I need and external drive?
    Thanks in advance?
    MoMa

    Move the iPhoto Library to the Users/Shared folder, or you can use an external disk formatted Mac OS Extended (Journaled).
    Merge the Libraries as Larry says, with the paid version of Library Manager.
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Each account will have full access to the library, in fact, each account will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • Illustrator CS4 and my drop down menu displaying different typefaces is no longer displaying font preview.

    I am using Illustrator CS4 and my drop down menu displaying different typefaces is no longer showing all of them, just blank spaces where they would be...that is unless I put my cursor over it and I can then see the typeface. This is more of a nuisance than anything and didn't happen until I updates OS X to Yosemite. I currently am operating OS X  Yosemetie 10.10.2
    I have attached a screen shot. You can see that the font highlighted as the cursor is over it I can see the preview...but one I move the cursor it appears like all the others in the list and is blank.
    HELP!

    Solved using this previous users had the same issue; Font previews not appearing correctly in the character window after upgrading to Yosemite

  • How do I make one long WAV (or mp3) from downloaded fil

    Just picked up my Zen Xtra (30GB) yesterday, and I think I'm gonna love it, except for those ga
    ps.
    Regarding those gaps, after some research here and elsewhere, I found that I can use EAC's "Copy Image and create CUE Sheet" function to make one large file of all the tracks on a CD merged together and then send that image to the Zen Xtra, and this clears up the ga
    ps.
    My problem is that most of the music I plan on putting on the player is downloaded li've music (legal, of course), and I can't for the life of me figure out how to create one long file from the tracks when they're on the computer, not a CD (and burning a CD just to create a file kind of defeats my purpose for getting the Zen Xtra... I'm sick of burning).
    The gaps haven't really affected me with other music I've put on, but it's going to annoy the heck out of me if I get one in the middle of a sweet Scarlet > Fire ;-)
    Thanks for any help in advance...
    -JoshMessage Edited by joshamy0 on 04-20-2005 09:05 AM

    Or you read the?BEFORE you post, READ THIS FIRST (FAQ) post (search on "gapless playback")
    I know that?Easy CD-DA Extractor will encode all as one file, but this is shareware, and I'm sure there are freeware solutions.

Maybe you are looking for